Skip to content

(MODULES-12044) Add Puppet Core 9 support - #99

Merged
span786 merged 1 commit into
mainfrom
MODULES-12044/main/puppet9
Nov 25, 2026
Merged

span786 merged 1 commit into
mainfrom
MODULES-12044/main/puppet9

Conversation

@span786

@span786 span786 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Puppet Core 9 support. The latest release (1.1.0) declares puppet >= 6.0.0 < 9.0.0, which blocks Puppet 9 upgrades for several enterprise customers who use this module (see PPM-2019).

No module code needed changing. The node_group type, both providers, the face and application, and the legacy 3.x node_groups function all pass their specs on Puppet 9.

Changes

  • metadata.json: the Puppet requirement is now >= 6.0.0 < 10.0.0. The README requirements line is updated to match (it still said Puppet >= 3.7.1).
  • PDK template: moved from pdk-default#2.7.4 to pdk-templates#main (PDK 3.0.1). This brings:
    • the puppetcore gem source;
    • tooling that runs on Ruby 3.4 (puppetlabs_spec_helper 9, rubocop 1.73);
    • YAML.safe_load_file and deep_merge in spec_helper.
    • .sync.yml now keeps .rubocop_todo.yml inheritance and deletes the legacy CI configs.
  • Rubocop: I regenerated .rubocop_todo.yml for the newer rubocop and rubocop-rspec cops. Reformatting existing code didn't belong in a compatibility PR.
  • CI:
    • Nightly no longer uses the retired ubuntu-20.04 runner.
    • Matrix setup is pinned to Ruby 3.2, and libcurl headers are installed for the Puppet 9 lane (puppet_litmus → bolt → patron). This is the same approach as the other Puppet 9 module updates (MODULES-11703).
    • mend is pinned to Ruby 3.2.
  • Cleanup: removed obsolete .travis.yml, appveyor.yml and .gitlab-ci.yml.

Testing

Puppet 8.19.0 / Ruby 3.2.8 Puppet 9.1.4 / Ruby 3.4.7
Unit + integration specs (113) ✅ 0 failures ✅ 0 failures
syntax, lint, metadata_lint, check:*, rubocop, dependency-checker ✅ ✅

I ran the Puppet 9 lane locally against puppet-private and facter-private main. The CI run here exercises the real puppetcore Puppet 9 gems.

Not yet done: this module has no acceptance suite. Before release we need a manual smoke test on a PE primary with a Puppet Core 9 agent: create, modify and purge a node_group with the https provider, plus puppet node_manager face commands.

For reviewers

  • The lower bound is still >= 6.0.0, but CI now tests only Puppet 8 and 9. Should we raise it to >= 8.0.0 like the other Puppet 9 module updates?
  • operatingsystem_support is very old (EL6, Ubuntu 10.04/12.04/14.04, SLES 11) and includes platforms with no Puppet 9 agent. Should this PR update it, or should that be a follow-up?

Jira: MODULES-12044

🤖 Generated with Claude Code

- Raise the puppet requirement upper bound to < 10.0.0
- Move from the pdk-default 2.7.4 template to pdk-templates main
  (PDK 3.0.1): puppetcore gem source, Ruby 3.4-capable tooling
  (puppetlabs_spec_helper 9, rubocop 1.73) and YAML.safe_load_file in
  spec_helper
- Regenerate .rubocop_todo.yml for the newer rubocop/rubocop-rspec cops
  rather than reformatting existing code in a compatibility change
- CI: drop the retired ubuntu-20.04 nightly runner, pin the matrix setup
  to Ruby 3.2 and install libcurl headers for the Puppet 9 lane, as in
  the other Puppet 9 module updates (MODULES-11703)
- Remove obsolete Travis, AppVeyor and GitLab CI configs
- Update the README requirements line

Unit specs (113 examples) pass on Puppet 8.19.0 / Ruby 3.2.8 and on
Puppet 9.1.4 / Ruby 3.4.7; syntax, lint, metadata_lint, check:* and
rubocop pass on both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@span786

span786 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

CI note: the only failure is Spec / Setup Test Matrix. bundle lock can't authenticate to rubygems-puppetcore.puppet.com, because module_ci.yml takes the token from PUPPET_FORGE_TOKEN / PUPPET_FORGE_TOKEN_PUBLIC, and this repo can't see either org secret (stdlib can). An org admin needs to add puppetlabs-node_manager to the PUPPET_FORGE_TOKEN_PUBLIC repository list. After that, I'll re-run CI.

@span786

span786 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

@joshcooper As a puppetlabs org admin, could you please give this repo access to the secrets the shared module CI needs? Right now CI can't get past Spec / Setup Test Matrix.

What's failing: bundle lock gets "Authentication is required for rubygems-puppetcore.puppet.com" (run). The reusable module_ci.yml from cat-github-actions reads secrets.PUPPET_FORGE_TOKEN || secrets.PUPPET_FORGE_TOKEN_PUBLIC, and puppetlabs-node_manager can't see either of them. Other modules, such as puppetlabs-stdlib, can.

Requested:

  1. Add puppetlabs-node_manager to the repository access list of the PUPPET_FORGE_TOKEN_PUBLIC organization secret, the same setup puppetlabs-stdlib uses.
  2. If the acceptance or nightly workflows also need it, add a PUPPET_GEM_SOURCE repository secret matching stdlib's.

Once that's in place I'll re-run CI on this PR. Thanks!

@joshcooper

Copy link
Copy Markdown

@span786 I added PUPPET_FORGE_TOKEN_PUBLIC and rekicked the job. It installed puppet 9 gem https://github.com/puppetlabs/puppetlabs-node_manager/actions/runs/43240115380/job/138112774807#step:7:77 So I think this is good to merge

@span786
span786 marked this pull request as ready for review November 24, 2026 03:22
@span786
span786 requested a review from a team as a code owner November 24, 2026 03:22
@span786

span786 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

@joshcooper Thanks for adding the secret. CI is now green on Puppet 8 / Ruby 3.2 and Puppet 9 / Ruby 4. Branch protection still needs an approving review before this can merge. Could you (or someone on @puppetlabs/modules) leave one? I'll do a manual smoke test on a PE primary with a Puppet Core 9 agent before cutting the release.

Comment thread .github/workflows/ci.yml
# puppet_litmus -> bolt 4.x -> faraday-patron -> patron builds a libcurl native extension;
# the runner has no libcurl headers, so install them before bundle (Puppet 9 lane).
additional_packages: "libcurl4-openssl-dev"
ruby_version: "3.2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a no-op: module_ci.yml already defaults ruby_version to '3.2', and the input only drives the setup-matrix job. Spec jobs take Ruby from the matrix, which is why the Puppet 9 lane ran on Ruby 4. Suggest dropping it here and in nightly.yml / mend.yml, and trimming the comment above so it only explains additional_packages.

# puppet_litmus -> bolt 4.x -> faraday-patron -> patron builds a libcurl native extension;
# the runner has no libcurl headers, so install them before bundle (Puppet 9 lane).
additional_packages: "libcurl4-openssl-dev"
ruby_version: "3.2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in ci.yml: ruby_version already defaults to '3.2', so this line can go.

uses: "puppetlabs/cat-github-actions/.github/workflows/mend_ruby.yml@main"
secrets: "inherit"
with:
ruby_version: "3.2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mend_ruby.yml already defaults ruby_version to '3.2', so this block isn't needed.

@span786
span786 merged commit 21d5250 into main Nov 25, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants