Skip to content

Remove deprecated sensu-plugins-ruby subsystem (v6.0.0) - #1359

Open
sourabhpatel-sumo wants to merge 2 commits into
masterfrom
plugin-removal
Open

sourabhpatel-sumo wants to merge 2 commits into
masterfrom
plugin-removal

Conversation

@sourabhpatel-sumo

@sourabhpatel-sumo sourabhpatel-sumo commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Summary

Stacked on #1358 (puppet8-modernization) — this is the breaking-change follow-up split out of
that PR so v5.12.0 can ship independently. This PR bumps to v6.0.0 and removes the deprecated
sensu-plugins-ruby subsystem entirely:

  • sensu::plugins class and sensu::repo::community class
  • sensu_plugin type/provider and sensu_gem package provider
  • Related hiera keys (sensu::plugins::dependencies in data/os/{RedHat,Debian}.yaml)
  • All associated spec files (unit, class, and acceptance)

Scope — what this does not touch

sensu-ruby-runtime is a Bonsai asset, registered through the sensu_bonsai_asset type — a
backend-registered tarball the agent downloads at runtime. It is unaffected by this PR and still
exercised in spec/acceptance/sensu_bonsai_asset_spec.rb. Ruby plugins delivered as Bonsai assets
keep working exactly as they do today.

What this PR removes is sensu-plugins-ruby: a Sensu Core 1.x-lineage host-level installer that
adds a third OS repo (packagecloud.io/sensu/community, separate from sensu/stable), installs an
omnibus package with its own embedded Ruby at /opt/sensu-plugins-ruby/embedded/, installs a
compiler toolchain, and shells out to sensu-install to compile gems at Puppet-run time. The two
share the word "ruby" and nothing else.

Why: the modern replacement is sensu_bonsai_asset (see the migration note already added to
README.md): where you previously used sensu::plugins { plugins => ['disk-checks'] }, use
sensu_bonsai_asset with the corresponding Bonsai namespace/name instead
(e.g. sensu/sensu-plugins-disk-checks).

Package availability on packagecloud.io/sensu/community, checked against every OS this module
currently supports (metadata.json):

Platform sensu-plugins-ruby published?
el/8 (RedHat/Rocky/AlmaLinux 8) Yes — 0.2.0-1.el8, 0.3.0-2.el8, x86_64 only, built 2020-08-11, embedded Ruby 2.4 (EOL Mar 2020)
el/9 (RedHat/Rocky/AlmaLinux 9) No — never published
Debian 12 (bookworm) No — never published
Ubuntu 22.04 (jammy), 24.04 (noble) No — never published
Amazon 2023 Mis-resolves to el/7 via a stale /^201\d$/ regex in repo/community.pp — a bug, not support
Windows N/A — sensu::plugins fails on Windows

Correction to an earlier claim in this PR: I originally said no package exists for any currently
supported OS — that's wrong for EL8. The acceptance skip was verified on rocky-9, debian-12,
almalinux-9 and ubuntu-22.04; 04_plugins_spec.rb is gated on sensu_mode == 'base' and the only
EL8 nodeset is rocky-8-cluster.yml (cluster mode), so no EL8 node ever ran it.
sensu::plugins still functions on EL8 x86_64 today. See discussion below for usage data on that
platform.

Test plan

Full local CI-equivalent run on this branch (Apple Silicon; two acceptance-full jobs that require
an x86_64-only Puppet package are noted below and were verified via CI on the parent branch
instead):

  • rake sensu_validate lint strings:generate reference — clean, REFERENCE.md matches
  • rake parallel_spec (CI's exact BUNDLE_WITHOUT=system_tests:development) — 3701 examples, 0 failures
  • Acceptance base mode: rocky-9, debian-12, ubuntu-24.04, ubuntu-22.04, almalinux-9 — all 69/0 (6 pending enterprise-only, expected)
  • Acceptance full/types/examples: rocky-9 and ubuntu-24.04 — full 7/0, types 254/0, examples 10/0 (both sets)
  • Acceptance cluster: rocky-8-cluster, ubuntu-24.04-cluster — 24/0 (both)
  • Acceptance bolt mode and types mode with use_agent=yes (both rocky-9-only jobs) — not
    runnable on Apple Silicon: confirmed by direct repro that Puppet Inc. publishes no aarch64
    EL9 RPM for puppet-bolt or puppetserver. Neither job is affected by this diff (no bolt-
    or puppetserver-setup code touched here), and both already pass on x86_64 GitHub Actions
    CI for the parent puppet8-modernization branch.
  • Confirmed no dangling references to the removed classes/types anywhere in manifests,
    REFERENCE.md, or remaining specs

🤖 Generated with Claude Code

@amdprophet amdprophet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a major change as https://github.com/sensu/sensu-ruby-runtime has historically been used by many plugins from the community (not just our own). If we haven't already, please determine how many users are still using ruby plugins. I can see this being a blocker for upgrading to v6.0.0 of the puppet module for some people.

@sourabhpatel-sumo

sourabhpatel-sumo commented Sep 9, 2026 •

Copy link
Copy Markdown
Member Author

@amdprophet I've updated the PR description with a correction and the scope of what this actually touches — short version: sensu-ruby-runtime (Bonsai asset) is untouched, and my "no package
for any supported OS" claim was wrong for EL8. See the description for the detail and the availability table.

On the usage numbers you asked for. Pulled from packagecloud — 30-day downloads, API downloads_count, summed across all 41 artifacts in the repo (which contains only this package). Total 297:

Distro 30d Vendor EOL Still supported?
ubuntu/quantal 44 Apr 2014 (12.10) No
el/7 42 Jun 2024 No
ubuntu/bionic 42 May 2023 No
ubuntu/trusty 39 Apr 2019 No
el/6 27 Nov 2020 No
ubuntu/xenial 26 Apr 2021 No
ubuntu/focal 22 Apr 2025 No — dropped by #1358
el/8 21 May 2029 Yes
debian/stretch 16 Jun 2022 No
debian/jessie 12 Jun 2020 No
debian/buster 6 Jun 2024 No

Two things stand out:

  1. 92.9% is on platforms Puppet 8 modernization: add sensu_pipeline type, fix annotations, drop EOL platforms #1358 already dropped as EOL. Those users can't reach v5.12.0 regardless of this PR — only the el/8 slice could be blocked by the removal itself.
  2. el/8 is 21 — and Ubuntu 12.10, EOL for twelve years, is 44. RHEL 6 is 27. The spread is nearly flat with no concentration on newer platforms, which looks more like mirror/scanner/CI traffic than real convergence — organic usage would skew toward the newest supported platform.

My read: el/8's 21 sits inside the noise floor set by platforms that can't have live users. I'd rather say that carefully — "indistinguishable from automated traffic," not "nobody uses this" — since I can't actually tell the two apart from download counts alone. Worth noting package_ensure defaults to installed (idempotent), so these numbers undercount the installed base while overcounting distinct users either way.

One caveat on the data itself: the repo page's "installs in the last 30 days" widget shows 80 for the same window, not 297 — apparently a different metric than the API's downloads_count. Everything above uses the API figure consistently, but I wanted to flag the discrepancy rather than have it surface later.

If you have visibility I don't — support tickets, customer reports, known EL8 shops — that would override my read here, and I'd trust it over the download data.

One regression worth naming plainly: sensu_plugin's source parameter (a custom gem mirror URL passed to sensu-install) has no sensu_bonsai_asset equivalent — Bonsai installs assets, not arbitrary gems from a private server. I found one public control-repo relying on exactly this. The workaround (publish an asset tarball, use sensu_asset with builds) is real extra work for anyone in that position.

And you're right that there's no deprecation cycle here — I checked, and there never has been, on any part of this subsystem, in its whole history. That's a gap on my end, not a defense of the PR as it stands.

Given that, I think the honest options are:

  1. Ship the removal in 6.0.0 as-is, now with the corrected rationale in the description.
  2. Add deprecation warnings to Puppet 8 modernization: add sensu_pipeline type, fix annotations, drop EOL platforms #1358/v5.12.0 first (still unmerged, subsystem still intact there) and hold this PR until v5.12.0 is actually on the Forge — since a deprecation cycle only counts once people can install a version that warns them.

I don't have strong footing to pick between these myself — happy to do whichever you think is right, and (2) is not much extra work if you'd rather be safe.

@sourabhpatel-sumo sourabhpatel-sumo added this to the 6.0.0 milestone Nov 11, 2026
@sourabhpatel-sumo sourabhpatel-sumo linked an issue Nov 19, 2026 that may be closed by this pull request
…p EOL platforms (#1358)

* Upgraded module for Puppet 8 and current OS support

- Bump module version to 5.12.0
- Update Puppet dependency to >= 8.0.0
- Add AlmaLinux 8/9, Ubuntu 22.04/24.04 support; drop EOL platforms
  (CentOS 7, Ubuntu 18.04/20.04, Amazon Linux 2018)
- Refresh CI workflows with modern actions and Ruby 3.4/Puppet 8 matrix
- Replace legacy nodesets with rocky-9-modern, almalinux-9, ubuntu-24.04
- Remove sensu-plugin-ruby system (sensu::plugins class, sensu_plugin
  type,
  sensu_gem provider, sensu::repo::community); expand Bonsai asset docs
  with migration guide
- Update README, DESIGN.md, and REFERENCE.md accordingly

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* Update CI lint command and add puppet install helper

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* Added BEAKER_PUPPET_COLLECTION environment variable

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* Update acceptance test setup for Windows and Postgres

Update the Windows acceptance workflow to exclude vendor and .git
directories
when copying modules to the module path.

Update the test helper to dynamically determine the PostgreSQL service
name
based on the backend platform and ensure CA certificates are symlinked
on Debian/Ubuntu systems.

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* Fix Windows acceptance workflow: SSL copy, module versions, windows_env

- Fix SSL cert copy: create destination directory first with New-Item,
  then pipe Get-ChildItem | Copy-Item to avoid PowerShell's "Container
  cannot be copied onto existing leaf item" error with wildcards
- Remove --ignore-dependencies from puppet module install calls now
  that version ranges are correct and Puppet resolves transitive deps
- Update puppet-archive to >= 7.0.0 < 8.0.0 (matching fixtures v7.1.0)
- Update puppetlabs-chocolatey to >= 9.0.0 < 10.0.0 (matching fixtures v9.0.0)
- Replace puppet module install for puppet-windows_env with git clone
  from voxpupuli/puppet-windows_env v6.1.0: the Forge's highest version
  is 4.0.1 which declares puppet < 7.0.0, so no Puppet 8 compatible
  release is available on the Forge

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* Clear RUBYOPT for Windows subprocesses

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* 🔧chore(test): fix puppet binary path on windows

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* 🔧chore(windows): remove manual puppet agent installation and path
hacking

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* 🔧chore(deps): add ffi gem for Windows compatibility

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* ✨feat(test): move openssl unfreeze logic to separate file

The logic for unfreezing OpenSSL::SSLContext::DEFAULT_PARAMS is moved to
spec/openssl_unfreeze.rb and loaded via RUBYOPT to ensure compatibility
with Puppet monkey patches in Ruby 3.3+.

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* ♻️refactor(spec): hook OpenSSL unfreeze to avoid load order issues

Ensures `OpenSSL::SSL::SSLContext::DEFAULT_PARAMS` is unfrozen by
hooking
`Kernel#require`. This prevents `Gem::LoadError` when loaded via
`RUBYOPT`
by ensuring the fix applies regardless of which component first
activates the
openssl gem.

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* ✨feat(workflow): add minitar compatibility shim for puppet 8

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* ♻️refactor(sensu): allow mixed types in annotations

Update annotations to use `HashProperty` instead of
`HashOfStringsProperty`
to support strings, arrays, and nested hashes. Added validation to
ensure
keys are non-empty strings or symbols and ensure consistent string keys
via
munging.

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* ✨feat(sensu): add sensu_pipeline resource type and properties

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* 🔧chore(ci): update acceptance test configurations

- Disable BEAKER_debug and set log_level to warn across all test suites
- Rename modern OS nodesets to standard naming (e.g., rocky-9-modern to
  rocky-9)
- Update matrix definitions in acceptance workflows to match new naming

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* 📝docs(tests): update BEAKER_set to rocky-9 in README

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>

* 🐛 fix(sensu): resolve pr review blockers and test gaps

Reverts review-flagged regressions (gpg bypass, tls downgrade,
systemd conflict) instead of deleting the underlying features.

* 🔧 chore(sensu): restore plugin subsystem for pr split

Splits the breaking removal into its own 6.0.0 PR so this migration
can merge on its own at 5.12.0.

* 🐛 fix(ci): unfreeze ssl default_params for all rake tasks

spec/openssl_unfreeze.rb only loaded via spec_helper.rb, so
strings:generate crashed under CI's openssl 3.3+ build outside of
rspec runs. Load it Rakefile-wide instead.

* 🐛 fix(sensu): fix ci gem/fact/test gaps exposed by real spec runs

Restores real unit test coverage that's been silently masked for a
long time: no committed Gemfile.lock means CI's fresh bundle install
could resolve json 3.0+, which breaks facterdb's jgrep dependency
(JSON.create_id= was removed). Once past that, default_facter_version
'3.11.9' matched nothing in facterdb's Facter 4.x/5.x-only fixtures, so
on_supported_os silently returned zero cases for every spec/classes
file -- 0 examples, 0 failures, indistinguishable from a clean run.

- Gemfile: scope the json < 3.0 pin to development/unit_tests, where
  rspec-puppet-facts/facterdb actually need it
- spec/spec_helper.rb: default_facter_version -> 5.6 (verified 13/13
  metadata.json OS/release combos resolve; the one gap, Windows 2016,
  falls back to 4.4.0 via the existing loose-requirement check)
- spec/acceptance/04_plugins_spec.rb: skip -- sensu-plugins-ruby has no
  package for any currently-supported OS, confirmed failing identically
  across rocky-9/debian-12/almalinux-9/ubuntu-22.04; removed entirely
  in the follow-up plugin-removal PR
- 6 spec/classes files: facts[:osfamily] -> facts[:os]['family'] --
  the legacy flat fact doesn't exist in Facter 4.x/5.x fixture data
- 5 spec/classes files: stale RedHat 7 target -> 8 (7 was dropped from
  metadata.json entirely)

With facts actually flowing for the first time, three more gaps
surfaced once `rake spec_prep` populated the fixture modules:

- spec/classes/repo_spec.rb: missing case branch left redhat-9/rocky-9/
  almalinux-9 expecting an undefined baseurl instead of the real el/9
  one -- my own gap from the earlier repo.pp revert in this branch
- manifests/agent/annotation.pp: value was still typed String, so the
  "allow mixed types in annotations" fix never actually worked end to
  end for sensu::agent -- Array/Hash values passed the outer parameter
  check but still failed one layer deeper. Retyped to match
  Variant[String, Array, Hash]; agent_spec.rb's validation tests were
  wrong for the same reason and are corrected alongside it
- spec/classes/common_spec.rb: second, unguarded compile check hit the
  same already-documented rspec-puppet Windows path-mocking limitation
  (rodjek/rspec-puppet#750) that an earlier check in the same file
  already works around

spec/classes: 2194 examples, 0 failures (excluding the two files
plugin-removal deletes outright). spec/unit: still 1523/1523.

* 🐛 fix(sensu): fix psych safety and pipeline constant warning

Two items from Sarvodaya Kumar's review of #1358 that were still
outstanding after the earlier round of fixes.

- lib/puppet/provider/sensuctl.rb: bare YAML.load rejects Time/Symbol
  under Ruby 3.1+/Psych 4+'s safe-by-default loading. Confirmed real:
  reproduced Psych::DisallowedClass with a plain timestamp-bearing
  document on this branch's own target Ruby 3.4.10/Psych 5.2.2.
  sensuctl_auth_types had no rescue at all, so any auth resource with
  a timestamp field crashed the whole run; parse_yaml_dump's fallback
  hit the same wall one layer deeper, right where it was meant to
  recover. YAML.load_stream (the primary path in parse_yaml_dump) is
  unaffected -- verified it already handles Time permissively, so it's
  intentionally left alone rather than blanket-patched. Added
  regression coverage: neither new test fails without the fix reverted
  (checked), both pass with it.

- lib/puppet/type/sensu_pipeline.rb: SENSU_PIPELINE_VALIDATE_REF was a
  bare top-level constant. Puppet reloads type files repeatedly per
  compilation, so this logged "already initialized constant" on every
  reload. Moved under PuppetX::Sensu::Pipeline, matching this module's
  existing lib/puppet_x/sensu/ convention.

spec/unit + spec/classes: 3719 examples, 0 failures.

* 🐛 fix(sensu): fix plugins_spec/repo_community_spec CI-breaking crash

bundle exec rake parallel_spec (the actual CI command) still failed
even after the earlier facts[:osfamily] round, because these two files
were deliberately skipped there on the reasoning that plugin-removal
deletes them anyway. That reasoning missed that puppet8-modernization
needs its own CI green before plugin-removal ever merges.

- Same facts[:osfamily] -> facts[:os]['family'] fix as the other 6
  files (6 occurrences across the two files)
- spec/spec_helper.rb's platforms() helper never had
  :plugins_dependencies / :plugins_package_require keys added for
  this modernized branch, so plugins_spec.rb crashed with
  NoMethodError the moment real facts started flowing. Added them,
  matching data/os/{RedHat,Debian}.yaml's actual hiera values and
  manifests/plugins.pp's require chain.
- repo_community_spec.rb's case statement was missing rocky-8/
  almalinux-8/-9 family branches entirely (only redhat-8/centos-8 and
  a pre-2023-Amazon-support amazon regex existed). Added them,
  including a comment noting manifests/repo/community.pp itself still
  resolves Amazon 2023 to el/7 (unlike the newer repo.pp) -- the test
  now matches that actual behavior rather than fixing manifest logic
  in a class this branch's follow-up PR deletes outright.

bundle exec rake parallel_spec (exact CI command, no exclusions):
4143 examples, 0 failures.

* 🐛 fix(ci): fix rexml gem, plugin acceptance skip, and docker timeout

- Gemfile: rexml stopped being a default gem in Ruby 3.4; only beaker
  (system_tests) pulled it in, so the Unit job's
  BUNDLE_WITHOUT=system_tests:development left it missing and crashed
  chocolatey's package provider autoload during any package-resource
  compile (e.g. sensu::backend::datastore::postgresql).
- sensu_plugin_spec.rb: same dead-package root cause as 04_plugins_spec.rb
  (no sensu-plugins-ruby package for any supported OS); skip it too since
  mode=types was never run locally when that file was first skipped.
- spec_helper_acceptance.rb: raise docker-api's read/write timeout so the
  3-host EL8 cluster nodeset's cold image builds don't exceed beaker-docker's
  300s default.

---------

Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>
Base automatically changed from puppet8-modernization to master November 20, 2026 14:43
Breaking: no deprecation cycle existed on master; sensu_bonsai_asset
is the replacement. Ships as 6.0.0, stacked on the migration branch.

This branch has not been deployed

No deployments
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.

Remove deprecated ruby plugins support

2 participants