Skip to content

fix: isolate cookstyle to fix flaky Ruby 3.4 Windows unit-test CI - #1965

Merged
tpowell-progress merged 1 commit into
mainfrom
fix-ci-ruby34-windows-cookstyle
Aug 10, 2026
Merged

fix: isolate cookstyle to fix flaky Ruby 3.4 Windows unit-test CI#1965
tpowell-progress merged 1 commit into
mainfrom
fix-ci-ruby34-windows-cookstyle

Conversation

@tpowell-progress

Copy link
Copy Markdown
Contributor

Summary

The windows-latest + Ruby 3.4 unit test job (see this failing run on PR #1963) intermittently fails during the Setup ruby step with a bundle install dependency resolution conflict (exit code 6), not an actual test failure:

Because every version of cookstyle depends on rubocop = 1.86.1
  and every version of rubocop depends on unicode-display_width >= 2.4.0, < 4.0 ...
And because unicode-display_width >= 2.4.0, < 3.0 could not be found in rubygems
repository ... for platforms (x64-mingw-ucrt) ...
Because strings >= 0.2.1 depends on unicode-display_width >= 1.5, < 3.0 ...
version solving has failed.

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 by cookstyle's rubocop requirement clashing with unrelated transitive gems, rather than a real Ruby 3.4 incompatibility in ohai's own code.

Root Cause

cookstyle is only required by the rake style task (run by lint.yml) — it is not needed by rake spec (run by unit.yml). However it previously lived in the shared :development Gemfile group along with rspec-*/rake, so the unit test job's bundle install was forced to resolve cookstyle/rubocop and their entire dependency subtree unnecessarily, exposing it to this conflict.

Changes Made

  • Moved cookstyle out of the shared :development Gemfile group into its own new :lint group.
  • Added BUNDLE_WITHOUT: lint to .github/workflows/unit.yml's test job so the unit-test bundle install skips the :lint group entirely.
  • .github/workflows/lint.yml is unchanged — it performs a full bundle install with no --without flag, so it continues to install cookstyle and rake style keeps working as before.

Testing

  • Validated Gemfile parses correctly via Bundler::Dsl and that cookstyle now resolves to the :lint group only (all other gems unaffected).
  • Validated .github/workflows/unit.yml YAML syntax.
  • No changes to test code; existing unit/lint suites are unaffected in scope.

This work was completed with AI assistance following Progress AI policies.

….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>
@tpowell-progress tpowell-progress added the ai-assisted Work completed with AI assistance following Progress AI policies label Aug 10, 2026
@tpowell-progress
tpowell-progress requested review from a team and jaymzh as code owners August 10, 2026 17:01
@tpowell-progress
tpowell-progress merged commit bb9158c into main Aug 10, 2026
66 of 68 checks passed
@tpowell-progress
tpowell-progress deleted the fix-ci-ruby34-windows-cookstyle branch August 10, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Work completed with AI assistance following Progress AI policies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants