Skip to content

Add uv-sync prek hook to keep lockfile updated after dependency changes - #63754

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:add-uv-sync-prek-hook
Mar 16, 2026
Merged

Add uv-sync prek hook to keep lockfile updated after dependency changes#63754
potiuk merged 1 commit into
apache:mainfrom
potiuk:add-uv-sync-prek-hook

Conversation

@potiuk

@potiuk potiuk commented Mar 16, 2026

Copy link
Copy Markdown
Member

Add a prek hook that automatically runs uv sync whenever any pyproject.toml file is modified. This ensures the local uv.lock and virtual environment stay in sync with declared dependencies during development.


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

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

When pyproject.toml files are modified, the local uv.lock can get out
of sync with declared dependencies. This adds a prek hook that
automatically runs `uv sync` whenever any pyproject.toml file changes,
ensuring the lockfile and virtual environment stay consistent.

@jscheffl jscheffl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, oh, cool. Was scratching all the time my head where and how the UV.LOVK is updated... HERE it is!

@potiuk
potiuk merged commit 59192ef into apache:main Mar 16, 2026
61 of 62 checks passed
@potiuk
potiuk deleted the add-uv-sync-prek-hook branch March 16, 2026 21:01
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-1-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-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 59192ef v3-1-test

This should apply the commit to the v3-1-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.

Comment thread .pre-commit-config.yaml
require_serial: true
- id: uv-sync
name: Run uv sync
entry: uv sync

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
entry: uv sync
entry: uv lock

This is more suitable for a hook that should run quickly

fat-catTW pushed a commit to fat-catTW/airflow that referenced this pull request Mar 22, 2026
apache#63754)

When pyproject.toml files are modified, the local uv.lock can get out
of sync with declared dependencies. This adds a prek hook that
automatically runs `uv sync` whenever any pyproject.toml file changes,
ensuring the lockfile and virtual environment stay consistent.
abhijeets25012-tech pushed a commit to abhijeets25012-tech/airflow that referenced this pull request Apr 9, 2026
apache#63754)

When pyproject.toml files are modified, the local uv.lock can get out
of sync with declared dependencies. This adds a prek hook that
automatically runs `uv sync` whenever any pyproject.toml file changes,
ensuring the lockfile and virtual environment stay consistent.
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.

6 participants