ci: Run RuboCop serially to avoid JRuby thread-parallel failures - #424
Merged
Conversation
Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
@cursor review |
kinyoklion
marked this pull request as ready for review
August 27, 2026 16:35
keelerm84
approved these changes
Aug 27, 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.
Run RuboCop serially, mirroring launchdarkly/openfeature-ruby-server#34, because
--parallelis broken under JRuby as of RuboCop 1.90.0.checkcomposite action runs onjruby-9.4, and the gemspec'srubocop "~> 1.76"floats to 1.90.0 (released 2026-08-24), so this repo is exposed to the same failureRequirements
Related issues
launchdarkly/openfeature-ruby-server#34
Implementation details
Root cause (from the investigation in openfeature-ruby-server#34)
Under JRuby the
parallelgem cannot fork, so it runs work in threads instead of worker processes. RuboCop 1.90 began preserving cop instances across files, andRuboCop::Cop::Basedocuments the assumption that each--parallelworker is its own process with its own cop instances. With threads that assumption breaks: reused cop instances see concurrentprocessed_sourcevalues, producing internal cop errors and phantom offenses with mismatched locations. The mechanism is a reading of the RuboCop source, not an upstream-confirmed diagnosis.Verified there (JRuby 10.0.4/10.0.6/10.1.1 with RuboCop 1.90.0:
--parallelfails, serial clean; RuboCop 1.89.0: both clean), so no JRuby upgrade avoids it and pinning RuboCop only defers it.Scope
Only
.github/actions/check/action.ymlchanges; that action is used byci.yml,build-gem.yml,release-please.yml, and the manual publish workflows, so all of them pick up the serial run.Alternatives considered
rubocopto~> 1.89.0: hides the problem and freezes lint at an old version.Link to Devin session: https://app.devin.ai/sessions/feaff386987f4b3db39becb95bce9fa4
Open in Devin Desktop: https://app.devin.ai/desktop/session/feaff386987f4b3db39becb95bce9fa4?variant=devin
Requested by: @kinyoklion
Note
Overview
The shared Quality control checks composite action (
.github/actions/check/action.yml) now runsbundle exec rubocopwithout--parallel, so RuboCop executes serially on every workflow that uses this action (CI, gem build, release, etc.).This avoids JRuby CI failures introduced with RuboCop 1.90, where thread-based “parallel” workers reuse cop instances and trigger internal errors and bogus offenses; serial execution matches the fix used in launchdarkly/openfeature-ruby-server#34.
Reviewed by Cursor Bugbot for commit 8b0080f. Bugbot is set up for automated code reviews on this repo. Configure here.