Skip to content

✨ Default Probes Refactor#2586

Open
dtfranz wants to merge 1 commit intooperator-framework:mainfrom
dtfranz:default-probes-cer
Open

✨ Default Probes Refactor#2586
dtfranz wants to merge 1 commit intooperator-framework:mainfrom
dtfranz:default-probes-cer

Conversation

@dtfranz
Copy link
Contributor

@dtfranz dtfranz commented Mar 23, 2026

Migrates the default progression probes out of the CER controller into the boxcutter applier in order to use the ProgressionProbes API to transparently stamp out the checks. Also adds flag to the API to allow checking status.observedGeneration==metadata.generation before executing probes.

Description

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 March 23, 2026 14:52
@openshift-ci openshift-ci bot requested review from OchiengEd and perdasilva March 23, 2026 14:52
@netlify
Copy link

netlify bot commented Mar 23, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 55b3524
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/69c24e9a173e4b0007df47e2
😎 Deploy Preview https://deploy-preview-2586--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.

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

Refactors how default progression probes are applied by moving the built-in/default probe set out of the ClusterExtensionRevision controller and into the applier-generated ClusterExtensionRevision spec, and extends the ProgressionProbes API with an observedGeneration gating option.

Changes:

  • Add observedGeneration to ProgressionProbe (API/types + applyconfigurations + CRD schemas) and wire it into probe building.
  • Generate/stamp default progression probes in the applier when constructing ClusterExtensionRevision objects (and update unit expectations).
  • Update E2E feature specs to explicitly include progression probes when applying ClusterExtensionRevision directly.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/e2e/features/revision.feature Adds explicit progressionProbes to CER YAML used in E2E scenarios.
manifests/experimental.yaml Adds CRD schema for progressionProbes[].observedGeneration.
manifests/experimental-e2e.yaml Same CRD schema update for E2E manifests.
helm/olmv1/base/operator-controller/crd/experimental/olm.operatorframework.io_clusterextensionrevisions.yaml Helm-packaged CRD schema updated with observedGeneration.
api/v1/clusterextensionrevision_types.go Adds ObservedGeneration to ProgressionProbe and renames Go constants for probe type enums.
api/v1/zz_generated.deepcopy.go Adds deepcopy support for ObservedGeneration *bool.
applyconfigurations/api/v1/progressionprobe.go Adds ObservedGeneration field + WithObservedGeneration() builder.
internal/operator-controller/controllers/clusterextensionrevision_controller.go Stops injecting controller-side default probes; builds observedGeneration-wrapped probes from CER spec.
internal/operator-controller/applier/boxcutter.go Stamps default probes onto generated CER specs via defaultProgressionProbes().
internal/operator-controller/applier/boxcutter_test.go Updates expected generated CER spec to include default probes.

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

Comment on lines +546 to +552
var prober probing.Prober
if progressionProbe.ObservedGeneration != nil && *progressionProbe.ObservedGeneration {
// Wrap the and-ed probes within an ObservedGeneration probe
prober = &probing.ObservedGenerationProbe{Prober: assertions}
} else {
prober = &assertions
}
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

The new ObservedGeneration flag changes how progression probes are built (wrapping assertions in an ObservedGenerationProbe when enabled), but there doesn't appear to be unit test coverage asserting this behavior. Adding a focused test for buildProgressionProbes covering observedGeneration=true/false would help prevent regressions (e.g., verifying the resulting selector probe contains/doesn't contain an ObservedGenerationProbe wrapper).

Copilot uses AI. Check for mistakes.
@dtfranz dtfranz force-pushed the default-probes-cer branch from 94d5d71 to 8eb532b Compare March 23, 2026 14:58
Copilot AI review requested due to automatic review settings March 23, 2026 15:01
@dtfranz dtfranz force-pushed the default-probes-cer branch from 8eb532b to 4457677 Compare March 23, 2026 15:01
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 10 out of 10 changed files in this pull request and generated 2 comments.


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

@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.69%. Comparing base (a307a6d) to head (55b3524).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2586      +/-   ##
==========================================
+ Coverage   65.84%   68.69%   +2.84%     
==========================================
  Files         137      137              
  Lines        9560     9663     +103     
==========================================
+ Hits         6295     6638     +343     
+ Misses       2795     2524     -271     
- Partials      470      501      +31     
Flag Coverage Δ
e2e 37.67% <0.00%> (+26.48%) ⬆️
experimental-e2e 52.35% <100.00%> (+1.28%) ⬆️
unit 53.18% <85.58%> (+0.37%) ⬆️

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.

Migrates the default progression probes out of the CER controller into the boxcutter applier in order to use the ProgressionProbes API to transparently stamp out the checks. Also adds flag to the API to allow checking status.observedGeneration==metadata.generation before executing probes.

Signed-off-by: Daniel Franz <dfranz@redhat.com>
@dtfranz dtfranz force-pushed the default-probes-cer branch from 4457677 to 55b3524 Compare March 24, 2026 08:43
Copy link
Contributor

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Great 🥇
/approve

@openshift-ci
Copy link

openshift-ci bot commented Mar 24, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants