Skip to content

Conversation

@perdasilva
Copy link
Contributor

Description

Reviewer Checklist

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

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 21, 2025
@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 7e9a601
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/690b8c6e4bd2430008ae877b
😎 Deploy Preview https://deploy-preview-2281--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.

@perdasilva
Copy link
Contributor Author

/hold wip

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 21, 2025
@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.38%. Comparing base (85e8cbf) to head (5b2d1da).

Files with missing lines Patch % Lines
...controllers/clusterextensionrevision_controller.go 80.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2281      +/-   ##
==========================================
+ Coverage   70.32%   70.38%   +0.06%     
==========================================
  Files          90       90              
  Lines        8794     8813      +19     
==========================================
+ Hits         6184     6203      +19     
- Misses       2196     2197       +1     
+ Partials      414      413       -1     
Flag Coverage Δ
e2e 44.77% <0.00%> (+7.33%) ⬆️
experimental-e2e 14.07% <0.00%> (-0.14%) ⬇️
unit 58.41% <80.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@openshift-ci
Copy link

openshift-ci bot commented Oct 24, 2025

[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 perdasilva for approval. For more information see the Code Review Process.

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

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

@pedjak pedjak force-pushed the revision-conditions branch from 496d418 to 8c97bd7 Compare October 24, 2025 16:33
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 24, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2025
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2025
Per G. da Silva and others added 3 commits October 27, 2025 15:38
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
…ble|Unavailable) helper methods for improved code readability
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 27, 2025
…rator

Start busybox's httpd and serves probes from created files
* added `.status.activeRevisions` for tracking
* `Progressing` is mirrored from the counterpart of the latest revision
* `Available` is mirrored from the counterpart of the latest installed revision
* If the latest revision is rolled out, but not yet available, its `Available` condition is mirrored under its `activeRevision` entry.
@pedjak pedjak force-pushed the revision-conditions branch from 370f203 to 1622df1 Compare October 28, 2025 13:54
Per G. da Silva and others added 3 commits October 28, 2025 16:15
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
The logic present in private `reconcile` function of `ClusterExtensionReconciler` is refactored
into step-oriented approach for increased modularity, so that Helm and Boxcutter based approaches
can be wired, implemented, and tested in an easier way.
Copilot AI review requested due to automatic review settings November 5, 2025 17:42
Copy link

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 refactors the ClusterExtension reconciliation process to use a step-based architecture and updates condition handling to use Available and Progressing conditions instead of the legacy Installed condition. The changes support better status reporting from ClusterExtensionRevision objects and introduce an ActiveRevisions status field.

Key changes:

  • Introduces a step-based reconciliation pattern using ReconcileStepFunc to break down the reconcile logic into composable steps
  • Updates CRD printer columns and status types to use Available instead of Installed condition
  • Adds Progressing condition to ClusterExtensionRevision with new reasons like RollingOut, RolloutError, and RolledOut
  • Introduces ActiveRevisions status field to track active revisions in ClusterExtension status
  • Adds new test data for v1.0.2 test-operator bundle with httpd-based container setup

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/operator-controller/controllers/clusterextension_reconcile_steps.go New file implementing generic reconcile steps for finalizers, revision states, metadata retrieval, bundle unpacking, and application
internal/operator-controller/controllers/boxcutter_reconcile_steps.go New file with boxcutter-specific reconcile steps including storage migration and condition mirroring
internal/operator-controller/controllers/clusterextension_controller.go Refactored to remove inline reconcile logic, moved to step-based architecture with ReconcileSteps
internal/operator-controller/controllers/clusterextensionrevision_controller.go Updated condition handling to use new helper methods and improved status messages with version information
api/v1/clusterextensionrevision_types.go Added helper methods for marking revision status and new condition constants
api/v1/clusterextension_types.go Added RevisionStatus type and ActiveRevisions field to status
CRD manifests Updated printer columns from Installed to Available and added ActiveRevisions schema
Test files Updated to use new reconciler setup pattern with options, updated expected conditions
Test data Added v1.0.2 bundle with httpd container setup and updated v1.0.0/v1.2.0 bundles

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

Comment on lines +145 to +148
}
if acnd := apimeta.FindStatusCondition(r.Conditions, ocv1.ClusterExtensionRevisionTypeAvailable); pcnd.Status == metav1.ConditionFalse && acnd != nil && acnd.Status != metav1.ConditionTrue {
apimeta.SetStatusCondition(&rs.Conditions, *acnd)
}
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

Potential nil pointer dereference: pcnd may be nil when accessed in the condition check on line 146. The code checks if pcnd != nil on line 143, but then uses pcnd.Status on line 146 without re-checking if pcnd is nil. If pcnd is nil, this will cause a panic. Add a nil check for pcnd before accessing its Status field.

Suggested change
}
if acnd := apimeta.FindStatusCondition(r.Conditions, ocv1.ClusterExtensionRevisionTypeAvailable); pcnd.Status == metav1.ConditionFalse && acnd != nil && acnd.Status != metav1.ConditionTrue {
apimeta.SetStatusCondition(&rs.Conditions, *acnd)
}
if acnd := apimeta.FindStatusCondition(r.Conditions, ocv1.ClusterExtensionRevisionTypeAvailable); pcnd.Status == metav1.ConditionFalse && acnd != nil && acnd.Status != metav1.ConditionTrue {
apimeta.SetStatusCondition(&rs.Conditions, *acnd)
}
}

Copilot uses AI. Check for mistakes.
}
}

if !rres.InTransistion() {
Copy link

Copilot AI Nov 5, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'InTransistion' to 'InTransition'.

Suggested change
if !rres.InTransistion() {
if !rres.InTransition() {

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

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants