Skip to content

Stop prek hooks changing uv.lock and fail CI when it is stale - #74803

Merged
ashb merged 1 commit into
mainfrom
prek-uv-frozen
Oct 15, 2026
Merged

ashb merged 1 commit into
mainfrom
prek-uv-frozen

Conversation

@ashb

@ashb ashb commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Several hooks ran uv without --frozen, so a commit could re-lock with
whichever uv was on PATH (seen: lock format revision and environment
markers rewritten by an unrelated commit). Set UV_FROZEN=1 through prek's
default_env (needs prek 0.4.8); the manual upgrade hooks set UV_FROZEN=0
because they need real resolution.

update-uv-lock ran uv lock --frozen, which exits 0 on a stale lock, and
CI always skipped it, so the 2026-10-14 providers release merged with
version bumps that were never re-locked. Run uv lock --check with
UV_FROZEN=0 and stop skipping it in CI.

The breeze shim passes --locked, which older uv rejects together with an
inherited UV_FROZEN. Unset UV_FROZEN in the shim and bump SHIM_VERSION to 3
so existing installs are told to re-run setup_breeze.

This should cover and prevent the out-of-sync issue in #74799


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

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

Comment thread scripts/tools/setup_breeze
Comment thread .pre-commit-config.yaml
Comment thread contributing-docs/07_local_virtualenv.rst
Several hooks ran uv without --frozen, so a commit could re-lock with
whichever uv was on PATH (seen: lock format revision and environment
markers rewritten by an unrelated commit). Set UV_FROZEN=1 through prek's
default_env (needs prek 0.4.8); the manual upgrade hooks set UV_FROZEN=0
because they need real resolution. default_env only applies to hooks in
the root config, so check-provider-yaml-valid, which runs `uv sync` inside
breeze against the bind-mounted host uv.lock, now passes --frozen itself.

update-uv-lock ran `uv lock --frozen`, which exits 0 on a stale lock, and
CI always skipped it, so the 2026-10-14 providers release merged with
version bumps that were never re-locked. Run `uv lock --check` with
UV_FROZEN=0 and stop skipping it in CI.

The breeze shim passes --locked, which older uv rejects together with an
inherited UV_FROZEN. Unset UV_FROZEN in the shim and bump SHIM_VERSION to 3
so existing installs are told to re-run setup_breeze.

test_get_expected_shim_version_reads_real_setup_script asserted the exact
SHIM_VERSION, so it failed on every bump without saying what broke. It now
only asserts that the real setup_breeze still yields an integer version,
which is what ties the parser to the real file.
@ashb
ashb merged commit efb49f5 into main Oct 15, 2026
159 checks passed
@ashb
ashb deleted the prek-uv-frozen branch October 15, 2026 19:10
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

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-4-test PR Link

github-actions Bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Oct 15, 2026
…tale (apache#74803)

Several hooks ran uv without --frozen, so a commit could re-lock with
whichever uv was on PATH (seen: lock format revision and environment
markers rewritten by an unrelated commit). Set UV_FROZEN=1 through prek's
default_env (needs prek 0.4.8); the manual upgrade hooks set UV_FROZEN=0
because they need real resolution. default_env only applies to hooks in
the root config, so check-provider-yaml-valid, which runs `uv sync` inside
breeze against the bind-mounted host uv.lock, now passes --frozen itself.

update-uv-lock ran `uv lock --frozen`, which exits 0 on a stale lock, and
CI always skipped it, so the 2026-10-14 providers release merged with
version bumps that were never re-locked. Run `uv lock --check` with
UV_FROZEN=0 and stop skipping it in CI.

The breeze shim passes --locked, which older uv rejects together with an
inherited UV_FROZEN. Unset UV_FROZEN in the shim and bump SHIM_VERSION to 3
so existing installs are told to re-run setup_breeze.

test_get_expected_shim_version_reads_real_setup_script asserted the exact
SHIM_VERSION, so it failed on every bump without saying what broke. It now
only asserts that the real setup_breeze still yields an integer version,
which is what ties the parser to the real file.
(cherry picked from commit efb49f5)

Co-authored-by: Ash Berlin-Taylor <ash@astronomer.io>
aws-airflow-bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Oct 15, 2026
…tale (apache#74803)

Several hooks ran uv without --frozen, so a commit could re-lock with
whichever uv was on PATH (seen: lock format revision and environment
markers rewritten by an unrelated commit). Set UV_FROZEN=1 through prek's
default_env (needs prek 0.4.8); the manual upgrade hooks set UV_FROZEN=0
because they need real resolution. default_env only applies to hooks in
the root config, so check-provider-yaml-valid, which runs `uv sync` inside
breeze against the bind-mounted host uv.lock, now passes --frozen itself.

update-uv-lock ran `uv lock --frozen`, which exits 0 on a stale lock, and
CI always skipped it, so the 2026-10-14 providers release merged with
version bumps that were never re-locked. Run `uv lock --check` with
UV_FROZEN=0 and stop skipping it in CI.

The breeze shim passes --locked, which older uv rejects together with an
inherited UV_FROZEN. Unset UV_FROZEN in the shim and bump SHIM_VERSION to 3
so existing installs are told to re-run setup_breeze.

test_get_expected_shim_version_reads_real_setup_script asserted the exact
SHIM_VERSION, so it failed on every bump without saying what broke. It now
only asserts that the real setup_breeze still yields an integer version,
which is what ties the parser to the real file.
(cherry picked from commit efb49f5)

Co-authored-by: Ash Berlin-Taylor <ash@astronomer.io>
ashb added a commit that referenced this pull request Oct 16, 2026
…tale (#74803) (#74812)

Several hooks ran uv without --frozen, so a commit could re-lock with
whichever uv was on PATH (seen: lock format revision and environment
markers rewritten by an unrelated commit). Set UV_FROZEN=1 through prek's
default_env (needs prek 0.4.8); the manual upgrade hooks set UV_FROZEN=0
because they need real resolution. default_env only applies to hooks in
the root config, so check-provider-yaml-valid, which runs `uv sync` inside
breeze against the bind-mounted host uv.lock, now passes --frozen itself.

update-uv-lock ran `uv lock --frozen`, which exits 0 on a stale lock, and
CI always skipped it, so the 2026-10-14 providers release merged with
version bumps that were never re-locked. Run `uv lock --check` with
UV_FROZEN=0 and stop skipping it in CI.

The breeze shim passes --locked, which older uv rejects together with an
inherited UV_FROZEN. Unset UV_FROZEN in the shim and bump SHIM_VERSION to 3
so existing installs are told to re-run setup_breeze.

test_get_expected_shim_version_reads_real_setup_script asserted the exact
SHIM_VERSION, so it failed on every bump without saying what broke. It now
only asserts that the real setup_breeze still yields an integer version,
which is what ties the parser to the real file.
(cherry picked from commit efb49f5)

Co-authored-by: Ash Berlin-Taylor <ash@astronomer.io>
vatsrahul1001 pushed a commit that referenced this pull request Oct 20, 2026
…tale (#74803) (#74812)

Several hooks ran uv without --frozen, so a commit could re-lock with
whichever uv was on PATH (seen: lock format revision and environment
markers rewritten by an unrelated commit). Set UV_FROZEN=1 through prek's
default_env (needs prek 0.4.8); the manual upgrade hooks set UV_FROZEN=0
because they need real resolution. default_env only applies to hooks in
the root config, so check-provider-yaml-valid, which runs `uv sync` inside
breeze against the bind-mounted host uv.lock, now passes --frozen itself.

update-uv-lock ran `uv lock --frozen`, which exits 0 on a stale lock, and
CI always skipped it, so the 2026-10-14 providers release merged with
version bumps that were never re-locked. Run `uv lock --check` with
UV_FROZEN=0 and stop skipping it in CI.

The breeze shim passes --locked, which older uv rejects together with an
inherited UV_FROZEN. Unset UV_FROZEN in the shim and bump SHIM_VERSION to 3
so existing installs are told to re-run setup_breeze.

test_get_expected_shim_version_reads_real_setup_script asserted the exact
SHIM_VERSION, so it failed on every bump without saying what broke. It now
only asserts that the real setup_breeze still yields an integer version,
which is what ties the parser to the real file.
(cherry picked from commit efb49f5)

Co-authored-by: Ash Berlin-Taylor <ash@astronomer.io>
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