xvega commented on code in PR #62369:
URL: https://github.com/apache/airflow/pull/62369#discussion_r2929831582
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py:
##########
@@ -437,31 +374,93 @@ def get_node_sumaries():
if node["type"] == "task":
node["child_states"] = None
yield node
-
- # For good history: add synthetic leaf nodes for task_ids that have
TIs in this run
- # but are not present in the current DAG structure (e.g. removed tasks)
missing_task_ids = set(ti_details.keys()) - yielded_task_ids
for task_id in sorted(missing_task_ids):
detail = ti_details[task_id]
- # Create a leaf task node with aggregated state from its TIs
agg = _get_aggs_for_node(detail)
yield {
"task_id": task_id,
"task_display_name": task_id,
"type": "task",
"parent_id": None,
**agg,
- # Leaf tasks have no children
"child_states": None,
}
- task_instances = list(get_node_sumaries())
- # If a group id and a task id collide, prefer the group record
- group_ids = {n.get("task_id") for n in task_instances if n.get("type") ==
"group"}
- filtered = [n for n in task_instances if not (n.get("type") == "task" and
n.get("task_id") in group_ids)]
+ nodes = list(get_node_summaries())
+ group_ids = {n.get("task_id") for n in nodes if n.get("type") == "group"}
Review Comment:
kept it!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]