-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined method `pretty_generate' for Puppet::Pops::Loader::RubyFunctionInstantiator::JSON:Module #24
Comments
I did some further digging and I'm not 100% sure if this issue is related to this module. I had a few other environments laying around that contain the consul module before this was merged: voxpupuli/puppet-consul#456. Puppetserver is still not really good at environment isolation. |
@bastelfreak I opened #25 just to rule out our monkey patch. The only environment isolation issues I've run into with Puppetserver is for custom types/providers and that was solved with generating types for each environment when r10k is run. |
Thank you very much for the patch. I am happy to test this tomorrow. R10k is called with --generate-types for each run, so types shouldn't be an issue. |
Description of problem
What did you do?
I have this module + https://github.com/jsok/puppet-vault/ in my environment. The JSON module within this module seems to conflict.
What happened?
During a puppet run, I get the following error:
to compile into a catalog
It should be enough to do a
include vault
+ having the sensuclassic module in the environment.Command used and debugging output
There is no sensu related config on the affected machine
master
Platform and version information
Anything else to add that you think will be helpful?
The vault module uses
to_json_pretty
from stdlib:https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/functions/to_json_pretty.rb#L75
It basically calls
JSON.pretty_generate()
. That method is provided by the default json module from the ruby core lib. My guess is that the module JSON overwrites the class from the core lib.The methods
validate_keys()
,sorted_generate()
andsorted_pretty_generate()
should probably extend the json class or stay within the scope of this module?The text was updated successfully, but these errors were encountered: