You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by pi...@apache.org on 2025/07/02 08:05:11 UTC

(airflow) branch v3-0-test updated: [v3-0-test] Fix http exception when ti not found for extra links API (#51443) (#51465)

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 f87a0abe3a2 [v3-0-test] Fix http exception when ti not found for extra links API (#51443) (#51465)
f87a0abe3a2 is described below

commit f87a0abe3a24ebb9a96588b53572b6b2da7bf274
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Wed Jul 2 10:05:04 2025 +0200

    [v3-0-test] Fix http exception when ti not found for extra links API (#51443) (#51465)
    
    * Fix http exception when ti not found for extra links API
    
    * no question of dagrun here, remove that test
    (cherry picked from commit ce4e9e8ea25efd30552db5cc9fb0ec68c3f18d27)
    
    Co-authored-by: Amogh Desai <am...@gmail.com>
---
 .../src/airflow/api_fastapi/core_api/routes/public/extra_links.py   | 2 +-
 .../unit/api_fastapi/core_api/routes/public/test_extra_links.py     | 6 ------
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py
index d6d9b04b9ef..f21be703880 100644
--- a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py
+++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/extra_links.py
@@ -77,7 +77,7 @@ def get_extra_links(
     if not ti:
         raise HTTPException(
             status.HTTP_404_NOT_FOUND,
-            f"DAG Run with ID = {dag_run_id} not found",
+            "TaskInstance not found",
         )
 
     all_extra_link_pairs = (
diff --git a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py
index 6bede001042..1ff1d06d961 100644
--- a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py
+++ b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_extra_links.py
@@ -131,12 +131,6 @@ class TestGetExtraLinks:
                 {"detail": "DAG with ID = INVALID not found"},
                 id="missing_dag",
             ),
-            pytest.param(
-                "/dags/TEST_DAG_ID/dagRuns/INVALID/taskInstances/TEST_SINGLE_LINK/links",
-                404,
-                {"detail": "DAG Run with ID = INVALID not found"},
-                id="missing_dag_run",
-            ),
             pytest.param(
                 "/dags/TEST_DAG_ID/dagRuns/TEST_DAG_RUN_ID/taskInstances/INVALID/links",
                 404,