Skip to content

🐛 set Progressing condition to False on successful reconciliation#2810

Open
vdurgam10 wants to merge 2 commits into
operator-framework:mainfrom
vdurgam10:fix/clusterextension-progressing-condition
Open

🐛 set Progressing condition to False on successful reconciliation#2810
vdurgam10 wants to merge 2 commits into
operator-framework:mainfrom
vdurgam10:fix/clusterextension-progressing-condition

Conversation

@vdurgam10

Copy link
Copy Markdown

Summary

  • The Progressing condition on ClusterExtension resources was incorrectly set to status: True with reason: Succeeded after successful reconciliation. This is semantically wrong — Progressing=True means "still working," which contradicts the Succeeded reason and "Desired state reached" message.
  • This fix changes the default Progressing status to ConditionFalse (done progressing) and only sets ConditionTrue when there is an active non-terminal error causing retries. Terminal errors correctly remain ConditionFalse with reason Blocked.

Before

$ oc get clusterextension metallb-operator
NAME               INSTALLED BUNDLE                        VERSION               INSTALLED   PROGRESSING   AGE
metallb-operator   metallb-operator.v4.22.0-202607011454   4.22.0-202607011454   True        True          30h

After

$ oc get clusterextension metallb-operator
NAME               INSTALLED BUNDLE                        VERSION               INSTALLED   PROGRESSING   AGE
metallb-operator   metallb-operator.v4.22.0-202607011454   4.22.0-202607011454   True        False         30h

Condition semantics

Scenario Status Reason
Success (no error) False Succeeded
Non-terminal error (retrying) True Retrying
Terminal error (blocked) False Blocked / specific reason

Test plan

  • Unit tests updated and passing (TestSetStatusProgressing — all 8 sub-tests)
  • Integration tests updated and passing (TestClusterExtensionInstallationSucceeds, TestResolutionFallbackToInstalledBundle)
  • Full controllers test suite passing
  • Validated on OCP 4.22.2 cluster with MetalLB operator installed via ClusterExtension

Made with Cursor

The Progressing condition on ClusterExtension resources was always set
to status: True with reason: Succeeded after a successful reconciliation.
This is semantically incorrect — Progressing=True means "still working,"
which contradicts the Succeeded reason and the "Desired state reached"
message.

This fix changes the default Progressing status to ConditionFalse (done
progressing) and only sets ConditionTrue when there is an active
non-terminal error causing retries. Terminal errors correctly remain
ConditionFalse with reason Blocked.

Before:
  Installed=True  Progressing=True   reason=Succeeded  "Desired state reached"

After:
  Installed=True  Progressing=False  reason=Succeeded  "Desired state reached"

Signed-off-by: Venkatesh Durgam <vdurgam@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 8, 2026 17:37
@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 722ae1a
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6a4e98a24625860008c0e18d
😎 Deploy Preview https://deploy-preview-2810--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@openshift-ci openshift-ci Bot requested review from dtfranz and joelanford July 8, 2026 17:37
@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joelanford for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects ClusterExtension condition semantics so Progressing reflects “work still in progress” rather than being set to True after a successful reconciliation, aligning status reporting with standard Kubernetes condition meaning.

Changes:

  • Default Progressing to False with reason Succeeded and message “Desired state reached” when reconciliation succeeds.
  • Set Progressing=True only when reconciliation returns a non-terminal error (retrying), while keeping terminal errors Progressing=False with an appropriate blocked reason.
  • Update unit and controller tests to assert the corrected Progressing status on successful installs/fallback scenarios.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
internal/operator-controller/controllers/common_controller.go Adjusts setStatusProgressing default condition status to False on success and True on non-terminal errors.
internal/operator-controller/controllers/common_controller_test.go Updates unit test expectations for Progressing on success and error scenarios.
internal/operator-controller/controllers/clusterextension_controller_test.go Updates integration/controller tests to expect Progressing=False after successful reconciliation paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}{
{
name: "non-nil ClusterExtension, nil error, Progressing condition has status True with reason Success",
name: "non-nil ClusterExtension, nil error, Progressing condition has status False with reason Success",
@joelanford joelanford changed the title fix: set Progressing condition to False on successful reconciliation 🐛 set Progressing condition to False on successful reconciliation Jul 8, 2026
Update ClusterExtension e2e assertions to match the corrected
Progressing condition semantics. ClusterObjectSet assertions are
unchanged as they use a separate controller.

Signed-off-by: Venkatesh Durgam <vdurgam@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 8, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@perdasilva

Copy link
Copy Markdown
Contributor

@vdurgam10 this was technically the original design. Internally, we are quite happy to walk this back. So, this change would also need an update to the documentation in the CR (https://github.com/operator-framework/operator-controller/blob/main/api/v1/clusterextension_types.go#L521). Since this technically constitutes a breaking change, we need to check internally whether we can push it through - this PR hopefully gives us enough data to show it would make sense to walk this design choice back...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants