You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function ModuleDataProvider::validate_data_hash is supposed to prune all hiera keys that are not prefixed with the configured module_name. It does not.
Instead it returns the hash that it was called with unchanged. All pruning is done on a cloned version of the supplied hash that’s discarded and not returned to the caller.
It should prune all Hiera keys that are not prefixed with the configured module name.
It should include the name of any offending key(s) in the warning message that it prints. The warning message as currently implemented doesn't provide the developer with any meaningful actionable information.
This issue was detected when using Puppet Bolt. The underlying version of Puppet, used by Bolt, was 7.20.0. Note that this is a bug with Puppet, not with Bolt.
When this issue is fixed it might well result in other bugs in how Bolt handles such Hiera key and their lookups as Bolt doesn't prefix key names with the module_name as the module_name IS the Bolt project name itself.
The text was updated successfully, but these errors were encountered:
The function
ModuleDataProvider::validate_data_hash
is supposed to prune all hiera keys that are not prefixed with the configuredmodule_name
. It does not.Instead it returns the hash that it was called with unchanged. All pruning is done on a cloned version of the supplied hash that’s discarded and not returned to the caller.
puppet/lib/puppet/pops/lookup/module_data_provider.rb
Line 47 in 1d188e1
Desired Behavior:
puppet/lib/puppet/pops/lookup/module_data_provider.rb
Line 56 in 1d188e1
Puppet.warning("Module '#{module_name}': #{msg}, key=#{k}")
to help identify the offending key(s).Actual Behavior:
Fix:
Delete this line and the pruned hash is returned:
https://github.com/puppetlabs/puppet/blob/main/lib/puppet/pops/lookup/module_data_provider.rb#L57
Environment
This issue was detected when using Puppet Bolt. The underlying version of Puppet, used by Bolt, was
7.20.0
. Note that this is a bug with Puppet, not with Bolt.When this issue is fixed it might well result in other bugs in how Bolt handles such Hiera key and their lookups as Bolt doesn't prefix key names with the
module_name
as themodule_name
IS the Bolt project name itself.The text was updated successfully, but these errors were encountered: