Skip to content

[airflow-ctl/v0-1-test] Add Airflow 3.4 Dag warning types and plugin destinations - #76119

Merged
shahar1 merged 1 commit into
apache:airflow-ctl/v0-1-testfrom
shahar1:ctl016-fix-3-4-enum-values
Oct 31, 2026
Merged

shahar1 merged 1 commit into
apache:airflow-ctl/v0-1-testfrom
shahar1:ctl016-fix-3-4-enum-values

Conversation

@shahar1

@shahar1 shahar1 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Partial backport to airflow-ctl/v0-1-test of the enum values Airflow 3.4 servers return and 0.1.x cannot parse, following the precedent of #76076 (only the values, not the features):

Unlike #76076 this edits airflow-ctl/src/airflowctl/api/datamodels/generated.py directly: regenerating it from this branch would require backporting the 3.4 core datamodels behind five feature PRs, which is out of scope for a patch release. The hand edit is marked in the file so the next regeneration knows to keep it. Servers on 3.2.x and 3.3.x never send these values, so their behaviour is unchanged.

Tested:

  • breeze testing airflow-ctl-tests: 575 passed (new tests for both enums and for the ns:name pattern boundary, all failing without the change).
  • Model check against the 3.2.0–3.4.0rc1 OpenAPI specs: no remaining enum member missing for these models.
  • Live against apache/airflow:3.4.0rc1-python3.12 with two files defining the same dag_id: dags list-warning (table and --output json) returns the duplicate dag id warning instead of a traceback; plugins list returns. Unchanged against 3.2.2 and 3.3.2.
  • breeze testing airflow-ctl-integration-tests against 3.2.2, 3.3.2 and 3.4.0rc1 with the three 0.1.6 fixes combined: identical results to the unpatched branch.

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

Generated-by: Claude Code (Fable 5.1) following the guidelines

…owctl

Airflow 3.4.0rc1 servers emit enum values that the airflowctl client models reject, so "airflowctl dags list-warning" and "airflowctl plugins list" crash with a pydantic ValidationError. Add the missing DagWarningType members, the missing plugin destinations, and accept importer-namespaced warning strings (for example "yaml:deprecated_field") in DAGWarningResponse.warning_type.

generated.py was hand-edited to the 3.4.0rc1 spec on purpose. This branch's own OpenAPI spec is generated from airflow-core, which this branch does not release, and it does not carry the 3.4 values. A datamodel regeneration from the branch spec would drop the edit; the new tests guard against that.

datamodel-codegen 0.41.0 run on the 3.4.0rc1 spec would produce "DagWarningType | WarningType" with WarningType a RootModel[str]. The plain str alternative was chosen instead so that warning_type == "yaml:x" stays a plain string comparison.

Destination1 keeps its current name although the 3.4 spec renumbers it.
@shahar1
shahar1 enabled auto-merge (squash) October 31, 2026 07:28
@shahar1
shahar1 merged commit 35fe4f5 into apache:airflow-ctl/v0-1-test Oct 31, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant