(CAT-2590) Prepare for Puppetcore 9 - #292
Merged
Merged
Conversation
With the arrival of Puppetcore 9, we need to ensure that our tools are compatible with Ruby 4. The Gemfile's puppetcore-source branch was hardcoded to puppet ~> 8.11 / facter ~> 4.11, so it would keep testing 8.x forever even once a Puppet 9 lane exists. This makes it respect PUPPET_GEM_VERSION/FACTER_GEM_VERSION instead, and checks PUPPET_FORGE_TOKEN_PUBLIC alongside PUPPET_FORGE_TOKEN. Also raises the puppet version upper bound in metadata.json so module CI picks up a Puppet 9 test lane.
The Puppet 9 lane never appeared because matrix_from_metadata_v3 derives its known collections from puppet_litmus's own bundled matrix.json, not directly from metadata.json. puppet_litmus ~> 1.0 only knows about puppet 7.24/8.0; 2.0+ adds a puppet 9.0 / ruby 4.0 collection entry, which is what actually makes the new metadata.json upper bound take effect.
puppet_litmus pulls in bolt as a transitive dependency, which otherwise resolves from rubygems.org (currently a stale 4.0.0 dragging in an old faraday/patron native-extension chain). Source it from rubygems-puppetcore.puppet.com when a forge token is present, same as puppet/facter, unconstrained so it resolves to latest.
…h on Ruby 4
puppet-lint 4.3.0's Data.tokens parses Ruby's caller() backtrace with a
regex expecting the old backtick format (`method'), which Ruby 3.4+/4.0
changed to plain quotes ('method'). The regex no longer matches, and
calling [1..-2] on the nil result raises NoMethodError, crashing the
Puppet 9 / Ruby 4 lint job on plans/agents.pp.
voxpupuli-puppet-lint-plugins ~> 5.0 only allows puppet-lint ~> 4.0.
Bumping to ~> 7.0 pulls in puppet-lint ~> 5.1, which rewrote tokens
without any caller-string parsing. Verified locally: full rake
syntax/lint/metadata_lint/rubocop suite passes clean with the bumped
gems, no new violations from the additional checks 7.0 adds.
voxpupuli-puppet-lint-plugins ~> 7.0 requires Ruby >= 3.2. Both the module_ci.yml setup_matrix job and tooling_mend_ruby.yml default their own tooling Ruby to 3.1/2.7, unrelated to the actual per-lane test Ruby versions (3.2/4.0) - so bundle install failed there before any spec lane could even run. Bumping to 3.2 doesn't change what module code gets tested; it's just the Ruby these two jobs use to bundle install / run matrix_from_metadata_v3 and the Mend scan.
LukasAud
force-pushed
the
CAT-2590-test-against-puppetcore-9
branch
from
August 20, 2026 14:47
e96e47a to
b27e38d
Compare
puppetlabs_spec_helper 9.0.0 was just released and fixes the puppet-lint/rspec-puppet chain we were blocked on (puppet-lint ~> 5.0, rspec-puppet ~> 5.0), and replaces its puppet-syntax dependency with a new puppetlabs-syntax fork (~> 7.2, allows puppet < 10 instead of < 9). Updated the Rakefile's require to match the new gem name. Removed codecov ~> 0.6 - every published version hard-caps Ruby < 4, and it's only ever referenced inside unused test fixture data, not anything this repo's own test run executes.
gavindidrichsen
approved these changes
Aug 21, 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.
With the arrival of Puppetcore 9, we need to ensure that our tools are compatible with Ruby 4.
PUPPET_FORGE_TOKENpuppetcore-source branch was hardcoded topuppet ~> 8.11/facter ~> 4.11, so it would keep testing 8.x indefinitely even once a Puppet 9 lane exists. This now respectsPUPPET_GEM_VERSION/FACTER_GEM_VERSION(set per-lane by the sharedmodule_ci.ymlmatrix) instead of a fixed pin, and also checksPUPPET_FORGE_TOKEN_PUBLIC(the secret name actually used in this repo) alongsidePUPPET_FORGE_TOKEN.metadata.jsonfrom< 9.0.0to< 10.0.0somatrix_from_metadata_v3picks up a Puppet 9 test lane.Same initiative as rspec-puppet#136, adapted to this module's existing Gemfile pattern.
Checklist