Skip to content

Test that puppetserver can load the vendored multi_json - #773

Draft
miharp wants to merge 1 commit into
OpenVoxProject:8.xfrom
miharp:acceptance-puppetserver-loads-multi-json
Draft

miharp wants to merge 1 commit into
OpenVoxProject:8.xfrom
miharp:acceptance-puppetserver-loads-multi-json

Conversation

@miharp

@miharp miharp commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

The agent installs multi_json into the vendor gem directory that puppetserver also loads from. puppet-runtime has twice shipped a version that puppetserver's JRuby cannot load (OpenVoxProject/puppet-runtime#156, OpenVoxProject/puppet-runtime#333). The acceptance suite did not notice, because OpenVox itself stopped requiring the gem in 8.25.0.

This adds a test that requires the gem through puppetserver ruby on the master. It sits next to r10k.rb, which covers the same class of problem.

It targets 8.x directly. agent-runtime-main does not ship multi_json, so there is nothing to check on main.

The test fails until a runtime with OpenVoxProject/puppet-runtime#334 is promoted into 8.x. I ran the acceptance workflow on my fork against the released openvox8 packages (agent 8.32.0, server 8.18.0): https://github.com/miharp/openvox/actions/runs/42023349579

  • All 11 shard:group2 jobs fail, one per OS. In each, this test is the only errored case and nothing else fails.
  • The other 48 jobs pass, including the three other shards on every OS and the openvox-agent suite.
Begin tests/puppetserver_loads_vendored_multi_json.rb
test-primary-1.vm $ /opt/puppetlabs/server/bin/puppetserver ruby -e 'require "multi_json"; puts MultiJson.dump("loaded" => true)'
  LoadError: cannot load such file -- /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/multi_json-1.21.2/lib/multi_json/options_cache/concurrent_store
tests/puppetserver_loads_vendored_multi_json.rb errored in 5.86 seconds

The same command in a container, before and after swapping the vendored gem to the 1.19.1 that OpenVoxProject/puppet-runtime#334 pins:

### stock agent 8.32.0 (multi_json multi_json-1.21.2)
LoadError: cannot load such file -- /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/multi_json-1.21.2/lib/multi_json/options_cache/concurrent_store
exit=1
### with the pin from puppet-runtime#334 (multi_json multi_json-1.19.1)
{"loaded":true}
exit=0

Assisted by Claude.

The agent installs multi_json into the vendor gem directory that
puppetserver also loads from. A puppet-runtime gem update has twice
shipped a version that puppetserver's JRuby cannot load
(puppet-runtime#156, puppet-runtime#333), and nothing in the acceptance
suite noticed, because OpenVox itself no longer requires the gem.

Require it through `puppetserver ruby` on the master, next to the r10k
test that covers the same class of problem.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Michael Harp <mike@mikeharp.com>

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant