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

Root of structured core facts cannot be overriden by a custom fact

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: FACT 4.0.52
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Night's Watch
    • Sub-team:
    • Story Points:
      3
    • Sprint:
      NW - 2021-03-17
    • Method Found:
      Needs Assessment
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Hide
      Because the top-level fact does not exist, the root of structured core facts could not be overridden by a custom fact. This change updates the QueryParser logic to return the root fact, if that present in the loaded facts list, thus allowing completely redefinition of core facts.
      Show
      Because the top-level fact does not exist, the root of structured core facts could not be overridden by a custom fact. This change updates the QueryParser logic to return the root fact, if that present in the loaded facts list, thus allowing completely redefinition of core facts.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Facter represents structured facts as a list of paths e.g.

      os => {
        architecture => "x86_64",
        family => "Darwin",
        ...
        release => {
          full => "20.3.0",
          major => "20",
          minor => "3"
        }
      }
      

      will be represented as

      os.architecture
      os.family
      os.release.full
      os.release.major
      os.release.minor
      

      "os" is never represented as a fact name.

      When we create a custom fact "os", we don't override the list of facts, we just create a new fact and add it to that list

      os
      os.architecture
      os.family
      os.release.full
      os.release.major
      os.release.minor
      

        Attachments

          Activity

            People

            Assignee:
            gheorghe.popescu Gheorghe Popescu
            Reporter:
            bogdan.irimie Bogdan Irimie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support