-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Rest API Breaking Change
The goal is to make an exhaustive list of of the breaking / noticeable changes for the Rest API moving from airflow 2 to airflow 3.
Some of those changes are inherent to FastAPI and hard to circumvent, some others are here just for code clarity or simplicity and can be 'fixed'. That being said I think that we should take the opportunity of Airflow 3 to clean/adjust the code allowing ourselves a few breaking changes when necessary.
-
Th API now returns 422 instead of 400 in cases for validation/deserialization errors (body, query/path parameters).
-
When listing a resource for instance on GET
/dags,fieldsparameter is not supported anymore to obtain a partial response. Full objects will be returned by the endpoint. -
Passing
listquery parameter switched fromform, non explodedtoform, exploded, i.e before?my_list=item1,item2now?my_list=item1&my_list=item2 -
execution_datedeprecated and is now removed. Any payload or query parameters mentioning this field has been removed. -
datetime format are
RFC3339-compliantin FastAPI, more permissive thanISO8601. meaning that the API returnszuludatetime for responses, more info here. BothZand00+xxare supported for payload and params. Workaround here Unable to parse Zulu datetimes using standard library pydantic/pydantic#6028 (comment). This is due to pydantic v2 default behavior -
Patch on DagRun and TaskInstance are more generic and allow in addition to update the ressource state to update the note content. Therefore the two legacy dedicated endpoints to update DagRun note and TaskInstance note have been removed. Same for the set task instance state, it is now handled by the broader PATCH on task intances.
-
assets/queuedEventendpoints have moved toassets/queuedEventsfor consistency. -
dag_parsing endpoint now returns a 409 when the
DagPriorityParsingRequestalready exists. (It was returning 201 before). -
clearTaskInstancesendpoint, default value forreset_dag_runshas been updated fromFalsetoTrue. -
Pool name can't be modified in the PATCH pool endpoint anymore. Pool name shouldn't be updated via pool PATCH API call #46986
-
Logical date is now a nullable required payload field for Triggering a DagRun endpoint
Committer
- I acknowledge that I am a maintainer/committer of the Apache Airflow project.