pierrejeambrun commented on code in PR #44701:
URL: https://github.com/apache/airflow/pull/44701#discussion_r1882382180


##########
airflow/api_fastapi/core_api/routes/ui/structure.py:
##########
@@ -63,4 +63,36 @@ def structure_data(
         "edges": edges,
     }
 
+    if external_dependencies:
+        entry_node_ref = nodes[0] if nodes else None
+        exit_node_ref = nodes[-1] if nodes else None
+
+        start_edges: list[dict] = []
+        end_edges: list[dict] = []
+
+        for dependency_dag_id, dependencies in 
SerializedDagModel.get_dag_dependencies().items():
+            for dependency in dependencies:
+                if dependency_dag_id != dag_id and dependency.target != dag_id:
+                    continue
+
+                # Add nodes
+                nodes.append(
+                    {
+                        "id": dependency.node_id,
+                        "label": dependency.node_id,

Review Comment:
   Yes. `dependency.dependency_id` is better for the label.



##########
airflow/api_fastapi/core_api/routes/ui/structure.py:
##########
@@ -63,4 +63,36 @@ def structure_data(
         "edges": edges,
     }
 
+    if external_dependencies:
+        entry_node_ref = nodes[0] if nodes else None
+        exit_node_ref = nodes[-1] if nodes else None
+
+        start_edges: list[dict] = []
+        end_edges: list[dict] = []
+
+        for dependency_dag_id, dependencies in 
SerializedDagModel.get_dag_dependencies().items():
+            for dependency in dependencies:
+                if dependency_dag_id != dag_id and dependency.target != dag_id:
+                    continue
+
+                # Add nodes
+                nodes.append(
+                    {
+                        "id": dependency.node_id,
+                        "label": dependency.node_id,

Review Comment:
   Yes. `dependency.dependency_id` is better for the label. updated thanks.



-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to