Uploaded image for project: 'Machine Config Operator'
  1. Machine Config Operator
  2. MCO-1661

Centralize FeatureGate handling in a common place

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • None
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • MCO Sprint 270, MCO Sprint 271, MCO Sprint 272, MCO Sprint 273
    • 0

      There are a few places where the MCO checks if a FeatureGate is enabled. We are handling error differently, in some places we return the error back to the caller, in others we just log it and in some others we ignore the error.

      Based on the code of the FeatureGate retrieval logic, the error the function returns  can only happen if the caller is checking the FeatureGates before the logic gathers them for the first time, after that the error cannot happen. 

      If we centralize the handling in one single place, that ensures FeatureGates are retrieved (we are already doing that at boot time) and wrap the logic inside our own common FeatureGate retrieval logic we can simplify the way we check for them and avoid dealing with the returning error in every place we need a FeatureGate.

              rh-ee-pabrodri Pablo Rodriguez Nava
              rh-ee-pabrodri Pablo Rodriguez Nava
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: