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

Centralize and document fact matching and filtering

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: FACT 4.2.0
    • Component/s: None
    • Template:
    • Team:
      Night's Watch
    • Story Points:
      3
    • Sprint:
      NW - 2021-04-28, NW - 2021-05-19
    • Release Notes:
      Enhancement
    • Release Notes Summary:
      Improves the overall mechanism of fact filtering and matching.
    • QA Risk Assessment:
      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

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

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support