kaxil commented on code in PR #53655:
URL: https://github.com/apache/airflow/pull/53655#discussion_r2225409829
##########
airflow-core/src/airflow/api_fastapi/execution_api/versions/v2025_08_10.py:
##########
@@ -28,3 +28,20 @@ class AddDagVersionIdField(VersionChange):
description = __doc__
instructions_to_migrate_to_previous_version =
(schema(TaskInstance).field("dag_version_id").didnt_exist,)
+
+
+class AddDagRunStateFieldAndPreviousEndpoint(VersionChange):
+ """Add the `state` field to DagRun model and `/dag-runs/{dag_id}/previous`
endpoint."""
+
+ description = __doc__
+
+ instructions_to_migrate_to_previous_version = (
+ schema(DagRun).field("state").didnt_exist,
+ endpoint("/dag-runs/{dag_id}/previous", ["GET"]).didnt_exist,
+ )
+
+ @convert_response_to_previous_version_for(TIRunContext) # type:
ignore[arg-type]
+ def remove_state_from_dag_run(response: ResponseInfo = None) -> None: #
type: ignore
Review Comment:
Same as
https://github.com/apache/airflow/blob/b8e44e78b44715f2c66f8194b690d2348fbd9a0f/airflow-core/src/airflow/api_fastapi/execution_api/versions/v2025_05_20.py#L34-L35
They address mypy's inability to fully understand Cadwyn's decorator type
signatures, unfortunately.
--
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]