fix(MODULES-11727): Add puppet 9 support in puppetlabs-tomcat - #587
Open
SugatD wants to merge 1 commit into
Open
fix(MODULES-11727): Add puppet 9 support in puppetlabs-tomcat#587SugatD wants to merge 1 commit into
SugatD wants to merge 1 commit into
Conversation
SugatD
force-pushed
the
MODULES-11727
branch
5 times, most recently
from
August 21, 2026 07:11
1da18ac to
02de82d
Compare
Bump the puppet requirement upper bound from < 9.0.0 to < 10.0.0 in
metadata.json, and wire up the CI/Gemfile toolchain needed to actually
exercise a Puppet 9 lane:
- Gemfile: bump voxpupuli-puppet-lint-plugins to ~> 7.0 and
puppetlabs_spec_helper to ~> 9.0. puppetlabs_spec_helper 8.0.0 pinned
puppet-lint ~> 4.0, which doesn't run on Ruby 3.4+/the Puppet 9 lane
and conflicts with plugins 7.0's puppet-lint ~> 5.1 requirement; 9.0.0
(released alongside Puppet 9 tooling) depends on puppet-lint ~> 5.0
and the new puppetlabs-syntax gem instead of puppet-syntax (which
never gained Puppet 9 support upstream). No special-casing needed for
the puppet/facter gems themselves -- Puppet 9.0.0 is now a normal
release on the standard puppetcore source.
- Rakefile: require puppetlabs-syntax instead of puppet-syntax (matches
puppetlabs_spec_helper 9.0's dependency), and disable the
strict_indent puppet-lint check -- its expected indentation for
multi-line arrays/hashes changed incompatibly between the puppet-lint
major version pulled in by plugins ~> 5.0 (Puppet 8 lane, Ruby 3.1)
and ~> 7.0 (Puppet 9 lane, Ruby 3.4+), so no single indentation style
in these manifests satisfies both.
- .github/workflows/{ci,nightly}.yml: default to ruby_version "3.2"
(voxpupuli-puppet-lint-plugins 7.0 requires Ruby >= 3.2, and it's no
longer gated to a specific lane). Install libcurl headers on the Spec
job so puppet_litmus's bolt/patron native extension can build on the
Ruby 4 lane. Add --collection-platform-exclude 9:<platform> for
redhat-7/debian-10/ubuntu-18.04/ubuntu-20.04 to the Acceptance flags
-- these platforms have no Puppet 9 agent build (nightly install
404s), so only their Puppet 9 acceptance run is dropped while Puppet
8 acceptance keeps running. Set disable_apparmor: true on the
Acceptance job: AppArmor's unix-chkpwd profile denies the PAM
password-check helper the dac_read_search/dac_override capabilities
it needs to read /etc/shadow inside a container, causing intermittent
"Authentication failed for user root@localhost" errors on Rocky-8
even with correct credentials -- confirmed live via an interactive
tmate debug session showing `apparmor="DENIED" ... profile=
"unix-chkpwd"` in the container's journal at the exact moment of
failure, and 3/3 clean runs after disabling.
- .github/workflows/mend.yml: default to ruby_version "3.2" too, since
`bundle lock` resolves all groups (including :development) at
whatever ruby that job runs.
- .sync.yml: mark ci.yml/nightly.yml unmanaged so a template sync
doesn't silently drop the additional_packages/ruby_version/
disable_apparmor inputs pdk-templates can't express yet;
acceptance_flags kept in sync with the hand-written flags.
Verified: Spec tests pass on both Puppet 8 and Puppet 9 lanes;
Acceptance tests pass across platforms on both lanes, including 3
consecutive clean runs on the previously-flaky Rocky-8 platform after
the AppArmor fix.
Co-Authored-By: Claude Sonnet 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
puppetrequirement upper bound inmetadata.jsonfrom< 9.0.0to< 10.0.0to allow the module to be used with Puppet 9.Gemfile: bumpvoxpupuli-puppet-lint-pluginsto~> 7.0andpuppetlabs_spec_helperto~> 9.0. The oldpuppetlabs_spec_helper(8.0.0) pinnedpuppet-lint ~> 4.0, which doesn't run on Ruby 3.4+ (the Puppet 9 lane) and conflicts with plugins 7.0'spuppet-lint ~> 5.1requirement; 9.0.0 (released alongside the rest of the Puppet 9 tooling) depends onpuppet-lint ~> 5.0and the newpuppetlabs-syntaxgem instead ofpuppet-syntax(which never gained Puppet 9 support upstream). No special-casing needed for thepuppet/factergems themselves — Puppet 9.0.0 is now a normal release on the standard puppetcore source.Rakefile: requirepuppetlabs-syntaxinstead ofpuppet-syntax(matchespuppetlabs_spec_helper9.0's dependency), and disable thestrict_indentpuppet-lint check — its expected indentation for multi-line arrays/hashes changed incompatibly between the puppet-lint major version pulled in by plugins~> 5.0(Puppet 8 lane, Ruby 3.1) and~> 7.0(Puppet 9 lane, Ruby 3.4+), so no single indentation style in these manifests satisfies both..github/workflows/{ci,nightly}.yml: default toruby_version: "3.2"(voxpupuli-puppet-lint-plugins7.0 requires Ruby >= 3.2). Install libcurl headers on the Spec job sopuppet_litmus's bolt/patron native extension builds on the Ruby 4 lane. Add--collection-platform-exclude 9:<platform>forredhat-7/debian-10/ubuntu-18.04/ubuntu-20.04— these platforms have no Puppet 9 agent build (nightly install 404s), so only their Puppet 9 acceptance run is dropped while Puppet 8 acceptance keeps running. Setdisable_apparmor: trueon the Acceptance job — AppArmor'sunix-chkpwdprofile denies the PAM password-check helper the capabilities it needs to read/etc/shadowinside a container, causing intermittent "Authentication failed for user root@localhost" errors on Rocky-8 even with correct credentials. Confirmed live via an interactive tmate debug session on a failing runner: the container's journal showedapparmor="DENIED" ... profile="unix-chkpwd"at the exact moment of every failure; 3/3 clean runs after disabling..github/workflows/mend.yml: default toruby_version: "3.2"too, sincebundle lockresolves all groups (including:development) at whatever ruby that job runs..sync.yml: markci.yml/nightly.ymlunmanaged so a template sync doesn't silently drop theadditional_packages/ruby_version/disable_apparmorinputs pdk-templates can't express yet.Test plan
bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop— all pass (verified locally on Ruby 3.2 against the final Gemfile/Rakefile)bundle exec rake parallel_spec— 291 examples, 0 failuresMODULES-11727
🤖 Generated with Claude Code