Skip to content

[airflow-ctl/v0-1-test] Stop airflowctl from failing on fields added by newer API servers (#75610) - #75754

Merged
shahar1 merged 1 commit into
apache:airflow-ctl/v0-1-testfrom
Andrushika:backport-e990430-airflow-ctl/v0-1-test
Oct 27, 2026
Merged

shahar1 merged 1 commit into
apache:airflow-ctl/v0-1-testfrom
Andrushika:backport-e990430-airflow-ctl/v0-1-test

Conversation

@Andrushika

Copy link
Copy Markdown
Contributor

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 list and assets get against 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.yaml does not change, because the UI spec on this branch does not include these models. test_operations.py passes, and the three new tests fail without the change.

related: #57826


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5.5)

Generated-by: Claude Code (Opus 5.5) following the guidelines

…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)
@shahar1
shahar1 merged commit c5645e3 into apache:airflow-ctl/v0-1-test Oct 27, 2026
13 checks passed
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. need workflow approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants