Skip to content

ci: Pin Bundler to 4.0.6 in RuboCop workflow as workaround for ruby/rubygems#9536#290

Merged
yahonda merged 1 commit into
rsim:masterfrom
yahonda:pin-bundler-4.0.6
May 12, 2026
Merged

ci: Pin Bundler to 4.0.6 in RuboCop workflow as workaround for ruby/rubygems#9536#290
yahonda merged 1 commit into
rsim:masterfrom
yahonda:pin-bundler-4.0.6

Conversation

@yahonda
Copy link
Copy Markdown
Collaborator

@yahonda yahonda commented May 12, 2026

Summary

The RuboCop workflow started failing on master at 2026-05-12T01:01 UTC (run 25706708602). With Ruby 4.0.4 (Bundler 4.0.11 bundled), BUNDLE_ONLY=rubocop bundle install fails to resolve this Gemfile against the multi-gemspec git source rails/rails whose top-level gem is in a filtered-out group, aborting with:

Could not find compatible versions

Bundler 4.0.5 and 4.0.6 succeed; 4.0.7 through 4.0.11 fail. The upstream Bundler regression is tracked in ruby/rubygems#9536.

Pin Bundler explicitly so the workflow keeps rolling on ruby-version: "4.0":

  • set BUNDLER_VERSION=4.0.6 at the job level so every bundle invocation in the workflow resolves to that version
  • gem install bundler -v 4.0.6 so the version is actually present in the Ruby image (the ruby-builder tarball ships only one Bundler; current 4.0.x tarballs no longer ship 4.0.6)

Once Bundler ships a fix for ruby/rubygems#9536, drop `BUNDLER_VERSION` and the install step.

Mirrors rsim/oracle-enhanced#2767.

Test plan

  • Watch this PR's `RuboCop` workflow run and confirm it succeeds.

…ubygems#9536

The RuboCop workflow started failing on master at 2026-05-12T01:01 UTC with:

    Could not find compatible versions

against the multi-gemspec git source `rails/rails` whose top-level gem is in
a filtered-out group when `BUNDLE_ONLY=rubocop bundle install` runs under
Ruby 4.0.4 (Bundler 4.0.11). The regression is tracked in
ruby/rubygems#9536; Bundler 4.0.5 and 4.0.6 succeed while 4.0.7+ fail.

Pin Bundler explicitly so the workflow keeps rolling on `ruby-version: "4.0"`:

- set BUNDLER_VERSION=4.0.6 at the job level so every bundle invocation
  resolves to that version
- gem install bundler -v 4.0.6 so the version is actually present (the
  ruby-builder tarball ships only one Bundler, and current 4.0.x tarballs
  no longer ship 4.0.6)

Drop both once Bundler ships a fix for ruby/rubygems#9536.
@yahonda yahonda merged commit 6f26e47 into rsim:master May 12, 2026
6 of 20 checks passed
@yahonda yahonda deleted the pin-bundler-4.0.6 branch May 12, 2026 13:40
yahonda added a commit that referenced this pull request May 20, 2026
Bundler 4.0.12 (https://blog.rubygems.org/2026/05/20/4.0.12-released.html)
includes ruby/rubygems#9544, which fixes the multi-gemspec git source
resolver regression tracked in ruby/rubygems#9536 — the bug that PR #290
worked around by pinning Bundler to 4.0.6 in the RuboCop workflow.

- Drop the BUNDLER_VERSION env var and the "Pin Bundler to 4.0.6" step
  from rubocop.yml; the workaround is no longer needed.
- Add `rubygems: latest` to the workflows that exercise modern CRuby
  (rubocop, test, test_11g, test_11g_ojdbc11), matching the pattern
  release.yml already uses, so CI resolves Bundler 4.0.12 instead of
  whatever ships in the setup-ruby tarball. setup-ruby handles JRuby
  via `gem update --system`, so JRuby matrix entries are safe.

ruby_head.yml and jruby_head.yml are intentionally left alone — per
setup-ruby docs, head builds are not updated. truffleruby.yml and
test_gemfiles.yml are also untouched (TruffleRuby compatibility, and
test_gemfiles targets Ruby 2.4–3.3 which cannot install RubyGems 4.x).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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