This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-0-test by this push:
     new a3f55452f43 [v3-0-test] Fix structure edges (#51484) (#51489)
a3f55452f43 is described below

commit a3f55452f43df358924de218ea837ca54b5980da
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jun 6 21:17:17 2025 +0200

    [v3-0-test] Fix structure edges (#51484) (#51489)
    
    (cherry picked from commit 414407b7d72f85e43ad67352c4da5090d8e24a56)
    
    Co-authored-by: Pierre Jeambrun <[email protected]>
---
 .../api_fastapi/core_api/routes/ui/structure.py    |  4 ++--
 .../core_api/routes/ui/test_structure.py           | 28 +++++++++++-----------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git 
a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/structure.py 
b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/structure.py
index 25c8134203b..a84f36ab010 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/structure.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/ui/structure.py
@@ -138,9 +138,9 @@ def structure_data(
                 asset_expression, entry_node_ref["id"]
             )
             data["nodes"] += upstream_asset_nodes
-            data["edges"] = upstream_asset_edges
+            data["edges"] += upstream_asset_edges
 
-        data["edges"] += start_edges + edges + end_edges
+        data["edges"] += start_edges + end_edges
 
     bind_output_assets_to_tasks(data["edges"], serialized_dag)
 
diff --git 
a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_structure.py 
b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_structure.py
index 035721a1dcb..2c6425db1b3 100644
--- a/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_structure.py
+++ b/airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_structure.py
@@ -310,6 +310,20 @@ class TestStructureDataEndpoint:
         }
         expected = {
             "edges": [
+                {
+                    "is_setup_teardown": None,
+                    "label": None,
+                    "source_id": "external_task_sensor",
+                    "target_id": "task_2",
+                    "is_source_asset": None,
+                },
+                {
+                    "is_setup_teardown": None,
+                    "label": None,
+                    "source_id": "task_1",
+                    "target_id": "external_task_sensor",
+                    "is_source_asset": None,
+                },
                 {
                     "is_setup_teardown": None,
                     "label": None,
@@ -352,20 +366,6 @@ class TestStructureDataEndpoint:
                     "target_id": "task_1",
                     "is_source_asset": None,
                 },
-                {
-                    "is_setup_teardown": None,
-                    "label": None,
-                    "source_id": "external_task_sensor",
-                    "target_id": "task_2",
-                    "is_source_asset": None,
-                },
-                {
-                    "is_setup_teardown": None,
-                    "label": None,
-                    "source_id": "task_1",
-                    "target_id": "external_task_sensor",
-                    "is_source_asset": None,
-                },
                 {
                     "is_setup_teardown": None,
                     "label": None,

Reply via email to