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
register_type accepts attribute names containing upper case characters. Puppet will happily downcase those for internal processing, without RSAPI noticing. this in turn leads to random-looking failures later in processing.
Expected Behavior
RSAPI register_type and register_transport refuse to accept attribute/connection_info keys that do not conform to all-lower-case snake casing rules (all lowercase, numbers, underscores, starts with letter).
Steps to Reproduce
Steps to reproduce the behavior:
Create a new type called some with a mandatory attribute called someThing
Run puppet apply -e 'some { foo: }
Will fail with:
david@davids:~/tmp/foo$ pdk bundle exec puppet apply -e 'some { test: }' --verbose --trace --modulepath spec/fixtures/modules
pdk (INFO): Using Ruby 2.5.7
pdk (INFO): Using Puppet 6.10.1
Notice: Compiled catalog for localhost in environment production in 0.11 seconds
Info: Applying configuration version '1573033174'
Error: /Stage[main]/Some[test]: Could not evaluate: The following mandatory attributes were not provided:
* SomeThing
/opt/puppetlabs/pdk/private/puppet/ruby/2.5.0/gems/puppet-resource_api-1.8.7/lib/puppet/resource_api.rb:342:in `raise_missing_attrs'
/opt/puppetlabs/pdk/private/puppet/ruby/2.5.0/gems/puppet-resource_api-1.8.7/lib/puppet/resource_api.rb:289:in `retrieve'
/opt/puppetlabs/pdk/share/cache/ruby/2.5.0/gems/puppet-6.10.1/lib/puppet/type.rb:1133:in `retrieve_resource'
[...]
Additional Context
This problem was originally reported and diagnosed by Brian Dinga on the community slack.
The text was updated successfully, but these errors were encountered:
Describe the Bug
register_type
accepts attribute names containing upper case characters. Puppet will happily downcase those for internal processing, without RSAPI noticing. this in turn leads to random-looking failures later in processing.Expected Behavior
RSAPI
register_type
andregister_transport
refuse to accept attribute/connection_info keys that do not conform to all-lower-case snake casing rules (all lowercase, numbers, underscores, starts with letter).Steps to Reproduce
Steps to reproduce the behavior:
some
with a mandatory attribute calledsomeThing
puppet apply -e 'some { foo: }
Will fail with:
Additional Context
This problem was originally reported and diagnosed by Brian Dinga on the community slack.
The text was updated successfully, but these errors were encountered: