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

   Manual backport of #76661 to `airflow-ctl/v0-1-test`. The automated backport 
failed to apply ([run 
details](https://github.com/apache/airflow/actions/runs/42356061297)).
   
   ## Why
   
   `airflow-ctl/src/airflowctl/ctl/cli_parser.py` imports `HelpPreviewAction` 
from `rich_argparse` at module level, and `add_preview_action` uses it every 
time a parser is built. `HelpPreviewAction` only exists from rich-argparse 
1.4.0, but this branch still declares `rich-argparse>=1.0.0`, so a resolver is 
free to keep an older release — for instance when another installed package 
already pins one. Every `airflowctl` command then fails on start:
   
   ```
   ImportError: cannot import name 'HelpPreviewAction' from 'rich_argparse'
   ```
   
   `airflow-core` declares the same floor but does not import 
`HelpPreviewAction`, so it is left alone here, as on `main`.
   
   ## What
   
   - `airflow-ctl/pyproject.toml`: `rich-argparse>=1.0.0` → `>=1.4.0`.
   - `uv.lock`: the matching `requires-dist` specifier line.
   
   ## Conflict resolution
   
   The cherry-pick conflicted in both files.
   
   - `airflow-ctl/pyproject.toml`: this branch declares `structlog>=25.4.0` 
where `main` has `>=26.1.0`, and the two floors sit on adjacent lines. Only the 
`rich-argparse` floor is taken; `structlog` keeps this branch's value. No other 
`main`-only floor was brought across.
   - `uv.lock`: regenerated rather than merged by hand, using the uv version 
this branch pins (0.11.8, per 
`dev/breeze/src/airflow_breeze/global_constants.py` and `Dockerfile.ci`). A 
newer uv rewrites the lock header and re-sorts 
`[options.exclude-newer-package]`, which would have added ~280 lines of 
unrelated churn to a release branch. The result is the same one-line specifier 
change as on `main`, and the lock header stays at `revision = 3`.
   
   No `RELEASE_NOTES.rst` entry and no newsfragment: that file is populated at 
release time, and the release manager builds the notes from `git log`.
   
   ## Merge order
   
   This needs to land **before** #76663 (`Prepare airflow-ctl 0.1.6rc1 
release`) and before the 0.1.6rc1 tag. #76663 already lists ``Require 
``rich-argparse`` 1.4.0 or later (#76661)`` under Significant Changes, but its 
diff touches only `RELEASE_NOTES.rst`, the deleted newsfragment and 
`airflowctl/__init__.py` — not the dependency floor. The files do not overlap, 
so GitHub will not enforce the order; if #76663 merges first, 0.1.6rc1 ships 
release notes that do not match its metadata.
   
   ## Checks
   
   - `rich-argparse==1.3.0`: `from rich_argparse import HelpPreviewAction` 
raises `ImportError`. `rich-argparse==1.4.0`: the import succeeds.
   - `uv lock --check` passes at this commit under uv 0.11.8, and restoring the 
base lock and re-running `uv lock` reproduces this one byte for byte.
   - `prek run --from-ref d0c6496289 --to-ref HEAD --stage pre-commit`: all 
hooks pass, including `Update uv.lock`.
   - No test is added: nothing in the suite installs the lowest allowed 
dependency versions, and the resolved version here is already 1.7.2, so a test 
would not fail without this change. Same reasoning as #76661.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Claude Opus 5)
   
   Generated-by: Claude Code (Claude Opus 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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