Skip to content

(CAT-2590) Prepare for Puppetcore 9 - #292

Merged
gavindidrichsen merged 6 commits into
mainfrom
CAT-2590-test-against-puppetcore-9
Aug 21, 2026
Merged

(CAT-2590) Prepare for Puppetcore 9#292
gavindidrichsen merged 6 commits into
mainfrom
CAT-2590-test-against-puppetcore-9

Conversation

@LukasAud

@LukasAud LukasAud commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

With the arrival of Puppetcore 9, we need to ensure that our tools are compatible with Ruby 4.

  • The Gemfile's PUPPET_FORGE_TOKEN puppetcore-source branch was hardcoded to puppet ~> 8.11 / facter ~> 4.11, so it would keep testing 8.x indefinitely even once a Puppet 9 lane exists. This now respects PUPPET_GEM_VERSION/FACTER_GEM_VERSION (set per-lane by the shared module_ci.yml matrix) instead of a fixed pin, and also checks PUPPET_FORGE_TOKEN_PUBLIC (the secret name actually used in this repo) alongside PUPPET_FORGE_TOKEN.
  • Raised the puppet version upper bound in metadata.json from < 9.0.0 to < 10.0.0 so matrix_from_metadata_v3 picks up a Puppet 9 test lane.

Same initiative as rspec-puppet#136, adapted to this module's existing Gemfile pattern.

Checklist

  • 🟢 Spec tests.
  • Manually verified.

@LukasAud
LukasAud requested a review from a team as a code owner August 12, 2026 11:43
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
LukasAud force-pushed the CAT-2590-test-against-puppetcore-9 branch from e96e47a to b27e38d Compare August 20, 2026 14:47
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
gavindidrichsen merged commit a2f6f23 into main Aug 21, 2026
5 checks passed
@gavindidrichsen
gavindidrichsen deleted the CAT-2590-test-against-puppetcore-9 branch August 21, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants