Smart matchers with multiple, more specific facts match on less specific facts
I think I am running into a bug when overriding a puppet class parameter. I am having trouble getting the matchers to work.
Say you have a set of facts as a priority in the order section that a host matches. The bug occurs when the following conditions are met:
- you have a subset of facts as a priority in the order section that the host also matches
- that subset is a lower priority than the original set in the order section
- there is a value present to the subset of facts in the matcher section
- the subset is listed before the original set in the matcher section
I attached images showing an example.
Fixes #16591 - Correct parameter value order for complex matcher
If the order includes more specific complex matchers before less
specific one (e.g., "organization,location" before "organization"), the
order of resolution is incorrect, because the classification service
will check for the index of the matcher in the path which is serialized
as a string - "organization,location\norganization" leading to incorrect