Closed jonathannewman closed 1 month ago
Within the Puppet Enterprise UI console the concept of pinned nodes allows more complex rules to be expressed while including pinned nodes.
Pinned nodes are formed by having a top level "or" clause, with expressions in the form
['=', 'name', 'hostname']
Prior to this change, the code would not properly maintain pinned nodes, nor correctly handle merging expressions like:
['and', ['~', ['fact', 'pe_server_version'], '.+']]
with
['or', ['~', ['trusted', 'extensions', '1.3.6.1.4.1.34380.1.1.9812'], '^puppet/']]
Incorrectly combining them into an and clause when logically they should be an "or" clause.
and
With this change, pinned nodes are separated our from the other rules and then recombined later (if they are present) with a top-level "or" clause.
Test are added to demonstrate the behaviors.
Add any additional context about the problem here.
Mention any related issues or pull requests.
Summary
Within the Puppet Enterprise UI console the concept of pinned nodes allows more complex rules to be expressed while including pinned nodes.
Pinned nodes are formed by having a top level "or" clause, with expressions in the form
['=', 'name', 'hostname']
Prior to this change, the code would not properly maintain pinned nodes, nor correctly handle merging expressions like:
with
Incorrectly combining them into an
and
clause when logically they should be an "or" clause.With this change, pinned nodes are separated our from the other rules and then recombined later (if they are present) with a top-level "or" clause.
Test are added to demonstrate the behaviors.
Additional Context
Add any additional context about the problem here.
Related Issues (if any)
Mention any related issues or pull requests.
Checklist