(MODULES-11710) Add Puppet 9 support - #1482
Conversation
600bcf7 to
aa6accf
Compare
shubhamshinde360
left a comment
There was a problem hiding this comment.
LGTM. Holding merge till get the puppet_litmus and puppetlabs_spec_helper gems released.
| gem "deep_merge", '~> 1.2.2', require: false | ||
| gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false | ||
| if puppet9_stream | ||
| gem "voxpupuli-puppet-lint-plugins", '~> 7.0', require: false |
There was a problem hiding this comment.
Doing different linting based on the puppet version just feels wrong. IMO this needs to be cleaned up before it's merged
| { | ||
| "operatingsystem": "RedHat", | ||
| "operatingsystemrelease": [ | ||
| "7", |
There was a problem hiding this comment.
Please tell me you don't plan to drop operating systems and don't even mention it in the PR title
There was a problem hiding this comment.
Will address this in separate PR. Thanks.
| "requirements": [ | ||
| { | ||
| "name": "puppet", | ||
| "version_requirement": ">= 8.0.0 < 9.0.0" |
There was a problem hiding this comment.
IMO it's wrong to bump this when there is no version 9 available yet. We simply don't know if it will be compatible
There was a problem hiding this comment.
With this PR we are testing against internal Puppet 9 version.
There was a problem hiding this comment.
That's fine for testing, but IMO it shouldn't be merged before public/official releases are available.
| # JSON.pretty_generate's formatting of empty arrays/hashes changed between json gem | ||
| # versions (older gems emit "[\n\n]"/"{\n}", newer ones emit the compact "[]"/"{}"), so | ||
| # assert against whatever the loaded json gem actually produces rather than a fixed string. | ||
| it { is_expected.to run.with_params([]).and_return("#{JSON.pretty_generate([])}\n") } |
There was a problem hiding this comment.
What's this test worth if it matches the implementation exactly?
d5de00f to
2dcc44f
Compare
The base branch was changed.
| # between puppet-lint-strict_indent-check 3.x (Puppet 7/8 lane, Ruby 3.1) and 5.x | ||
| # (Puppet 9 lane, Ruby 3.4+): the two lanes demand opposite indentation for nested | ||
| # hashes, so no single manifest layout can satisfy both. See MODULES-11710. | ||
| PuppetLint.configuration.send('disable_strict_indent') |
There was a problem hiding this comment.
IMO this is bad. The plugin is important and you should use the latest version, even on Puppet 8.
cf16fd0 to
ed9f1e8
Compare
ed9f1e8 to
948780a
Compare
Widens the puppet requirement to admit 9.0.x. Follows the current puppetlabs-stdlib#1482 pattern: voxpupuli-puppet-lint-plugins and puppetlabs_spec_helper are bumped unconditionally (no per-lane version split), since puppet-lint 7.0 (Ruby >= 3.2) is used across both the Puppet 7/8 and Puppet 9 lanes. puppetlabs_spec_helper is pinned to its git main branch until puppet-lint 5.x support ships in a release (puppetlabs/puppetlabs_spec_helper#485, merged but unreleased). ci.yml and mend.yml bump ruby_version to 3.2 to match, and Acceptance/ mend point at a temporary cat-github-actions branch (MODULES-11710-ruby-version-input) that adds a ruby_version input to module_acceptance.yml/mend_ruby.yml — both hardcode Ruby 3.1 otherwise, which can't resolve the new Gemfile. Swap back to @main once that branch merges. The puppet/facter gem source resolution is unchanged: Puppet 9 (8.99.x) prereleases are fetched via PUPPET_GEM_SOURCE, falling back to the existing puppetcore source when unset. This module's manifests already comply with puppet-lint-strict_indent- check 5.x, so no Rakefile change is needed (unlike the stdlib PR's earlier iteration) — verified locally with `rake lint` on Ruby 3.2. This branch intentionally does not touch operatingsystem_support; that work is split into a separate PR (OS add/drop, mirroring the same fleet-wide rollout) to keep pre-existing, separately-tracked provisioning issues (CAT-2152, CAT-2511) off this PR. Ref: puppetlabs/puppetlabs-stdlib#1482 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
4fe4368 to
800bf93
Compare
Bumps the puppet version_requirement to < 10.0.0, drops EOL platforms Puppet 8/9 don't ship agents for (EL7 family, CentOS 8, Debian 10, SLES 12, Ubuntu 18.04), gates lint tooling (voxpupuli-puppet-lint-plugins, puppetlabs_spec_helper, puppet_litmus) and the puppet/facter gem source behind a Puppet 9 (8.99.x) stream check in the Gemfile, disables the strict_indent lint check whose rules conflict between the two plugin versions, and wires ci.yml to the companion branches needed for the Puppet 9 spec/acceptance lanes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
800bf93 to
9b1582f
Compare
Puppet 9 ships no agent build for redhat-7, sles-12, debian-10, ubuntu-18.04, or ubuntu-20.04 — confirmed by CI (all five failed acceptance only on the puppetcore9-nightly collection). Adds --collection-platform-exclude 9:<platform> for each so they stay in the Puppet 8 acceptance lane while dropping out of Puppet 9, instead of failing there. That flag needs puppet_litmus's unreleased --collection-platform- exclude support for matrix_from_metadata_v3 (merged to main in puppetlabs/puppet_litmus#627, not yet in a release — latest is v2.7.0), so the Gemfile now pins puppet_litmus to its git main branch whenever PUPPET_FORGE_TOKEN is set (i.e. in CI), matching the current puppetlabs-stdlib#1482 pattern. Ref: puppetlabs/puppetlabs-stdlib#1482 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ease range puppetlabs_spec_helper (released and main) still pins puppet-syntax ~> 4.1, which requires puppet < 9. Puppet 9 is currently only available as 8.99.x prereleases, so a loose CI constraint like '~> 9.0' asked bundler for a real >= 9.0.0 gem and conflicted with that pin. Mirror stdlib's workaround (puppetlabs/puppetlabs-stdlib#1482): remap loose 8.99/9-ish constraints to '>= 8.99.0.a', '< 9' so they resolve within the prerelease range instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- metadata.json: bump the puppet version_requirement upper bound from
< 9.0.0 to < 10.0.0.
- ci.yml: exclude EOL platforms (EL7 family, CentOS 8, SLES 12,
Debian 10) from the Puppet 9 acceptance lane only, since Puppet 9
ships no agent for them. They remain supported for Puppet 8. Also
install libcurl dev headers for the Spec job, needed to build the
patron native extension pulled in transitively below.
- Gemfile:
- temporarily point puppet_litmus at main, since
--collection-platform-exclude support (puppetlabs/puppet_litmus#627)
hasn't shipped in a release yet.
- remap loose Puppet 9 constraints (e.g. '~> 9.0') to the actual
8.99.x prerelease range ('>= 8.99.0.a', '< 9'), served from the
source in PUPPET_GEM_SOURCE, since puppetlabs_spec_helper's
puppet-syntax pin still requires puppet < 9.
Ref: puppetlabs/puppetlabs-stdlib#1482
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- metadata.json: bump the puppet version_requirement upper bound from
< 9.0.0 to < 10.0.0.
- ci.yml:
- exclude EOL platforms (EL7 family, CentOS 8, SLES 12, Debian 10)
from the Puppet 9 acceptance lane only, since Puppet 9 ships no
agent for them. They remain supported for Puppet 8.
- install libcurl dev headers for the Spec job, needed to build the
patron native extension pulled in transitively via puppet_litmus.
- bump ruby_version to 3.2 for the Spec job, required by the
voxpupuli-puppet-lint-plugins bump below.
- Gemfile:
- temporarily point puppet_litmus at main, since
--collection-platform-exclude support (puppetlabs/puppet_litmus#627)
hasn't shipped in a release yet.
- remap loose Puppet 9 constraints (e.g. '~> 9.0') to the actual
8.99.x prerelease range ('>= 8.99.0.a', '< 9'), served from the
source in PUPPET_GEM_SOURCE, since puppetlabs_spec_helper's
puppet-syntax pin still requires puppet < 9.
- bump voxpupuli-puppet-lint-plugins to ~> 7.0, since puppet-lint 4.x
crashes under Ruby 4.0 (used for the Puppet 9 lane).
- temporarily point puppetlabs_spec_helper at main, since the
puppet-lint ~> 5.1 needed by the bump above
(puppetlabs/puppetlabs_spec_helper#485) hasn't shipped in a
release yet.
Ref: puppetlabs/puppetlabs-stdlib#1482
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- metadata.json: bump the puppet version_requirement upper bound from
< 9.0.0 to < 10.0.0.
- ci.yml:
- exclude EOL platforms (EL7 family, CentOS 8, SLES 12, Debian 10)
from the Puppet 9 acceptance lane only, since Puppet 9 ships no
agent for them. They remain supported for Puppet 8.
- install libcurl dev headers for the Spec job, needed to build the
patron native extension pulled in transitively via puppet_litmus.
- bump ruby_version to 3.2 for the Spec job, required by the
voxpupuli-puppet-lint-plugins bump below.
- Gemfile:
- temporarily point puppet_litmus at main, since
--collection-platform-exclude support (puppetlabs/puppet_litmus#627)
hasn't shipped in a release yet.
- remap loose Puppet 9 constraints (e.g. '~> 9.0') to the actual
8.99.x prerelease range ('>= 8.99.0.a', '< 9'), served from the
source in PUPPET_GEM_SOURCE, since puppetlabs_spec_helper's
puppet-syntax pin still requires puppet < 9.
- bump voxpupuli-puppet-lint-plugins to ~> 7.0, since puppet-lint 4.x
crashes under Ruby 4.0 (used for the Puppet 9 lane).
- temporarily point puppetlabs_spec_helper at main, since the
puppet-lint ~> 5.1 needed by the bump above
(puppetlabs/puppetlabs_spec_helper#485) hasn't shipped in a
release yet.
- plans/init.pp: fix indentation flagged by the newer puppet-lint's
strict_indent check (pre-existing style drift the older linter
didn't catch).
Ref: puppetlabs/puppetlabs-stdlib#1482
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- metadata.json: bump the puppet version_requirement upper bound from
< 9.0.0 to < 10.0.0.
- ci.yml:
- exclude EOL platforms (EL7 family, CentOS 8, SLES 12, Debian 10)
from the Puppet 9 acceptance lane only, since Puppet 9 ships no
agent for them. They remain supported for Puppet 8.
- install libcurl dev headers for the Spec job, needed to build the
patron native extension pulled in transitively via puppet_litmus.
- bump ruby_version to 3.2 for the Spec job, required by the
voxpupuli-puppet-lint-plugins bump below.
- Gemfile:
- temporarily point puppet_litmus at main, since
--collection-platform-exclude support (puppetlabs/puppet_litmus#627)
hasn't shipped in a release yet.
- remap loose Puppet 9 constraints (e.g. '~> 9.0') to the actual
8.99.x prerelease range ('>= 8.99.0.a', '< 9'), served from the
source in PUPPET_GEM_SOURCE, since puppetlabs_spec_helper's
puppet-syntax pin still requires puppet < 9.
- bump voxpupuli-puppet-lint-plugins to ~> 7.0, since puppet-lint 4.x
crashes under Ruby 4.0 (used for the Puppet 9 lane).
- temporarily point puppetlabs_spec_helper at main, since the
puppet-lint ~> 5.1 needed by the bump above
(puppetlabs/puppetlabs_spec_helper#485) hasn't shipped in a
release yet.
- plans/init.pp: fix indentation flagged by the newer puppet-lint's
strict_indent check (pre-existing style drift the older linter
didn't catch).
Ref: puppetlabs/puppetlabs-stdlib#1482
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- metadata.json: bump the puppet version_requirement upper bound from
< 9.0.0 to < 10.0.0.
- ci.yml:
- exclude EOL platforms (EL7 family, CentOS 8, SLES 12, Debian 10)
from the Puppet 9 acceptance lane only, since Puppet 9 ships no
agent for them. They remain supported for Puppet 8.
- install libcurl dev headers for the Spec job, needed to build the
patron native extension pulled in transitively via puppet_litmus.
- bump ruby_version to 3.2 for both the Spec and Acceptance jobs,
required by the voxpupuli-puppet-lint-plugins bump below.
- Gemfile:
- temporarily point puppet_litmus at main, since
--collection-platform-exclude support (puppetlabs/puppet_litmus#627)
hasn't shipped in a release yet.
- remap loose Puppet 9 constraints (e.g. '~> 9.0') to the actual
8.99.x prerelease range ('>= 8.99.0.a', '< 9'), served from the
source in PUPPET_GEM_SOURCE, since puppetlabs_spec_helper's
puppet-syntax pin still requires puppet < 9.
- bump voxpupuli-puppet-lint-plugins to ~> 7.0, since puppet-lint 4.x
crashes under Ruby 4.0 (used for the Puppet 9 lane).
- temporarily point puppetlabs_spec_helper at main, since the
puppet-lint ~> 5.1 needed by the bump above
(puppetlabs/puppetlabs_spec_helper#485) hasn't shipped in a
release yet.
- plans/init.pp: fix indentation flagged by the newer puppet-lint's
strict_indent check (pre-existing style drift the older linter
didn't catch).
Ref: puppetlabs/puppetlabs-stdlib#1482
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- metadata.json: bump the puppet version_requirement upper bound from
< 9.0.0 to < 10.0.0.
- ci.yml:
- exclude EOL platforms (EL7 family, CentOS 8, SLES 12, Debian 10)
from the Puppet 9 acceptance lane only, since Puppet 9 ships no
agent for them. They remain supported for Puppet 8.
- exclude scientific-7 from every acceptance lane: Scientific
Linux's upstream package mirrors are gone (discontinued distro),
so provisioning it 404s regardless of Puppet version.
- install libcurl dev headers for the Spec job, needed to build the
patron native extension pulled in transitively via puppet_litmus.
- bump ruby_version to 3.2 for both the Spec and Acceptance jobs,
required by the voxpupuli-puppet-lint-plugins bump below.
- Gemfile:
- temporarily point puppet_litmus at main, since
--collection-platform-exclude support (puppetlabs/puppet_litmus#627)
hasn't shipped in a release yet.
- remap loose Puppet 9 constraints (e.g. '~> 9.0') to the actual
8.99.x prerelease range ('>= 8.99.0.a', '< 9'), served from the
source in PUPPET_GEM_SOURCE, since puppetlabs_spec_helper's
puppet-syntax pin still requires puppet < 9.
- bump voxpupuli-puppet-lint-plugins to ~> 7.0, since puppet-lint 4.x
crashes under Ruby 4.0 (used for the Puppet 9 lane).
- temporarily point puppetlabs_spec_helper at main, since the
puppet-lint ~> 5.1 needed by the bump above
(puppetlabs/puppetlabs_spec_helper#485) hasn't shipped in a
release yet.
- plans/init.pp: fix indentation flagged by the newer puppet-lint's
strict_indent check (pre-existing style drift the older linter
didn't catch).
Ref: puppetlabs/puppetlabs-stdlib#1482
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
Adds Puppet 9 support to
puppetlabs-stdlib, following the same pattern established in puppetlabs-apache#2638 (MODULES-11700).Jira: MODULES-11710
What's included
metadata.json: raises the Puppet upper bound (< 9.0.0→< 10.0.0) and drops EOL platforms that Puppet 8/9 don't ship agents for (EL7 family, CentOS 8, Debian 10, SLES 12, Ubuntu 18.04).Gemfile): the Puppet 9 lane runs on Ruby 3.4+, where puppet-lint 4.x crashes; the Puppet 7/8 lane runs on Ruby 3.1, wherevoxpupuli-puppet-lint-plugins ~> 7.0won't resolve. Gated behind apuppet9_streamcheck derived fromPUPPET_GEM_VERSION, keeping released tooling on 7/8.strict_indentdisabled (Rakefile):puppet-lint-strict_indent-checkdemands opposite indentation between the 3.x (7/8) and 5.x (9) plugin versions, so no single manifest layout passes both lanes.Gemfile): the 8.99.x prerelease is fetched viaPUPPET_GEM_SOURCE(internal Artifactory), reachable over Twingate in CI.ci.yml: Spec job points at thecat-github-actionsbranch that wiresPUPPET_GEM_SOURCE/Twingate for the Puppet 9 lane; Acceptance flags gain--collection-platform-exclude 9:ubuntu-20.04(Focal has no Puppet 9 agent).Dependencies
Like the Apache PR, this temporarily pins two companion branches; both should revert to released refs once merged:
--collection-platform-excludetomatrix_from_metadata_v3(Gemfile pins the branch).PUPPET_GEM_SOURCE+ Twingate for the Puppet 9 spec lane (ci.ymlSpec pins the branch).Testing
bundle exec rake lintclean on Ruby 3.1 (Puppet 7/8 lane, current tooling).bundle exec metadata-json-lint metadata.jsonclean.on_supported_os-driven specs correctly reflect the trimmed OS matrix.🤖 Generated with Claude Code