Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-3006

Centralize and document fact matching and filtering

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • FACT 4.2.0
    • 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

      Attachments

        Activity

          People

            gheorghe.popescu Gheorghe Popescu
            gabriel.nagy Gabriel Nagy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support