Skip to content

fix(ci): keep uv.lock self-version entry in lockstep with pyproject.toml#4

Merged
igorlg merged 1 commit into
mainfrom
fix/release-please-uv-lock-sync
May 22, 2026
Merged

fix(ci): keep uv.lock self-version entry in lockstep with pyproject.toml#4
igorlg merged 1 commit into
mainfrom
fix/release-please-uv-lock-sync

Conversation

@igorlg

@igorlg igorlg commented May 22, 2026

Copy link
Copy Markdown
Owner

Why

Release PR #2 fails CI because release-please bumped pyproject.toml
0.1.0 → 0.1.1 but uv.lock's cfn-lint-cfn-handler self-version entry
stayed at 0.1.0. Our CI runs uv sync --locked, which rejects the drift.

The lockfile at `uv.lock` needs to be updated, but `--locked` was provided.

The bootstrap doc §5 specifically warned about this and prescribed the
extra-files block, which I missed in the bootstrap PR. Same root cause +
same fix as the sibling cfn-handler.

What

Add extra-files to release-please-config.json so release-please
updates the matching uv.lock entry on every version bump.

The .value in the jsonpath is essential — release-please's
GenericToml updater walks an internal AST where string nodes are
{value, kind} objects, not bare strings. The bare
name == 'cfn-lint-cfn-handler' does not match. See
googleapis/release-please#2455
for upstream context; PR #2693
proposes to make the bare form work, but until it lands the .value
workaround is what we have.

What happens after merge

Release-please re-runs on the merge to main, recomputes PR #2's
branch with the matching uv.lock bump, force-pushes the branch, CI
re-runs on PR #2, goes green. Then PR #2 is mergeable and ships
v0.1.1 to PyPI.

Follow-up

Bootstrap doc §9 told us to skip cfn-handler's tests/release-please/
local validator for v0.1.0 (YAGNI). This bug is exactly the kind that
validator catches. Worth porting over before the next release adds
non-trivial release-please complexity.

release-please's first release PR (#2) failed CI because pyproject.toml
got bumped to 0.1.1 while uv.lock's `cfn-lint-cfn-handler` self-version
entry stayed at 0.1.0. Our CI uses `uv sync --locked`, which rejects the
drift.

Same root cause + same fix as cfn-handler. The `extra-files` block tells
release-please to update uv.lock alongside pyproject.toml on every bump.

The `.value` in the jsonpath is essential — release-please's GenericToml
updater navigates an internal AST where string nodes are
`{value, kind}` objects, not bare strings. The bare form
`name == 'cfn-lint-cfn-handler'` does NOT match
(see googleapis/release-please#2455 for upstream context).

Once this lands on main, release-please will re-update PR #2's branch
with the matching uv.lock bump and CI on that PR will go green.
@igorlg igorlg merged commit 0c14f44 into main May 22, 2026
11 checks passed
@igorlg igorlg deleted the fix/release-please-uv-lock-sync branch May 22, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant