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
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. Signed-off-by: Daniel Franz <dfranz@redhat.com>
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.
| out, err := k8scliWithInput(yamlContent, "apply", "-f", "-") | ||
| if err != nil { | ||
| return fmt.Errorf("failed to apply resource %v %w", out, err) | ||
| return fmt.Errorf("failed to apply resource %v %w", out, stderrOutput(err)) |
There was a problem hiding this comment.
fmt.Errorf uses %w with stderrOutput(err) (a string), which will not compile because %w requires an error. Keep wrapping err with %w and include stderr via %s (or similar) as a separate formatting argument.
| return fmt.Errorf("failed to apply resource %v %w", out, stderrOutput(err)) | |
| return fmt.Errorf("failed to apply resource %v: %s: %w", out, stderrOutput(err), err) |
| sc.Step(`^(?i)resource "([^"]+)" is available$`, ResourceAvailable) | ||
| sc.Step(`^(?i)resource "([^"]+)" is removed$`, ResourceRemoved) | ||
| sc.Step(`^(?i)resource "([^"]+)" is eventually not found$`, ResourceEventuallyNotFound) | ||
| sc.Step(`^(?i)resource "([^"]+)" is (eventually not found|not installed)$`, ResourceEventuallyNotFound) |
There was a problem hiding this comment.
This regex adds a second capture group (eventually not found|not installed), which requires ResourceEventuallyNotFound to accept an additional string argument; otherwise Godog step binding will fail at runtime. If the handler doesn’t need the phrase, make the alternation non-capturing (e.g., (?:...)) or split into two separate steps with appropriately matched handler signatures.
| sc.Step(`^(?i)resource "([^"]+)" is (eventually not found|not installed)$`, ResourceEventuallyNotFound) | |
| sc.Step(`^(?i)resource "([^"]+)" is (?:eventually not found|not installed)$`, ResourceEventuallyNotFound) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2535 +/- ##
==========================================
- Coverage 68.62% 68.60% -0.03%
==========================================
Files 131 131
Lines 9288 9304 +16
==========================================
+ Hits 6374 6383 +9
- Misses 2427 2434 +7
Partials 487 487
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:
|
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