Skip to content
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

(PUP-5088) Ensure only => can be used in capability mappings #4196

Conversation

thallgren
Copy link
Contributor

This commit relaxes that constraint that a CapabilityMapping
only can contain an AttributeOperation so that it instead can
contain an AbstractAttributeOperation. This was done to prevent
a cryptic error message when an AttributesOperation (note the
plural) was assigned due to use of *=> operator. The relaxed
constraint lets this pass so that it instead can be trapped
in the validator where a correct check was already in place.

*=> $hostname
}
MANIFEST
end.to raise_error(Puppet::ParseError, /The operator '\* =>' in a Block Expression is not supported/)
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not seem right. I think the expression may be derived from BlockExpression and that a label is missing for it?

@hlindberg
Copy link
Contributor

needs a rebase

@thallgren thallgren force-pushed the issue/pup-5088/allowed-capability-attribute-operator branch from b80832a to acf80b7 Compare August 31, 2015 11:16
@thallgren
Copy link
Contributor Author

Rebased and fixed syntax in test case.

This commit relaxes that constraint that a CapabilityMapping
only can contain an AttributeOperation so that it instead can
contain an AbstractAttributeOperation. This was done to prevent
a cryptic error message when an AttributesOperation (note the
plural) was assigned due to use of *=> operator. The relaxed
constraint lets this pass so that it instead can be trapped
in the validator where a correct check was already in place.
@thallgren thallgren force-pushed the issue/pup-5088/allowed-capability-attribute-operator branch from acf80b7 to f7aabe4 Compare August 31, 2015 11:36
@hlindberg
Copy link
Contributor

+1, just waiting for checks to clear before merging

hlindberg added a commit that referenced this pull request Sep 2, 2015
…lity-attribute-operator

(PUP-5088) Ensure only => can be used in capability mappings
@hlindberg hlindberg merged commit dff0c92 into puppetlabs:master Sep 2, 2015
@thallgren thallgren deleted the issue/pup-5088/allowed-capability-attribute-operator branch December 16, 2015 07:47
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.

None yet

2 participants