jedcunningham commented on code in PR #48477:
URL: https://github.com/apache/airflow/pull/48477#discussion_r2018839041


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py:
##########
@@ -146,33 +153,36 @@ def grid_data(
             )
         )
 
-    task_node_map = get_task_group_map(dag=dag)
     # Group the Task Instances by Parent Task (TaskGroup or Mapped) and All 
Task Instances
     parent_tis: dict[tuple[str, str], list] = collections.defaultdict(list)
     all_tis: dict[tuple[str, str], list] = collections.defaultdict(list)
-    for ti in task_instances:
-        # Skip the Task Instances if upstream/downstream filtering is applied 
or if task is deleted
-        if (
-            task_node_map_exclude and ti.task_id not in 
task_node_map_exclude.keys()
-        ) or ti.task_id not in task_node_map.keys():
-            continue
-
-        # Populate the Grouped Task Instances (All Task Instances except the 
Parent Task Instances)
-        if ti.task_id in get_child_task_map(
-            parent_task_id=task_node_map[ti.task_id]["parent_id"], 
task_node_map=task_node_map
-        ):
-            all_tis[(ti.task_id, ti.run_id)].append(ti)
-        # Populate the Parent Task Instances
-        parent_id = task_node_map[ti.task_id]["parent_id"]
-        if not parent_id and task_node_map[ti.task_id]["is_group"]:
-            parent_tis[(ti.task_id, ti.run_id)].append(ti)
-        elif parent_id and task_node_map[parent_id]["is_group"]:
-            parent_tis[(parent_id, ti.run_id)].append(ti)
+
+    for _, tis in tis_by_run_id.items():

Review Comment:
   Thanks, I swear I had done this at one point...



-- 
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]

Reply via email to