๐Ÿ›(fix) Remove "Serving" condition type from ConditionSets by anik120 ยท Pull Request #1859 ยท operator-framework/operator-controller

@anik120 anik120 changed the title (fix) Remove "Serving" condition type from ConditionSets ๐Ÿ›(fix) Remove "Serving" condition type from ConditionSets

Mar 11, 2025

joelanford

joelanford

@anik120

conditionset.ConditionTypes was being used by the CluterExtension
controller to `ensureAllConditionsWithReason` whenever a particular
reason needed to be set for all of the ClusterExention's conditions.
However, the `ConditionTypes` included a Condition Type `Serving`, which
is not a ClusterExtension Condition(it is a ClusterCatalog condition).

This is causing the `Serving` condition to show up when a resolution fails,
which is incorrect to begin with, and is then never cleared when the resolution
succeeds at a later stage.

```
try to upgrade ClusterExtension to a non-exist version
$ kubectl patch ClusterExtension extension-77972 -p '{"spec":{"source":{"catalog":{"version":"0.2.0"}}}}' --type=merge
clusterextension.olm.operatorframework.io/extension-77972 patched

- lastTransitionTime: "2025-03-04T07:16:27Z"
    message: 'error upgrading from currently installed version "0.1.0": no bundles
      found for package "nginx77972" matching version "0.2.0"'
    observedGeneration: 2
    reason: Retrying
    status: "True"
    type: Progressing
  - lastTransitionTime: "2025-03-04T07:16:35Z"
    message: 'error upgrading from currently installed version "0.1.0": no bundles
      found for package "nginx77972" matching version "0.2.0"'
    observedGeneration: 2
    reason: Failed
    status: "False"
    type: Serving
  install:
    bundle:
      name: nginx77972.v0.1.0
      version: 0.1.0
```

This PR removes the `Serving` condition type from `conditonSets.ConditionType`

joelanford

@anik120 anik120 added this pull request to the merge queue

Mar 12, 2025

Merged via the queue into operator-framework:main with commit 029d19f

Mar 12, 2025

19 of 20 checks passed