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


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -716,17 +717,23 @@ def trigger_dag_run(
             triggering_user_name=user.get_name(),
             state=DagRunState.QUEUED,
             partition_key=params["partition_key"],
+            bundle_version=body.bundle_version,
             partition_date=params["partition_date"],
             session=session,
         )
+
+        dag_run_note = body.note
+        if dag_run_note:
+            current_user_id = user.get_id()
+            dag_run.note = (dag_run_note, current_user_id)
+        return dag_run
+
     except (ParamValidationError, ValueError) as e:
         raise HTTPException(status.HTTP_400_BAD_REQUEST, str(e)) from e
-
-    dag_run_note = body.note
-    if dag_run_note:
-        current_user_id = user.get_id()
-        dag_run.note = (dag_run_note, current_user_id)
-    return dag_run
+    except DagVersionNotFound as e:
+        raise HTTPException(status.HTTP_404_NOT_FOUND, str(e)) from e
+    except AirflowBadRequest as e:
+        raise HTTPException(status.HTTP_400_BAD_REQUEST, str(e)) from e

Review Comment:
   This looks like a dead except. What code path can raise this? 



##########
airflow-core/src/airflow/api_fastapi/execution_api/versions/__init__.py:
##########
@@ -60,6 +60,9 @@
         AddConnectionTestEndpoint,
         AddAwaitingInputStatePayload,
         AddTaskInstanceQueueField,
+    ),
+    Version(
+        "2026-06-16",

Review Comment:
   To remove? 



##########
airflow-core/src/airflow/api_fastapi/execution_api/versions/v2026_06_30.py:
##########
@@ -17,13 +17,7 @@
 
 from __future__ import annotations
 
-from cadwyn import (
-    ResponseInfo,
-    VersionChange,
-    convert_response_to_previous_version_for,
-    endpoint,
-    schema,
-)
+from cadwyn import ResponseInfo, VersionChange, 
convert_response_to_previous_version_for, endpoint, schema

Review Comment:
   To remove, probably caused by ealier iterations.



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