fix: isolate cookstyle to fix flaky Ruby 3.4 Windows unit-test CI - #1965
Merged
Conversation
….4 Windows CI The windows-latest + Ruby 3.4 unit test job intermittently fails during `bundle install` with a dependency resolution conflict: cookstyle requires rubocop 1.86.1, which requires unicode-display_width >= 3.0, while other transitive gems (via chef-licensing/inspec-core) require unicode-display_width < 3.0. No compatible x64-mingw-ucrt build satisfies both constraints simultaneously. cookstyle is only needed by `rake style` (run by lint.yml), not by `rake spec` (run by unit.yml). Move cookstyle out of the shared :development Gemfile group into its own :lint group, and have unit.yml exclude that group via BUNDLE_WITHOUT so the unit test job's bundle install never needs to resolve cookstyle/rubocop at all. lint.yml is unaffected since it performs a full `bundle install` with no --without flag. This work was completed with AI assistance following Progress AI policies Signed-off-by: Thomas Powell <powell@progress.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
johnmccrae
approved these changes
Aug 10, 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
The
windows-latest+ Ruby3.4unit test job (see this failing run on PR #1963) intermittently fails during theSetup rubystep with abundle installdependency resolution conflict (exit code 6), not an actual test failure:This only affects the windows + Ruby 3.4 matrix cell and is intermittent (the same branch passed this exact job earlier the same day, and
main's Ruby 3.4/windows job passed around the same time), which points to a dependency-graph conflict triggered bycookstyle'srubocoprequirement clashing with unrelated transitive gems, rather than a real Ruby 3.4 incompatibility in ohai's own code.Root Cause
cookstyleis only required by therake styletask (run bylint.yml) — it is not needed byrake spec(run byunit.yml). However it previously lived in the shared:developmentGemfile group along withrspec-*/rake, so the unit test job'sbundle installwas forced to resolvecookstyle/rubocopand their entire dependency subtree unnecessarily, exposing it to this conflict.Changes Made
cookstyleout of the shared:developmentGemfile group into its own new:lintgroup.BUNDLE_WITHOUT: lintto.github/workflows/unit.yml's test job so the unit-testbundle installskips the:lintgroup entirely..github/workflows/lint.ymlis unchanged — it performs a fullbundle installwith no--withoutflag, so it continues to installcookstyleandrake stylekeeps working as before.Testing
Gemfileparses correctly viaBundler::Dsland thatcookstylenow resolves to the:lintgroup only (all other gems unaffected)..github/workflows/unit.ymlYAML syntax.This work was completed with AI assistance following Progress AI policies.