Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Adds readiness probing for additional Kubernetes resource types (Namespaces and PVCs) using CEL-based probes in the ClusterExtensionRevision reconciliation flow, and extends the e2e framework + scenarios to validate direct CER application and phase-blocking behavior when probes fail.
Changes:
- Add CEL readiness probes for Namespace (Active) and PersistentVolumeClaim (Bound) and wire them into the CER progress probe chain.
- Extend e2e step framework to support direct ClusterExtensionRevision application and scenario templating via
${CER_NAME}. - Add new e2e feature coverage for CER install success and probe-driven phase progression/halting (PVC scenarios), plus required RBAC.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/steps/testdata/rbac-template.yaml | Grants e2e SA permissions for PV/PVC resources needed by new scenarios. |
| test/e2e/steps/steps.go | Adds ${CER_NAME} templating and helper to fetch CER objects; expands step matching for “not installed”. |
| test/e2e/steps/hooks.go | Extends scenario context with CER name/state and updates cleanup behavior. |
| test/e2e/features/revision.feature | New e2e feature validating direct CER apply + probe gating for PVC phases. |
| test/e2e/README.md | Documents the new ${CER_NAME} scenario variable. |
| internal/operator-controller/controllers/clusterextensionrevision_controller.go | Initializes and registers CEL probes for Namespace/PVC readiness in CER reconcile options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
internal/operator-controller/controllers/clusterextensionrevision_controller.go
Outdated
Show resolved
Hide resolved
internal/operator-controller/controllers/clusterextensionrevision_controller.go
Outdated
Show resolved
Hide resolved
d87dfaf to
6a9f311
Compare
6a9f311 to
ec5019e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 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 Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2535 +/- ##
==========================================
- Coverage 68.62% 68.61% -0.02%
==========================================
Files 131 131
Lines 9288 9304 +16
==========================================
+ Hits 6374 6384 +10
- Misses 2427 2430 +3
- Partials 487 490 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
493a1a7 to
1c7882b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| func (c *ClusterExtensionRevisionReconciler) SetupWithManager(mgr ctrl.Manager) error { | ||
| // Initialize probes once at setup time | ||
| if err := initializeProbes(); err != nil { | ||
| return err | ||
| } |
There was a problem hiding this comment.
initializeProbes() is only invoked from SetupWithManager, but unit tests (and any direct calls to Reconcile without calling SetupWithManager) construct the reconciler and call Reconcile directly. In that case namespaceActiveProbe/pvcBoundProbe remain zero values, so the new readiness probes are effectively disabled (and could diverge from production behavior). Consider initializing these probes via a sync.Once guard that’s called from toBoxcutterRevision/Reconcile (and optionally from SetupWithManager), so probes are always available when reconciliation runs.
Adds readiness probing via CEL for namespaces and PVCs, to prevent subsequent phases from installing until their readiness checks have passed. Also adds e2e coverage via direct CER creation. Increased e2e timeout to 15m for experimental target. Signed-off-by: Daniel Franz <dfranz@redhat.com>
1c7882b to
1f0a99f
Compare
pedjak
left a comment
There was a problem hiding this comment.
not sure if for this PR is necessary to expose direct creation of CERs, instead of going through CE and appropriate bundles.
| } | ||
|
|
||
| // initializeProbes is used to initialize CEL probes at startup time, so we don't recreate them on every reconcile | ||
| func initializeProbes() error { |
There was a problem hiding this comment.
I would actually wrap this function into sync.OnceValue and then call it from reconcile loop - it looks cleaner from workflow point of view.
| And ServiceAccount "olm-sa" with needed permissions is available in ${TEST_NAMESPACE} | ||
|
|
||
| @BoxcutterRuntime | ||
| Scenario: Install simple revision |
There was a problem hiding this comment.
how is this scenario related to the logic introduced in PR? We have plenty of scenarios under install.feature that install exactly these resources.
| } | ||
|
|
||
| // initializeProbes is used to initialize CEL probes at startup time, so we don't recreate them on every reconcile | ||
| func initializeProbes() error { |
There was a problem hiding this comment.
I would wrap this into sync.OnceValue and then call it from reconcile loop, it feels more natural and matches the flow.
| """ | ||
|
|
||
| And resource "persistentvolumeclaim/test-pvc" is installed | ||
| And ClusterExtensionRevision "${CER_NAME}" reports Available as False with Reason ProbeFailure |
There was a problem hiding this comment.
is there any message we could assert?
| for _, r := range forDeletion { | ||
| if _, err := k8sClient("delete", r.kind, r.name, "--ignore-not-found=true"); err != nil { | ||
| logger.Info("Error deleting resource", "name", r.name, "namespace", sc.namespace, "stderr", stderrOutput(err)) | ||
| for _, r := range forDeletion { |
There was a problem hiding this comment.
how is this change related to the PR?
Adds readiness probing via CEL for namespaces and PVCs, to prevent subsequent phases from installing until their readiness checks have passed. Also adds e2e coverage via direct CER creation.
Description
Reviewer Checklist