Skip to content

Comments

🌱 Set Progressing to Succeeded on ClusterExtensionRevision only after availability probes pass#2524

Open
pedjak wants to merge 1 commit intooperator-framework:mainfrom
pedjak:progressing-deadline-include-availability
Open

🌱 Set Progressing to Succeeded on ClusterExtensionRevision only after availability probes pass#2524
pedjak wants to merge 1 commit intooperator-framework:mainfrom
pedjak:progressing-deadline-include-availability

Conversation

@pedjak
Copy link
Contributor

@pedjak pedjak commented Feb 24, 2026

Description

Previously, Progressing reason was set to Succeeded as soon as the rollout
transition completed, not taking into account availability probes of the last phase.
This meant setting .spec.progressDeadlineMinutes could not catch workloads that were
applied to the cluster but never became available, due to for example bad image reference.

Now Progressing stays at RollingOut during transition and is only set to
Succeeded once probes confirm availability, allowing the progress deadline
to correctly expire when a workload fails to become available in time.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Copilot AI review requested due to automatic review settings February 24, 2026 16:34
@openshift-ci
Copy link

openshift-ci bot commented Feb 24, 2026

[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

@netlify
Copy link

netlify bot commented Feb 24, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 76b1cbc
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/699dd5392cb8bb00083d10d7
😎 Deploy Preview https://deploy-preview-2524--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 24, 2026
Copy link
Contributor

Copilot AI left a comment

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 modifies the ClusterExtensionRevision controller to delay setting the Progressing condition to Succeeded until availability probes pass, rather than immediately when the rollout transition completes. This ensures that the progressDeadlineMinutes feature can correctly detect workloads that are deployed but fail to become available (e.g., due to bad image references).

Changes:

  • Modified Progressing condition logic to remain at RollingOut during transition and only set to Succeeded after availability probes confirm readiness
  • Replaced sync.Map progress deadline tracking with deterministic clock-based requeue logic using injected clock.Clock interface
  • Added E2E test scenario for progress deadline with availability failures

Reviewed changes

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

File Description
internal/operator-controller/controllers/clusterextensionrevision_controller.go Refactored progress deadline logic to use injected clock, moved Progressing: Succeeded status to only be set when IsComplete() is true
internal/operator-controller/controllers/clusterextensionrevision_controller_test.go Added clock mocking infrastructure, updated test expectations to reflect new behavior, and used fixed timestamps for deterministic progress deadline testing
test/e2e/features/install.feature Added new scenario testing progress deadline expiration when rollout doesn't become available

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

@pedjak pedjak force-pushed the progressing-deadline-include-availability branch from e505739 to 36db108 Compare February 24, 2026 16:39
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 24, 2026
@pedjak pedjak force-pushed the progressing-deadline-include-availability branch from 36db108 to c64a338 Compare February 24, 2026 16:41
Copilot AI review requested due to automatic review settings February 24, 2026 16:41
…fter availability probes pass

Previously, `Progressing` reason was set to `Succeeded` as soon as the rollout
transition completed, not taking into account availability probes of the last phase.
This meant setting `.spec.progressDeadlineMinutes` could not catch workloads that were
applied to the cluster but never became available, due to for example bad image reference.

Now `Progressing` stays at `RollingOut` during transition and is only set to
`Succeeded` once probes confirm availability, allowing the progress deadline
to correctly expire when a workload fails to become available in time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pedjak pedjak force-pushed the progressing-deadline-include-availability branch from c64a338 to 76b1cbc Compare February 24, 2026 16:43
Copy link
Contributor

Copilot AI left a comment

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 3 out of 3 changed files in this pull request and generated 1 comment.


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

if time.Since(existingRev.CreationTimestamp.Time) > timeout {
if c.Clock.Since(existingRev.CreationTimestamp.Time) > timeout {
// progress deadline reached, reset any errors and stop reconciling this revision
markAsNotProgressing(reconciledRev, ocv1.ReasonProgressDeadlineExceeded, fmt.Sprintf("Revision has not rolled out for %d minutes.", pd))
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The error message uses "minutes" which is always plural, but when the progress deadline is 1 minute, it should say "minute" (singular). Consider using a conditional or pluralization helper to make the message grammatically correct for all values. For example: fmt.Sprintf("Revision has not rolled out for %d minute(s).", pd) or a more sophisticated approach that checks if pd == 1.

Suggested change
markAsNotProgressing(reconciledRev, ocv1.ReasonProgressDeadlineExceeded, fmt.Sprintf("Revision has not rolled out for %d minutes.", pd))
unit := "minutes"
if pd == 1 {
unit = "minute"
}
markAsNotProgressing(reconciledRev, ocv1.ReasonProgressDeadlineExceeded, fmt.Sprintf("Revision has not rolled out for %d %s.", pd, unit))

Copilot uses AI. Check for mistakes.
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.

2 participants