You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "dstandish (via GitHub)" <gi...@apache.org> on 2023/06/29 19:07:36 UTC
[GitHub] [airflow] dstandish opened a new pull request, #32268: Add setup / teardown info to graph_data endpoint
dstandish opened a new pull request, #32268:
URL: https://github.com/apache/airflow/pull/32268
Needed for UI magic from @bbovenzi
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish commented on a diff in pull request #32268: Add setup / teardown info to graph_data endpoint
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #32268:
URL: https://github.com/apache/airflow/pull/32268#discussion_r1247036054
##########
airflow/utils/task_group.py:
##########
@@ -653,15 +653,21 @@ def task_group_to_dict(task_item_or_group):
"""
from airflow.models.abstractoperator import AbstractOperator
- if isinstance(task_item_or_group, AbstractOperator):
+ if isinstance(task := task_item_or_group, AbstractOperator):
+ setup_teardown_type = None
+ if task.is_setup is True:
+ setup_teardown_type = "setup"
+ elif task.is_teardown is True:
+ setup_teardown_type = "teardown"
return {
- "id": task_item_or_group.task_id,
+ "id": task.task_id,
"value": {
- "label": task_item_or_group.label,
- "labelStyle": f"fill:{task_item_or_group.ui_fgcolor};",
- "style": f"fill:{task_item_or_group.ui_color};",
+ "label": task.label,
+ "labelStyle": f"fill:{task.ui_fgcolor};",
+ "style": f"fill:{task.ui_color};",
"rx": 5,
"ry": 5,
+ "setupTeardownType": setup_teardown_type,
Review Comment:
ok thanks, updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish merged pull request #32268: Add setup / teardown info to graph_data endpoint
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish merged PR #32268:
URL: https://github.com/apache/airflow/pull/32268
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dstandish commented on a diff in pull request #32268: Add setup / teardown info to graph_data endpoint
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #32268:
URL: https://github.com/apache/airflow/pull/32268#discussion_r1247005733
##########
airflow/utils/task_group.py:
##########
@@ -653,15 +653,21 @@ def task_group_to_dict(task_item_or_group):
"""
from airflow.models.abstractoperator import AbstractOperator
- if isinstance(task_item_or_group, AbstractOperator):
+ if isinstance(task := task_item_or_group, AbstractOperator):
+ setup_teardown_type = None
+ if task.is_setup is True:
+ setup_teardown_type = "setup"
+ elif task.is_teardown is True:
+ setup_teardown_type = "teardown"
return {
- "id": task_item_or_group.task_id,
+ "id": task.task_id,
"value": {
- "label": task_item_or_group.label,
- "labelStyle": f"fill:{task_item_or_group.ui_fgcolor};",
- "style": f"fill:{task_item_or_group.ui_color};",
+ "label": task.label,
+ "labelStyle": f"fill:{task.ui_fgcolor};",
+ "style": f"fill:{task.ui_color};",
"rx": 5,
"ry": 5,
+ "setupTeardownType": setup_teardown_type,
Review Comment:
@bbovenzi would you say i should only include this element if not None?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] bbovenzi commented on a diff in pull request #32268: Add setup / teardown info to graph_data endpoint
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on code in PR #32268:
URL: https://github.com/apache/airflow/pull/32268#discussion_r1247021297
##########
airflow/utils/task_group.py:
##########
@@ -653,15 +653,21 @@ def task_group_to_dict(task_item_or_group):
"""
from airflow.models.abstractoperator import AbstractOperator
- if isinstance(task_item_or_group, AbstractOperator):
+ if isinstance(task := task_item_or_group, AbstractOperator):
+ setup_teardown_type = None
+ if task.is_setup is True:
+ setup_teardown_type = "setup"
+ elif task.is_teardown is True:
+ setup_teardown_type = "teardown"
return {
- "id": task_item_or_group.task_id,
+ "id": task.task_id,
"value": {
- "label": task_item_or_group.label,
- "labelStyle": f"fill:{task_item_or_group.ui_fgcolor};",
- "style": f"fill:{task_item_or_group.ui_color};",
+ "label": task.label,
+ "labelStyle": f"fill:{task.ui_fgcolor};",
+ "style": f"fill:{task.ui_color};",
"rx": 5,
"ry": 5,
+ "setupTeardownType": setup_teardown_type,
Review Comment:
Yeah exactly, that's consistent with the type file below.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org