Repository navigation
[airflow-ctl/v0-1-test] Stop airflowctl from failing on fields added by newer API servers (#75610) - #75754
Merged
shahar1 merged 1 commit intoOct 27, 2026
Conversation
…by newer API servers (apache#75610) Seven core API models that only appear in responses, the config models and the asset reference models, extend StrictBaseModel. So the OpenAPI spec marks them "additionalProperties: false", and the airflowctl models generated from it get extra="forbid". When a newer server adds a field to one of them, an older airflowctl fails to parse the response. apache#71446 added the optional team_name field to two asset reference models for 3.4, and airflowctl from airflow-ctl/v0-1-test now fails on "assets list" and "assets get" against 3.4.0b2. StrictBaseModel is meant for request bodies, so that unknown fields sent by a client are rejected (apache#44306). Response models are built by the server, and new fields in them should not break existing clients. (cherry picked from commit e990430)
Andrushika
requested review from
bbovenzi,
bugraoz93,
choo121600,
dheerajturaga,
ephraimbuddy,
guan404ming,
jason810496,
pierrejeambrun,
potiuk,
rawwar,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
October 27, 2026 12:26
2 tasks done
shahar1
approved these changes
Oct 27, 2026
shahar1
pushed a commit
that referenced
this pull request
Nov 19, 2026
…by newer API servers (#75610) (#75754) Seven core API models that only appear in responses, the config models and the asset reference models, extend StrictBaseModel. So the OpenAPI spec marks them "additionalProperties: false", and the airflowctl models generated from it get extra="forbid". When a newer server adds a field to one of them, an older airflowctl fails to parse the response. #71446 added the optional team_name field to two asset reference models for 3.4, and airflowctl from airflow-ctl/v0-1-test now fails on "assets list" and "assets get" against 3.4.0b2. StrictBaseModel is meant for request bodies, so that unknown fields sent by a client are rejected (#44306). Response models are built by the server, and new fields in them should not break existing clients. (cherry picked from commit e990430)
28 of 67 tasks
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.
Why
#75610 stops airflowctl from failing when a newer API server adds a field to a response model. airflowctl 0.1.6 is built from this branch. Without the fix, it fails on
assets listandassets getagainst 3.4.0b2 (#57826).What
Backport of #75610. The automatic backport failed on conflicts in the generated files. The model changes in core apply cleanly. I regenerated the spec, the UI schemas and the airflowctl models from the code on this branch. Each file changes in the same 7 places as on main.
_private_ui.yamldoes not change, because the UI spec on this branch does not include these models.test_operations.pypasses, and the three new tests fail without the change.related: #57826
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines