(PUP-6723) collector_transformer: negation query for array type properties is broken#5290
Closed
isaiahfrantz wants to merge 4 commits intopuppetlabs:masterfrom
Closed
(PUP-6723) collector_transformer: negation query for array type properties is broken#5290isaiahfrantz wants to merge 4 commits intopuppetlabs:masterfrom
isaiahfrantz wants to merge 4 commits intopuppetlabs:masterfrom
Conversation
they are in the == case
|
Waiting for CLA signature by @isaiahfrantz @isaiahfrantz - We require a Contributor License Agreement (CLA) for people who contribute to Puppet, but we have an easy click-through license with instructions, which is available at https://cla.puppet.com/ Note: if your contribution is trivial and you think it may be exempt from the CLA, please post a short reply to this comment with details. http://docs.puppet.com/community/trivial_patch_exemption.html |
|
CLA signed by all contributors. |
Contributor
|
Thanks for the contribution and discussion on the ticket. As noted there, I will close this in favor for instead adding the ability to use the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(PUP-6723) collector_transformer: negation query for array type properties is broken
Only in the == case is the query property getting tested to see if it is an array which then uses the compare_operator.include? method. The != case only uses compare_operator.equals which makes it so you cant do negated queries on array type properties like tags :(
With this test code:
Adding these at the end would all work as expected
The negated versions would not
The first should only return 2 and 4 but also returns 3:
The second should only return 1 and 4 but also returns 3:
The "or" case should only return 1,2, and 4. It should not return 3 but does:
The "and" case should only return 4. It should not return 3 but it does: