Repository navigation
fix: regenerate Gemfile.lock on the release PR after version bumps - #322
Merged
Merged
Conversation
release-please's ruby strategy only bumps version.rb and CHANGELOG.md,
not this lockfile -- so every release PR leaves Gemfile.lock pinning
the old version for this repo's own path gemspec, which fails CI under
frozen mode ("gemspecs for path gems changed, but the lockfile can't be
updated"). The old semantic-release flow avoided this by unfreezing
Bundler and committing a regenerated lockfile alongside the version
bump in one atomic push (e.g. ea4df19); release-please has no
equivalent hook, so this replicates that step directly onto the
release PR's branch after release-please-action runs.
Verified locally with the same Bundler version ruby/setup-ruby would
install (2.6.6, from Gemfile.lock's BUNDLED WITH): bumping version.rb
and running `bundle lock` unfrozen only touches the one
apollo-federation (X.Y.Z) line, matching every historical release
commit's diff exactly.
fuzzyrichie
force-pushed
the
rd/gitignore-gemfile-lock
branch
from
September 30, 2026 20:02
a2b895c to
bb13e15
Compare
swcollard
approved these changes
Sep 30, 2026
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.
Summary
PR #319 (release-please's own generated release PR) is failing CI:
Root cause: release-please's
rubyrelease strategy only bumpslib/apollo-federation/version.rb(our configuredversion-file) andCHANGELOG.md— it has no Bundler awareness, so it never touchesGemfile.lock. That leaves the checked-in lockfile still pinning the old version for this repo's own self-referencing path gemspec (gemspec path: '..'in theGemfile), which is a hard error under the frozen moderuby/setup-ruby@v1enforces in CI.This never surfaced under the old semantic-release flow because that job explicitly unfroze Bundler (
bundle config set --local frozen false) and committed a regeneratedGemfile.lockatomically alongside the version bump in the same direct-push commit — e.g.ea4df19(chore(release): 3.10.3) touchedCHANGELOG.md+Gemfile.lock+version.rbtogether, and the diff was a single line (just the pinned version). release-please has no equivalent hook for this.(Earlier revision of this PR tried removing
Gemfile.lockfrom version control entirely — reverted, since that let other transitive dependencies (json) resolve to newer versions incompatible with the pinnedgraphql ~> 2.0.0in the main Gemfile, breaking tests that were passing under the frozen lockfile. Keeping the lockfile and fixing it properly is the safer path.)Fix: added steps to the
release-pleasejob that, wheneverrelease-please-actioncreates/updates a release PR, check out that PR's branch, unfreeze Bundler, runbundle lock, and commit+push the result back onto the PR — directly replicating what the old semantic-release job did.Verified locally with the same Bundler version
ruby/setup-rubywould install (2.6.6, read fromGemfile.lock'sBUNDLED WITH): bumpingversion.rband runningbundle lockunfrozen only touches the oneapollo-federation (X.Y.Z)line, matching every historical release commit's diff exactly.Test plan
bundle lock(unfrozen, matching Bundler version) only updates the one pinned-version line