Skip to content

Raise curated dependency floors in ci upgrade runs - #73657

Merged
potiuk merged 10 commits into
apache:mainfrom
potiuk:dependency-floor-bumps
Sep 24, 2026
Merged

potiuk merged 10 commits into
apache:mainfrom
potiuk:dependency-floor-bumps

Conversation

@potiuk

@potiuk potiuk commented Sep 24, 2026

Copy link
Copy Markdown
Member

Lower bounds of fast-moving SDKs are only ever raised by hand, and in practice not at all: the amazon
provider still declares boto3>=1.41.0 despite a comment asking to raise it "regularly". Ancient floors
widen the resolver's backtracking space and make the lowest-direct dependency tests exercise versions
nobody runs any more.

This adds a step to breeze ci upgrade ("Upgrade important CI environment") that raises the floors of a
curated set of dependencies, following ADR 0018 (dev/breeze/doc/adr/0018-raise-dependency-floors-automatically.md):

  • The policy lives in [tool.airflow.dependency-floors] in the root pyproject.toml: curated packages
    (boto3/botocore as a group, google-cloud-*, google-api-python-client, azure-*), min-age = "180 days"
    and an explicit exclude table seeded from past caps and reverts.
  • A floor is raised to the newest final, non-yanked release uploaded at least 180 days ago, and never lowered.
  • Packages held back anywhere (<, <=, !=, ==, ~=, including the root [tool.uv] constraint and
    override tables) or listed in exclude are skipped.
  • After applying the bumps, uv lock --dry-run runs with both the highest and the lowest-direct
    resolution. Bumps that break either are found by bisection and rolled back. Workspace members with their
    own uv.lock (dev/breeze) are not touched, because that lock is not covered by the check.
  • The upgrade PR body gets a report of raised, rolled-back and skipped floors, and an already-open upgrade
    PR has its body refreshed on every run.

The step runs after upgrade-important-versions and before uv lock --upgrade, and can be switched off
with --no-upgrade-dependency-floors.

Heads-up: the first run will be large. A local run against current main raised 58 floors (several of
them across major versions, e.g. google-cloud-storage 2.9 → 3.10), rolled back none and skipped 2,
in about 30 seconds. Those edits are not part of this PR; they will arrive through the next scheduled
upgrade PR, where the lowest-dependency CI jobs exercise them.

Testing:

  • uv run --project scripts pytest scripts/tests/ci/prek/test_upgrade_dependency_floors.py (69 passed)
  • uv run --project dev/breeze pytest dev/breeze/tests/test_ci_upgrade.py (11 passed)
  • prek run mypy-dev mypy-scripts --all-files passed
  • Pre-commit hooks passed on every commit (lychee-docker skipped locally: Docker credential helper unavailable)
  • One real run of the manual upgrade-dependency-floors hook, edits discarded

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

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


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

🤖 Generated with Claude Code

Generated-by: Claude Opus 5
Generated-by: Claude Opus 5
Generated-by: Claude Opus 5
Floors of workspace members with their own uv.lock (dev/breeze) are left
alone, since the root resolve check does not cover that lock. A rollback
restores only the occurrences a bump changed, a bump applies to all its
files or none, malformed PyPI data skips only the affected package, an
aborted run still leaves a note in the PR body, and an already-open
upgrade PR gets the body of the latest run.

Generated-by: Claude Opus 5
Maintainers read the upgrade PR to see what moved, so the report now
names the files behind each raised floor. Caps set only in the root
[tool.uv] tables are honoured, an unreachable PyPI no longer stalls the
run for every curated package, and the report's temporary directory is
cleaned up.

Generated-by: Claude Opus 5
@potiuk
potiuk merged commit 7bf71cd into apache:main Sep 24, 2026
215 of 224 checks passed
@potiuk
potiuk deleted the dependency-floor-bumps branch September 24, 2026 11:57
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-3-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ v3-3-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 7bf71cd v3-3-test

This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

potiuk added a commit that referenced this pull request Sep 24, 2026
… (#73668)

* Stop backporting the scheduled CI environment upgrade (#73319)

Each maintenance branch upgrades its own CI environment on its own
schedule, so backporting main's upgrade races that with a change that
conflicts on the very files it regenerates — which is why none of the
labelled upgrade PRs has ever produced a backport. boring-cyborg labels
by path and cannot tell this PR from a hand-written one touching dev/ or
.github/, so the label has to come off afterwards instead.

Generated-by: Claude Code (Opus 5)
(cherry picked from commit 613c9d3)

* Raise curated dependency floors in ci upgrade runs (#73657)

* Add dependency floor policy configuration

Generated-by: Claude Opus 5

* Find curated dependency requirements and held-back packages

Generated-by: Claude Opus 5

* Select dependency floor targets outside the cooldown

Generated-by: Claude Opus 5

* Rewrite dependency floors in pyproject files

Generated-by: Claude Opus 5

* Roll back dependency floor bumps that break resolution

Generated-by: Claude Opus 5

* Add upgrade-dependency-floors manual hook

Generated-by: Claude Opus 5

* Raise curated dependency floors in breeze ci upgrade

Generated-by: Claude Opus 5

* Document automatic dependency floor bumps

Generated-by: Claude Opus 5

* Harden dependency floor bumps after review

Floors of workspace members with their own uv.lock (dev/breeze) are left
alone, since the root resolve check does not cover that lock. A rollback
restores only the occurrences a bump changed, a bump applies to all its
files or none, malformed PyPI data skips only the affected package, an
aborted run still leaves a note in the PR body, and an already-open
upgrade PR gets the body of the latest run.

Generated-by: Claude Opus 5

* Address remaining review notes on dependency floor bumps

Maintainers read the upgrade PR to see what moved, so the report now
names the files behind each raised floor. Caps set only in the root
[tool.uv] tables are honoured, an unreachable PyPI no longer stalls the
run for every curated package, and the report's temporary directory is
cleaned up.

Generated-by: Claude Opus 5
(cherry picked from commit 7bf71cd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants