Skip to content

OPRUN-4392,OPRUN-4393: Add OLMv1 progress deadline QE tests#745

Open
bandrade wants to merge 2 commits into
openshift:mainfrom
bandrade:feature/ocp-88331-88332-automation
Open

OPRUN-4392,OPRUN-4393: Add OLMv1 progress deadline QE tests#745
bandrade wants to merge 2 commits into
openshift:mainfrom
bandrade:feature/ocp-88331-88332-automation

Conversation

@bandrade
Copy link
Copy Markdown
Contributor

@bandrade bandrade commented Jun 3, 2026

Summary

  • Automates OCP-88331 and OCP-88332 in the OpenShift OLMv1 QE suite.
  • Adds a focused ClusterExtension progress-deadline spec that builds in-cluster bundle and catalog images for successful and failing rollout versions.
  • Verifies ProgressDeadlineExceeded on an initial failed rollout and ProbeFailure while upgrading to a bad revision under the NewOLMBoxCutterRuntime feature gate.

Validation

  • go test -mod=vendor ./test/qe/specs
  • make build
  • ./bin/olmv1-tests-ext list -o names | rg '88331|88332'\n- make verify GO=/Users/bandrade/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.7.darwin-arm64/bin/go

Summary by CodeRabbit

  • Tests
    • Added comprehensive test suite for ClusterExtension progress deadline and rollout scenarios, including validation of failure handling and upgrade behavior with persistent image errors.

Automate the ClusterExtension rollout failure coverage for OCP-88331 and OCP-88332 by building in-cluster bundle and catalog images for successful and failing bundle versions.

The new QE specs verify ProgressDeadlineExceeded on an initial failed rollout and ProbeFailure while upgrading to a bad revision under the BoxCutter runtime.

Signed-off-by: Bruno Andrade <bruno.balint@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

Walkthrough

Added a new Ginkgo test spec validating ClusterExtension progress deadline and rollout failure behavior. The suite constructs synthetic bundle and catalog OCI images, defines scenarios where a ClusterExtension transitions to ProgressDeadlineExceeded and where upgrades maintain multiple active revisions while reporting failures, and provides polling-based assertions for condition verification.

Changes

ClusterExtension Progress Deadline Test Suite

Layer / File(s) Summary
Test scenarios and fixture setup
openshift/tests-extension/test/qe/specs/olmv1_ce_progress_deadline.go
Two Ginkgo test cases verify progress deadline behavior: one expects a 1-minute deadline to transition to ProgressDeadlineExceeded with a failing bundle; the other expects an upgrade to keep both revisions active while the new revision reports rollout and probe failures. Fixture initializer creates namespace, service accounts, ClusterRoleBinding/RoleBinding for image pulls and controller operations, builds synthetic bundle and catalog images, and provides a helper to construct ClusterExtension specs with optional progress deadline.
Image and artifact building utilities
openshift/tests-extension/test/qe/specs/olmv1_ce_progress_deadline.go
Image build plumbing creates ImageStream and BuildConfig, generates tar archives from in-memory templated files with placeholder substitution, and orchestrates builds via CLI. Artifact generation converts bundle templates to tar inputs and marshals OLM catalog objects (bundles, channels, bundles in channels) to newline-delimited JSON metadata streams returned for catalog build.
Assertion and cleanup helpers
openshift/tests-extension/test/qe/specs/olmv1_ce_progress_deadline.go
Polling-based assertion functions wait for ClusterCatalog serving, ClusterExtension condition transitions, ClusterObjectSet condition states, and active revision counts. A shared eventually wrapper uses Gomega with timeout and poll intervals. A generic delete helper suppresses not-found errors during cleanup.
Embedded bundle and catalog templates
openshift/tests-extension/test/qe/specs/olmv1_ce_progress_deadline.go
Bundle Dockerfile with package manager setup, ConfigMap script template, and ClusterServiceVersion YAML with deployment specs, liveness/readiness probes, security context, and RBAC rules using parameterized placeholders. Minimal catalog Dockerfile copies generated metadata configs and labels the index path.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

lgtm

Suggested reviewers

  • camilamacedo86
  • dtfranz
  • bentito

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error Line 264 logs unfiltered command output in error messages which could expose sensitive build data, environment variables, and credentials from 'oc start-build'. Remove the 'output' variable from the error message on line 264, or sanitize it to exclude sensitive information.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (13 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed All test names are stable and deterministic. Describe and It() use static PolarionID identifiers with descriptive text; By() statements have static descriptions with no dynamic information.
Test Structure And Quality ✅ Passed Single-responsibility tests with proper setup/cleanup via BeforeEach/AfterEach and DeferCleanup; all cluster operations have 3-5 min timeouts; assertions include meaningful diagnostic messages.
Microshift Test Compatibility ✅ Passed Test uses build.openshift.io and image.openshift.io APIs, but is protected by exutil.SkipMicroshift() in BeforeEach which skips the entire suite on MicroShift.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Test deploys single-replica pods and validates ClusterExtension conditions without multi-node assumptions, pod anti-affinity, or node topology constraints.
Topology-Aware Scheduling Compatibility ✅ Passed Test file adds Ginkgo QE specs with embedded deployment manifests having replicas: 1 and no topology-unaware scheduling constraints like affinity rules or nodeSelectors.
Ote Binary Stdout Contract ✅ Passed New test file uses only safe operations: fmt.Sprintf (string formatting), writes to tar.Writer and strings.Builder (not stdout), and code inside Ginkgo Describe closures.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Test uses only cluster-internal image registry and release payload images; no hardcoded IPv4 addresses, external registry dependencies, or external connectivity requirements detected.
No-Weak-Crypto ✅ Passed No weak cryptography patterns detected. File contains no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB usage, custom crypto implementations, or non-constant-time secret comparisons.
Container-Privileges ✅ Passed No privileged container configurations found. Manifests include runAsNonRoot: true, allowPrivilegeEscalation: false, and all capabilities dropped.
Title check ✅ Passed The title accurately reflects the main change: adding OLMv1 progress deadline QE tests, with clear reference to the related issue numbers (OPRUN-4392, OPRUN-4393).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci Bot requested review from pedjak and rashmigottipati June 3, 2026 16:46
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 3, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bandrade
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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
openshift/tests-extension/test/qe/specs/olmv1_ce_progress_deadline.go (1)

34-36: 💤 Low value

Remove ineffective GinkgoRecover() call.

defer g.GinkgoRecover() at the Describe level is dead code. The Describe callback executes during test tree construction, not test execution, so this deferred call runs before any specs execute. GinkgoRecover is designed to catch panics within goroutines spawned from It blocks, not at the suite construction level.

🧹 Suggested fix
 var _ = g.Describe("[sig-olmv1][Jira:OLM][OCPFeatureGate:NewOLMBoxCutterRuntime] clusterextension progress deadline", g.Label("NonHyperShiftHOST"), func() {
-	defer g.GinkgoRecover()
-
 	var oc = exutil.NewCLIWithoutNamespace("default")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@openshift/tests-extension/test/qe/specs/olmv1_ce_progress_deadline.go` around
lines 34 - 36, Remove the ineffective deferred call to g.GinkgoRecover() from
the Describe callback: locate the anonymous function passed to g.Describe (the
function literal in the declaration starting with var _ = g.Describe(..., func()
{ ... })) and delete the line containing defer g.GinkgoRecover(); if panic
recovery is needed for goroutines spawned during tests, move a g.GinkgoRecover()
call into the appropriate It/BeforeEach/AfterEach block or the goroutine
entrypoint instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@openshift/tests-extension/test/qe/specs/olmv1_ce_progress_deadline.go`:
- Around line 34-36: Remove the ineffective deferred call to g.GinkgoRecover()
from the Describe callback: locate the anonymous function passed to g.Describe
(the function literal in the declaration starting with var _ = g.Describe(...,
func() { ... })) and delete the line containing defer g.GinkgoRecover(); if
panic recovery is needed for goroutines spawned during tests, move a
g.GinkgoRecover() call into the appropriate It/BeforeEach/AfterEach block or the
goroutine entrypoint instead.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 9db03a8f-8565-4538-ba1f-c5d77f3957d3

📥 Commits

Reviewing files that changed from the base of the PR and between 402aee8 and 1266b54.

📒 Files selected for processing (1)
  • openshift/tests-extension/test/qe/specs/olmv1_ce_progress_deadline.go

Regenerate the tests-extension metadata after adding the ClusterExtension progress deadline QE coverage.

Signed-off-by: Bruno Andrade <bruno.balint@gmail.com>
@bandrade
Copy link
Copy Markdown
Contributor Author

bandrade commented Jun 4, 2026

/test openshift-e2e-aws
/test openshift-e2e-aws-techpreview

@bandrade
Copy link
Copy Markdown
Contributor Author

bandrade commented Jun 4, 2026

/test openshift-e2e-aws-techpreview

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jun 4, 2026

@bandrade: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@tmshort
Copy link
Copy Markdown
Contributor

tmshort commented Jun 4, 2026

Needs a Jira ticket or NO-ISSUE

@dtfranz
Copy link
Copy Markdown
Contributor

dtfranz commented Jun 5, 2026

/retitle OPRUN-4392,OPRUN-4393: Add OLMv1 progress deadline QE tests

@openshift-ci openshift-ci Bot changed the title 🌱 Add OLMv1 progress deadline QE tests OPRUN-4392,OPRUN-4393: Add OLMv1 progress deadline QE tests Jun 5, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 5, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Jun 5, 2026

@bandrade: This pull request references OPRUN-4392 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

This pull request references OPRUN-4393 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Automates OCP-88331 and OCP-88332 in the OpenShift OLMv1 QE suite.
  • Adds a focused ClusterExtension progress-deadline spec that builds in-cluster bundle and catalog images for successful and failing rollout versions.
  • Verifies ProgressDeadlineExceeded on an initial failed rollout and ProbeFailure while upgrading to a bad revision under the NewOLMBoxCutterRuntime feature gate.

Validation

  • go test -mod=vendor ./test/qe/specs
  • make build
  • ./bin/olmv1-tests-ext list -o names | rg '88331|88332'\n- make verify GO=/Users/bandrade/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.7.darwin-arm64/bin/go

Summary by CodeRabbit

  • Tests
  • Added comprehensive test suite for ClusterExtension progress deadline and rollout scenarios, including validation of failure handling and upgrade behavior with persistent image errors.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

})

g.By("creating a ClusterExtension with a 1-minute progress deadline for the failing bundle")
ce := fixture.newClusterExtension("test-ce-install-timeout-"+caseID, "1.0.2", "olm-sa", ptr.To(int32(1)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How are you running the tests? I may be running this wrong - this step fails for me because the progressDeadlineMinutes must be >= 10. We solved that in the upstream tests by patching the CRD, but I don't see that happening in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants