Repository navigation
Conversation
Add a puppet_versions input (JSON list, default '["8"]') to the nightly and released unit test workflows. Puppet 8 continues to run on Ruby 3.1; later versions run on Ruby 4.0. Defaulting to Puppet 8 keeps existing callers' jobs and check names unchanged, unlike the earlier attempt that added Puppet 9 to every caller and broke modules still pinned to puppetlabs_spec_helper 8. For Puppet 9+ nightly on Windows, use the published x64-mingw-ucrt gem instead of the universal gem plus pinned ffi workaround. Add a ruby_version input (default '3.3') to the static code analysis workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Install libcurl development files on Linux for Puppet 9+. Under Ruby 4, Bundler can resolve a faraday version that depends on patron, whose native extension needs them. static_code_analysis.yaml already does this. In the nightly workflow, GEM_SOURCE was only set for the bundler step. The Gemfile uses it as its source, so `bundle exec` in the test step saw a different source than `bundle update` resolved against and re-resolved. Under the Bundler shipped with Ruby 4, that re-resolution fails with a lockfile platform error. Set GEM_SOURCE for the whole job. Move PUPPET_GEM_VERSION to the job as well, for consistency and to drop the per-OS env_set_cmd syntax. This applies to Puppet 8 nightly jobs too: their test step now sees the same GEM_SOURCE and PUPPET_GEM_VERSION as their bundler step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set PUPPET_GEM_VERSION to "~> <major>.0" for each job. Without it, a dependency conflict on Windows made Bundler silently resolve Puppet 8 in the Puppet 9 job. Puppet 8 jobs already resolve 8.x on Ruby 3.1, so this doesn't change existing callers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Lets callers opt into Puppet 9 unit tests on Ruby 4.0 without changing anything for existing Puppet 8 callers.
puppet_versionsinput (JSON list, default'["8"]') on both unit test workflows. Puppet 8 runs on Ruby 3.1; later versions run on Ruby 4.0. Job and check names for Puppet 8 are unchanged. The earlier attempt ((maint) Add Puppet 9 unit test matrix #45, reverted in Revert "(maint) Add Puppet 9 unit test matrix" #46) added Puppet 9 for every caller, which broke modules still pinned topuppetlabs_spec_helper8.ruby_versioninput (default'3.3') onstatic_code_analysis.yaml.x64-mingw-ucrtgem instead of the universal gem plus pinnedffiworkaround.patron.static_code_analysis.yamlalready installs these.GEM_SOURCEandPUPPET_GEM_VERSIONset for the whole job.GEM_SOURCEwas only set on the bundler step, sobundle execin the test step saw a different Gemfile source and re-resolved. That fails under Ruby 4's Bundler with a lockfile platform error. This also applies to Puppet 8 nightly jobs.PUPPET_GEM_VERSIONpinned to~> <major>.0. Without it, a dependency conflict on Windows made Bundler silently install Puppet 8.13 in the Puppet 9 job.Usage
Testing
Run against
puppetlabs-puppet_agentviaworkflow_dispatch:PA-9451/main/puppet9-unit-test-deps): all 5 unit test jobs passed (run), and static analysis on Ruby 4.0 passed (run). Logs show Puppet 9.1.0 (released) and the Puppet 9 nightly gem in use, including on Windows.mainpointed at this branch, default inputs): all unit test and daily nightly jobs passed with unchanged check names (unit, daily).Other callers' Gemfiles were checked: all read
PUPPET_GEM_VERSIONvialocation_for(mailalias_coreignores it whenPUPPET_FORGE_TOKENis set), so the~> 8.0pin resolves the same Puppet 8 they get today.🤖 Generated with Claude Code