PoC: Add OLM Smoke Test via GitHub Actions - #8113
Conversation
|
[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 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📝 WalkthroughWalkthroughThis PR adds a GitHub Actions workflow that builds and installs the operator through OLM on OpenShift, verifies resource health and validation, and collects diagnostics when checks fail. ChangesOLM smoke test automation
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant LocalRegistry
participant OpenShiftCluster
participant olmSmokeVerify
participant olmSmokeDiagnostics
GitHubActions->>LocalRegistry: build and push operator and bundle images
GitHubActions->>OpenShiftCluster: start cluster with preloaded images
GitHubActions->>OpenShiftCluster: install bundle through OLM
GitHubActions->>olmSmokeVerify: run verification checks
olmSmokeVerify->>OpenShiftCluster: query operator resources and custom resources
OpenShiftCluster-->>olmSmokeVerify: return resource states
GitHubActions->>OpenShiftCluster: run operator-sdk scorecard
alt workflow fails
GitHubActions->>olmSmokeDiagnostics: collect diagnostics
olmSmokeDiagnostics->>OpenShiftCluster: query logs, events, and OLM resources
OpenShiftCluster-->>olmSmokeDiagnostics: return diagnostic output
end
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
e275e27 to
5aa6b28
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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.
Inline comments:
In @.github/scripts/olm-smoke-verify.sh:
- Around line 70-77: Scope all operator resource commands to ${NAMESPACE}: add
the namespace option to the singleton oc wait and oc get commands in
.github/scripts/olm-smoke-verify.sh lines 70-77, both oc apply commands in
.github/scripts/olm-smoke-verify.sh lines 82-104, and the IBU oc describe
command in .github/scripts/olm-smoke-diagnostics.sh lines 23-24.
In @.github/workflows/olm-smoke-test.yml:
- Around line 33-48: Update the Checkout step to set persist-credentials to
false while retaining submodules: true, preventing PR-controlled make and shell
steps from accessing the checkout token. If authenticated submodules require
credentials, configure SSH-based submodule authentication instead.
- Around line 82-96: Update the “Start OpenShift cluster” workflow step to
verify or establish that quick-ocp preloads the bundle image at the same
internal registry path used by “Install operator via OLM.” Add a diagnostic or
bridge step that confirms the expected
image-registry.openshift-image-registry.svc:5000/openshift/${BUNDLE_IMG_NAME}:${IMG_TAG}
reference, creating the required ImageStream when necessary before running
operator-sdk.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 88973a3f-0b44-465c-910f-81b425a57510
📒 Files selected for processing (3)
.github/scripts/olm-smoke-diagnostics.sh.github/scripts/olm-smoke-verify.sh.github/workflows/olm-smoke-test.yml
5aa6b28 to
9eaa311
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In @.github/workflows/olm-smoke-test.yml:
- Around line 92-96: Update the namespace creation command before the
operator-sdk run bundle step to propagate failures from oc create namespace,
while explicitly treating only an already-existing namespace as success. Do not
retain the unconditional || true suppression; ensure API, authentication,
validation, and other creation errors terminate the workflow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 75f95571-c5b2-44c5-addb-294de47f7ca9
📒 Files selected for processing (3)
.github/scripts/olm-smoke-diagnostics.sh.github/scripts/olm-smoke-verify.sh.github/workflows/olm-smoke-test.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/scripts/olm-smoke-verify.sh
9eaa311 to
6e77d05
Compare
ec53a54 to
ff07f62
Compare
|
/retest |
8cb80ad to
69e9932
Compare
|
/retest |
69e9932 to
ef16dd3
Compare
ef16dd3 to
2b2f81f
Compare
|
@sebrandon1: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Summary
echo "Stub test target"ubuntu-24.04runners (~30-45 min total, CRC startup dominates); runs alongside Prow, does not replace itWhat it validates:
Succeeded, deployment rolls out, pod healthy (Running, Ready, 0 restarts)ImageBasedUpgrade,SeedGenerator,IPConfig)upgrade,seedimage,ipconfig), IBU reachesIdleHow it works:
preloadImagesmirrors both images into the cluster's internal registry -- no insecure registry config neededoperator-sdk run bundleinstalls the operator via OLM.github/scripts/Triggers: PR to
mainorrelease-*(skips docs-only), push tomain, manual viaworkflow_dispatch.github/workflows/olm-smoke-test.yml.github/scripts/olm-smoke-verify.sh.github/scripts/olm-smoke-diagnostics.shUpstream References
run bundleandscorecardsubcommandsTest Plan
workflow_dispatchmanual trigger works