Skip to content

[airflow-ctl/v0-1-test] Require rich-argparse 1.4.0 for airflowctl (#76661) - #76668

Merged
shahar1 merged 1 commit into
apache:airflow-ctl/v0-1-testfrom
henry3260:backport-cb35686-airflow-ctl/v0-1-test
Nov 7, 2026
Merged

shahar1 merged 1 commit into
apache:airflow-ctl/v0-1-testfrom
henry3260:backport-cb35686-airflow-ctl/v0-1-test

Conversation

@henry3260

Copy link
Copy Markdown
Member

Manual backport of #76661 to airflow-ctl/v0-1-test. The automated backport failed to apply (run details).

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 Require rich-argparse 1.4.0 for airflowctl #76661.

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

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

🤖 Generated with Claude Code

…pache#76661)

airflowctl imports HelpPreviewAction at startup, which rich-argparse only provides from 1.4.0. The declared floor of 1.0.0 lets a resolver keep an older release, and then every airflowctl command fails with ImportError.

(cherry picked from commit cb35686)

Conflict resolution: this branch declares structlog>=25.4.0 where main has
>=26.1.0, and the two floors sit on adjacent lines, so the hunk conflicted.
Only the rich-argparse floor is taken; structlog keeps this branch's value.
uv.lock was regenerated with the uv version this branch pins (0.11.8) rather
than merged by hand, which leaves the same one-line specifier change as on main.
@shahar1
shahar1 merged commit f9cb14d into apache:airflow-ctl/v0-1-test Nov 7, 2026
13 checks passed
shahar1 added a commit to shahar1/airflow that referenced this pull request Nov 7, 2026
…pache#76661) (apache#76668)

airflowctl imports HelpPreviewAction at startup, which rich-argparse only provides from 1.4.0. The declared floor of 1.0.0 lets a resolver keep an older release, and then every airflowctl command fails with ImportError.

(cherry picked from commit cb35686)

Conflict resolution: this branch declares structlog>=25.4.0 where main has
>=26.1.0, and the two floors sit on adjacent lines, so the hunk conflicted.
Only the rich-argparse floor is taken; structlog keeps this branch's value.
uv.lock was regenerated with the uv version this branch pins (0.11.8) rather
than merged by hand, which leaves the same one-line specifier change as on main.

Co-authored-by: Shahar Epstein <[email protected]>
@shahar1 shahar1 mentioned this pull request Nov 7, 2026
1 task done
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.

2 participants