Skip to content

[v3-3-test] Raise the datamodel-code-generator floor for the codegen toolchain (#70670) - #70976

Open
vatsrahul1001 wants to merge 3 commits into
v3-3-testfrom
backport-70670-v3-3-test
Open

[v3-3-test] Raise the datamodel-code-generator floor for the codegen toolchain (#70670)#70976
vatsrahul1001 wants to merge 3 commits into
v3-3-testfrom
backport-70670-v3-3-test

Conversation

@vatsrahul1001

Copy link
Copy Markdown
Contributor

Backport of #70670 to v3-3-test. Not a plain cherry-pick — the generated models had to be regenerated against v3-3-test's own spec rather than copied from main.

What was done:

  • Bumped datamodel-code-generator[http] floor 0.33.0>=0.71.0 in task-sdk/pyproject.toml and airflow-ctl/pyproject.toml (clears the advisories in that range; codegen is a dev-only dependency group), plus the AGENTS.md command doc.
  • Regenerated the datamodels against v3-3-test's spec with the new tool via the codegen prek hooks (generate-tasksdk-datamodels, generate-airflowctl-datamodels, generate-supervisor-schemas-snapshot). check-supervisor-schemas-versions passes — the server contract is unchanged; this is purely a rendering change (drops spurious = None defaults on required-nullable fields; tightens list[Any] roots to typed tuples).
  • Updated the affected test constructions for the now-required nullable fields; re-locked uv.lock.

Intentionally excluded: test_task_command.py (main-only) and main's divergent test_operations.py tail (tests ctl task-instance operations that don't exist on this branch).

Local mypy for both airflow-ctl and task-sdk is green; codegen is idempotent on re-run.

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

Generated-by: Claude Code (Opus 4.8) following the guidelines — manual backport with local regeneration + test adaptation (documented above).

…70670)

(cherry picked from commit b301429)

Manual backport: datamodel-code-generator floor bumped 0.33.0 -> >=0.71.0 and
models REGENERATED against v3-3-test's own spec (not copied from main). Test
constructions in test_operations.py updated for the now-required nullable fields.
test_task_command.py is main-only; main's divergent test_operations.py tail
(ctl task-instance ops not on this branch) intentionally not backported.
vatsrahul1001 and others added 2 commits August 3, 2026 17:20
…l test

The regenerated model exposes the field as `schema_` with `Field(alias="schema")`
and no `populate_by_name`, so pydantic requires the alias `schema=` at construction.
Matches main's fix (#70670): construct with `schema=` plus `# type: ignore[call-arg]`.
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