pierrejeambrun commented on code in PR #61550:
URL: https://github.com/apache/airflow/pull/61550#discussion_r3116501704
##########
airflow-core/src/airflow/api_fastapi/execution_api/versions/v2026_04_06.py:
##########
@@ -197,3 +197,22 @@ class AddDagEndpoint(VersionChange):
description = __doc__
instructions_to_migrate_to_previous_version = (endpoint("/dags/{dag_id}",
["GET"]).didnt_exist,)
+
+
+class AddBundleVersionField(VersionChange):
+ """Add the `bundle_version` field to DagRun model."""
+
+ description = __doc__
+
+ instructions_to_migrate_to_previous_version =
(schema(DagRun).field("bundle_version").didnt_exist,)
+
+ @convert_response_to_previous_version_for(TIRunContext) # type:
ignore[arg-type]
+ def remove_bundle_version_from_dag_run(response: ResponseInfo) -> None: #
type: ignore[misc]
+ """Remove the `bundle_version` field from the dag_run object when
converting to the previous version."""
+ if "dag_run" in response.body and isinstance(response.body["dag_run"],
dict):
+ response.body["dag_run"].pop("bundle_version", None)
+
+ @convert_response_to_previous_version_for(DagRun) # type: ignore[arg-type]
+ def remove_bundle_version_from_dag_run_response(response: ResponseInfo) ->
None: # type: ignore[misc]
Review Comment:
Name of the method needs to be changed. It's similar to
`remove_bundle_version_from_dag_run` and confusing
--
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]