Repository navigation
Fail the release when uv.lock is behind the latest releases - #68
Merged
Merged
Conversation
A release could ship or test against whatever uv.lock held, even when newer releases allowed by pyproject.toml existed. - Add a release workflow step that runs `uv lock --upgrade --dry-run` and fails unless uv reports no lockfile changes - Document the same check in the pre-tag steps in AGENTS.md Amp-Thread-ID: https://ampcode.com/threads/T-01a1ca38-20a5-7436-a7ae-1f2bce712489 Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The release workflow now stops before building when
uv.lockis behind the latest releases thatpyproject.tomlallows.What changes
Validate lockfile freshnessstep inrelease.yml, right afterValidate release inputs. It runsuv lock --upgrade --refresh --dry-runand fails unless uv printsNo lockfile changes detected.AGENTS.md, so a stale lock is caught before a tag is pushed.The workflow only reads the lock; it never edits
uv.lock.Things to know
maintoday. Merge a lock file maintenance PR first (see the Renovate coverage PR).ruff, not only what ships.main, then use the next patch number, or move the tag with approval.pyproject.toml. A new major release outside a range still needs a Renovate PR.validate.yml, so PR CI does not break when an upstream package releases.Testing
The release workflow only runs on tags, so CI on this PR does not exercise the step. I ran the step's script locally with uv 0.11.7 (the pinned version) under
bash -eo pipefail:uv lock --upgrade: printsNo lockfile changes detectedand exits 0.uvthat errors out: exits 1.actionlintand markdownlint are clean.