ci: keep uv.lock in sync on the release-please branch - #231
Conversation
985561b to
e113750
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e113750. Configure here.
| sync-lockfile: | ||
| name: Sync uv.lock | ||
| needs: release-please | ||
| if: ${{ needs.release-please.outputs.prs_created == 'true' }} |
There was a problem hiding this comment.
Lock sync skipped after PR updates
High Severity
The sync-lockfile job only runs when prs_created is true, but that output stays false when release-please updates an existing release PR. Those updates rebuild the branch from main and drop any prior uv.lock sync commit, so the lockfile drifts again before merge and uv sync --locked fails on main.
Reviewed by Cursor Bugbot for commit e113750. Configure here.
|
I found this open request for native "extra-files": [
{
"type": "toml",
"path": "uv.lock",
"jsonpath": "$.package[?(@.name.value=='polymarket-client')].version"
}
]Would that approach work here and let us avoid the additional workflow job? |
Yes, way more clean, closing in favor of #255 |


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). It bit again while this PR was open: 0.4.0 merged with a stale lock, which is failing CI onmainright now and broke the 0.4.0 API reference upload. This PR carries that lock sync too (regenerated with current uv, which also normalizes some sphinx markers written by an older uv), so merging it healsmain.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 changes with scoped
contents: writeon the release branch; publish is intentionally decoupled from lockfile sync.Overview
Automates
uv.lockupdates on release PRs so version bumps from release-please no longer leavemainfailinguv sync --lockeduntil someone regenerates the lockfile manually.The Release Please workflow now uses a concurrency group, exposes
prs_createdfrom the release step, and adds async-lockfilejob that runs when a release PR is created. That job checks out therelease-please--branches--main--components--polymarket-clientbranch, runsuv lock, and commits/pushes only ifuv.lockchanged.publishstill depends only onrelease-please, so a sync failure cannot block PyPI publish.The
uv.lockdiff reflects the intended outcome: workspace package version 0.3.0 → 0.4.0 plus lockfile normalization (e.g. Sphinx dependency markers) from a fulluv lockrewrite.Reviewed by Cursor Bugbot for commit e113750. Bugbot is set up for automated code reviews on this repo. Configure here.