Skip to content

OPRUN-4228: Add boxcutter tests#672

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
camilamacedo86:add-boxcutter-test
Mar 24, 2026
Merged

OPRUN-4228: Add boxcutter tests#672
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
camilamacedo86:add-boxcutter-test

Conversation

@camilamacedo86
Copy link
Contributor

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Walkthrough

Added five new OLMv1 Boxcutter runtime test entries to the test manifest file and implemented corresponding test cases in Go that validate cluster extension lifecycle operations including installation, status updates, resource labeling, cleanup, and reinstallation. All tests are gated by the OCPFeatureGate:NewOLMBoxCutterRuntime feature flag.

Changes

Cohort / File(s) Summary
OLMv1 Boxcutter Runtime Tests
openshift/tests-extension/.openshift-tests-extension/openshift_payload_olmv1.json
Added five new test manifest entries gated by OCPFeatureGate:NewOLMBoxCutterRuntime, marked as blocking lifecycle tests for Boxcutter runtime cluster extension operations: installation, active revision reporting, resource labeling, cleanup, and reinstallation.
OLMv1 Boxcutter Runtime Test Implementation
openshift/tests-extension/test/olmv1-boxcutter.go
New Ginkgo test suite implementing five test cases validating OLMv1 Boxcutter runtime functionality: ClusterExtension installation and availability, active revision status reporting, OLM ownership label verification on managed resources, deletion and cleanup behavior, and post-deletion reinstallation capability.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci bot requested review from thetechnick and tmshort March 23, 2026 15:08
@camilamacedo86 camilamacedo86 changed the title USPTREAM: <carry>: Add boxcutter tests NO-ISSUE: Add boxcutter tests Mar 23, 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 Mar 23, 2026
@openshift-ci-robot
Copy link

@camilamacedo86: This pull request explicitly references no jira issue.

Details

In response to this:

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.

@camilamacedo86 camilamacedo86 changed the title NO-ISSUE: Add boxcutter tests OPRUN-4228: Add boxcutter tests Mar 23, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 23, 2026

@camilamacedo86: This pull request references OPRUN-4228 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 task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

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.

Copy link

@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/olmv1-boxcutter.go (1)

163-192: Consider adding DeferCleanup for the first extension as a safety net.

If this test fails between creating the first ClusterExtension (line 168) and calling firstCleanup() (line 176), orphaned resources will remain until the next test run cleans them via EnsureCleanupClusterExtension. While this eventually self-heals, adding a DeferCleanup call immediately after creation provides more robust cleanup:

♻️ Suggested improvement
 	By("applying the ClusterExtension resource for the first time")
 	firstName, firstCleanup := helpers.CreateClusterExtension(opName, "", nsName, unique, helpers.WithCatalogNameSelector(ccName))
+	DeferCleanup(firstCleanup)
 
 	By("waiting for the first installation to complete")

This ensures cleanup happens even if the test fails early. The explicit firstCleanup() call on line 176 will still work (cleanup functions typically ignore "not found" errors).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@openshift/tests-extension/test/olmv1-boxcutter.go` around lines 163 - 192,
After creating the first ClusterExtension with helpers.CreateClusterExtension
(returning firstName, firstCleanup), immediately register the cleanup with
DeferCleanup(firstCleanup) to guarantee resource cleanup if the test fails
before the explicit firstCleanup() call; keep the existing explicit
firstCleanup() later (it will be a no-op if already cleaned), and reference
firstName/firstCleanup/CreateClusterExtension/DeferCleanup when making this
change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@openshift/tests-extension/test/olmv1-boxcutter.go`:
- Around line 163-192: After creating the first ClusterExtension with
helpers.CreateClusterExtension (returning firstName, firstCleanup), immediately
register the cleanup with DeferCleanup(firstCleanup) to guarantee resource
cleanup if the test fails before the explicit firstCleanup() call; keep the
existing explicit firstCleanup() later (it will be a no-op if already cleaned),
and reference firstName/firstCleanup/CreateClusterExtension/DeferCleanup when
making this change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a06ba30c-decf-499d-8332-bb07c1f4ea4b

📥 Commits

Reviewing files that changed from the base of the PR and between 40473ed and 685cfb0.

📒 Files selected for processing (2)
  • openshift/tests-extension/.openshift-tests-extension/openshift_payload_olmv1.json
  • openshift/tests-extension/test/olmv1-boxcutter.go

@camilamacedo86 camilamacedo86 changed the title OPRUN-4228: Add boxcutter tests WIP: OPRUN-4228: Add boxcutter tests Mar 23, 2026
@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 Mar 23, 2026
@camilamacedo86
Copy link
Contributor Author

/test e2e-aws-techpreview-olmv1-ext

@camilamacedo86 camilamacedo86 changed the title WIP: OPRUN-4228: Add boxcutter tests OPRUN-4228: Add boxcutter tests Mar 24, 2026
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 24, 2026
@bandrade
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 24, 2026
@tmshort
Copy link
Contributor

tmshort commented Mar 24, 2026

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 24, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, tmshort

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
@bandrade
Copy link
Contributor

/label qe-approved
/verified by @bandrade

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Mar 24, 2026
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 24, 2026

@camilamacedo86: This pull request references OPRUN-4228 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 task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

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.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 24, 2026
@openshift-ci-robot
Copy link

@bandrade: This PR has been marked as verified by @bandrade.

Details

In response to this:

/label qe-approved
/verified by @bandrade

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 24, 2026

@camilamacedo86: 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.

@openshift-merge-bot openshift-merge-bot bot merged commit 70b40c4 into openshift:main Mar 24, 2026
15 checks passed
@camilamacedo86 camilamacedo86 deleted the add-boxcutter-test branch March 24, 2026 18:12
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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants