Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Night's Watch
-
3
-
NW - 2021-04-28, NW - 2021-05-19
-
Enhancement
-
Improves the overall mechanism of fact filtering and matching.
-
Needs Assessment
Description
Throughout FACT-2998 we improved fact querying/matching/filtering but currently the functionality (attempting to dig in the facts) is spread out in at least 2 places: FactAugmenter and FactFilter.
We should unify all these functionalities in a single class, preferably inside the FactFilter class.
Also, even if it's private API we should document the purpose and boundaries of the FactFilter class, preferably also the other classes (Augmenter, QueryParser...).
FactFilter: https://github.com/puppetlabs/facter/blob/0c769fff1e70f0673db90841f305aacd190878cb/lib/facter/framework/core/fact_filter.rb#L8
FactAugmenter: https://github.com/puppetlabs/facter/blob/0ac50a34ec0ec079413b2f1329085b490821d667/lib/facter/framework/core/fact_augmenter.rb#L36
FactCollection (mentioning this because it also relies on the dig..rescue pattern): https://github.com/puppetlabs/facter/blob/0ac50a34ec0ec079413b2f1329085b490821d667/lib/facter/models/fact_collection.rb#L24