harishkesavarao opened a new pull request, #69854:
URL: https://github.com/apache/airflow/pull/69854

   Bumps the `datamodel-code-generator` pin used by the `task-sdk` and 
`airflow-ctl` `codegen` uv dependency groups from `0.33.0` to `0.41.0`. Both 
groups share a single workspace lockfile, so the pin must move together across 
`task-sdk/pyproject.toml` and `airflow-ctl/pyproject.toml`.
   
   ## Why 0.41.0
   
   Dependabot PR #68816 tried to bump this dependency blindly and was closed — 
regenerating the OpenAPI-derived model files with newer generator releases is 
not a no-op. Bisecting versions between 0.33.0 and 0.67.0 (see #69616, item 3) 
found:
   
   - **0.42.2 through 0.67.0**: widen `JsonValue`-backed fields (e.g. in 
`AssetResponse.extra`, `XComResponse.value`) to `JsonValue | None` — a 
schema/type change, not cosmetic.
   - **0.57.0 and later** (regression compounds on top of the above): drop the 
`= None` default from nullable-but-not-required fields on ~200 fields across 
`task-sdk/src/airflow/sdk/api/datamodels/_generated.py` and 
`airflow-ctl/src/airflowctl/api/datamodels/generated.py`, turning 
previously-optional constructor arguments into required ones — a breaking 
Pydantic v2 model-contract change, even though `use-default=true` is set in 
both `[tool.datamodel-codegen]` configs.
   - **0.41.0** is the newest version that regenerates both clients with a diff 
limited to the generator version-comment line, plus one benign 
`RootModel[list]` → `RootModel[list[Any]]` typing improvement in 
`airflow-ctl`'s `generated.py`. No field lost its default, no type was widened.
   
   ## Testing
   
   - `uv.lock` regenerated cleanly: `uv lock` resolves 949 packages with 
`datamodel-code-generator v0.33.0 -> v0.41.0`, no conflicts between the 
`task-sdk` and `airflow-ctl` `codegen` groups.
   - Regenerated all three OpenAPI-derived client files and diffed against the 
pre-bump versions:
     - `task-sdk/src/airflow/sdk/api/datamodels/_generated.py` — 
version-comment line only.
     - `airflow-ctl/src/airflowctl/api/datamodels/generated.py` — 
version-comment line + `RootModel[list]` → `RootModel[list[Any]]` (2 
occurrences, semantically equivalent).
     - `airflow-ctl/src/airflowctl/api/datamodels/auth_generated.py` — 
version-comment line only.
   - `task-sdk` test suite: `2703 passed, 6 skipped` (pre-existing, unrelated 
skips: non-Linux-only test, pyiceberg version mismatch, pendulum~=2 cases).
   - `airflow-ctl` test suite: `267 passed`.
   - `prek run --from-ref upstream/main --stage pre-commit`: all applicable 
hooks passed, including `mypy-task-sdk`, `mypy-devel-common`, ruff lint/format, 
and `Update uv.lock`.
   
   closes: #69616
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Sonnet 5)
   
   Generated-by: Claude Code (Sonnet 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to