Exploring possibility of moving DagAttributeTypes to execution API spec#61251
Merged
amoghrajesh merged 2 commits intoapache:mainfrom Feb 4, 2026
Merged
Exploring possibility of moving DagAttributeTypes to execution API spec#61251amoghrajesh merged 2 commits intoapache:mainfrom
amoghrajesh merged 2 commits intoapache:mainfrom
Conversation
uranusjr
reviewed
Feb 2, 2026
Contributor
Author
|
@uranusjr could i request a re review on this one? |
uranusjr
approved these changes
Feb 4, 2026
Alok-kumar-priyadarshi
pushed a commit
to Alok-kumar-priyadarshi/airflow
that referenced
this pull request
Feb 5, 2026
jhgoebbert
pushed a commit
to jhgoebbert/airflow_Owen-CH-Leung
that referenced
this pull request
Feb 8, 2026
Ratasa143
pushed a commit
to Ratasa143/airflow
that referenced
this pull request
Feb 15, 2026
choo121600
pushed a commit
to choo121600/airflow
that referenced
this pull request
Feb 22, 2026
Subham-KRLX
pushed a commit
to Subham-KRLX/airflow
that referenced
this pull request
Mar 4, 2026
Ankurdeewan
pushed a commit
to Ankurdeewan/airflow
that referenced
this pull request
Mar 15, 2026
radhwene
pushed a commit
to radhwene/airflow
that referenced
this pull request
Mar 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was generative AI tooling used to co-author this PR?
Ok hear me out, this might be odd, but since its just one enum it didn't feel too wrong.
Instead of creating a shared library or duplicating the enum, we expose
DagAttributeTypesthrough the Execution API's OpenAPI schema. This allows the Task SDK to get the enum values via code generation, keeping SDK and core serialization protocol in sync automatically.Why this approach:
DagAttributeTypesenumThe
DagAttributeTypesenum is added to get_extra_schemas() and exposed in the API spec. When task-sdk regenerates its models, it gets a properly typed enum that matches what core expects forserialize_for_task_group()Trade-off: This enum isn't actually used in API requests/responses - it's purely for the serialization. However, since we already generate SDK models from the API spec and need these exact values there, reusing the generation mechanism felt pragmatic.
I considered the alternative of creating
shared/serializationlibrary but it deemed overkill for 2 values used in few places.{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.