ci: keep uv.lock in sync on the release-please branch - #231
Open
kartojal wants to merge 2 commits into
Open
Conversation
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.
Every release-please merge bumps the version in
pyproject.tomlbut leavesuv.lockrecording the previous one, souv sync --lockedfails Static Checks onmainuntil someone regenerates the lockfile by hand (done manually after 0.1.0, 0.2.0 (#207), and 0.3.0).Fix: a
sync-lockfilejob runs after release-please, checks out the release PR branch, runsuv lock, and commits the result, so the release PR merges self-contained. A workflow step instead of release-pleaseextra-filesbecauseuv lockrewrites the lockfile wholesale (anx-release-please-versionannotation would not survive) and the toml updater would need a fragile jsonpath into the[[package]]array. The commit step no-ops when the lock is already current, andpublishdoes not depend on this job, so a sync failure can never block a publish.Release-please also writes semver-style prerelease versions (
0.3.0-b2) intopyproject.toml, and the__version__fallback insrc/polymarket/version.pyis not updated at all, which is the other half of the recurringrelease: canonicalize python beta versioncommits. Worth its own ticket rather than bundling it here.Closes DEV-483
Note
Low Risk
CI-only workflow changes with no runtime or auth impact; publish remains decoupled from lockfile sync.
Overview
Fixes
uv sync --lockedfailures onmainafter release-please bumpspyproject.tomlwithout updatinguv.lock.The Release Please workflow now uses a concurrency group and exposes
prs_created. When a release PR is opened, a newsync-lockfilejob checks out the release-please branch forpolymarket-client, runsuv lock, and pushes a commit only if the lockfile changed. Publish to PyPI still depends only onrelease-pleaseandreleases_created, so a lock sync failure cannot block publishing.Reviewed by Cursor Bugbot for commit 985561b. Bugbot is set up for automated code reviews on this repo. Configure here.