Uploaded image for project: 'OpenShift Hive'
  1. OpenShift Hive
  2. HIVE-2513

Tech Debt: Use more generics for condition helpers

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Proactive Architecture
    • False
    • None
    • False

      HIVE-1935 made a start on converting some of our condition helpers to use generics. However, it didn't go far enough to achieve one of the main goals, which would be reduction of redundancy and #LOC. It would be great to dig deeper, e.g. deduplicating funcs like Set<CRDType>Condition[WithChangeCheck] (example).

      There's a bit of challenge here because some of these differ slightly: e.g. SetClusterDeploymentConditionWithChangeCheck ends by sorting the conditions.

      I wonder if we could manage this by creating an interface with a default no-op impl for the sorting func, which we would override for ClusterDeployment. Not sure how/whether that would dovetail with generics.

              Unassigned Unassigned
              efried.openshift Eric Fried
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: