Skip to content

Add ACS SMOKE test pipeline for OPP interop - #82838

Closed
amp-rh wants to merge 7 commits into
openshift:mainfrom
redhat-chai-bot:acs-opp-interop-phase1
Closed

Add ACS SMOKE test pipeline for OPP interop#82838
amp-rh wants to merge 7 commits into
openshift:mainfrom
redhat-chai-bot:acs-opp-interop-phase1

Conversation

@amp-rh

@amp-rh amp-rh commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ACS (StackRox) SMOKE test integration to the OPP interop test suite,
as part of the INTEROP-8003 epic. This implements Phase 1 — step-registry
refs and OPP config wiring — using the existing stackrox qa-tests-backend
Gradle test suite.

Changes

Phase 1a — Readiness gate (stackrox-opp-readiness)

  • Polling loop (30s interval, 5 min timeout) discovers ACS namespaces
    dynamically via Central/SecuredCluster CRs (--all-namespaces)
  • Validates: Central route → API health (/v1/metadata) → secured
    cluster connected (/v1/clusters) → sensor pods Running (with
    OOMKilled detection) → default policies loaded (>80)
  • Extracts ROX_ADMIN_PASSWORD from central-htpasswd secret
    (xtrace disabled during credential handling)
  • Writes credentials and connection details to $SHARED_DIR

Phase 1b — SMOKE test runner (stackrox-opp-smoke)

  • Runs from acs-smoke-runner image (UBI9/openjdk-17 + git + oc)
  • Sparse clones stackrox/stackrox (qa-tests-backend/ + proto/) and
    stackrox/scanner (proto/scanner)
  • Runs ./gradlew testSMOKE -i --no-daemon
  • Copies JUnit XML + HTML report to $ARTIFACT_DIR regardless of
    test exit code

Phase 1c — OPP config wiring

  • Adds acs-smoke-runner dockerfile_literal image to the OPP 4.22
    ci-operator config
  • Inserts both step refs in interop-opp-aws test chain after
    cucushift-installer-check-cluster-health, before
    acm-tests-clc-create

Jira

INTEROP-8003

/cc @cspi-qe-ocp-lp

Summary by CodeRabbit

  • Adds ACS (StackRox) Phase 1 SMOKE coverage to the OPP AWS interop workflow.
  • Adds stackrox-opp-readiness to validate ACS health, connectivity, sensor pods, policies, and credentials.
  • Adds stackrox-opp-smoke to run qa-tests-backend SMOKE tests and publish JUnit and HTML reports.
  • Adds the acs-smoke-runner image with UBI OpenJDK 17, Git, oc, and kubectl tooling.
  • Adds CI step ownership and metadata for the new readiness and smoke tests.

redhat-chai-bot and others added 2 commits August 3, 2026 18:37
Add stackrox-opp-readiness and stackrox-opp-smoke step-registry
components for running ACS SMOKE tests as part of the OPP interop
pipeline.

Phase 1a: stackrox-opp-readiness step
- Polling loop with 30s interval / 5min timeout
- Namespace discovery via Central and SecuredCluster CRs
- Central route, API health, cluster connectivity checks
- Sensor pod status with OOMKilled detection
- Default policy count validation (>80)
- Credential extraction with xtrace protection
- Writes ROX_ADMIN_PASSWORD, CENTRAL_URL, CENTRAL_NS, SC_NS
  to SHARED_DIR

Phase 1b: stackrox-opp-smoke step
- Sparse-clones stackrox/stackrox and stackrox/scanner repos
- Runs ./gradlew testSMOKE from qa-tests-backend/
- Copies JUnit XML results to ARTIFACT_DIR
- Uses acs-smoke-runner image (UBI9 + OpenJDK 17)

Phase 1c: OPP 4.22 config update
- Adds dockerfile_literal image build for acs-smoke-runner
- Inserts readiness and smoke refs into interop-opp-aws test chain
  after cucushift-installer-check-cluster-health

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The generate-registry-metadata tool rewrites metadata.json files
to canonical format with path and owners (derived from OWNERS files),
replacing the manual labels/description fields.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@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 Aug 3, 2026
@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: amp-rh
Once this PR has been reviewed and has the lgtm label, please assign gparvin 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

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The AWS interop workflow builds an ACS smoke-test image, validates StackRox OPP readiness, and runs the ACS backend smoke suite with published reports.

Changes

ACS OPP smoke-test integration

Layer / File(s) Summary
Runner image and workflow wiring
ci-operator/config/stolostron/policy-collection/stolostron-policy-collection-main__ocp4.22.yaml, ci-operator/step-registry/stackrox/opp-readiness/*
Defines an OpenJDK 17 runner with Git and verified OpenShift clients. Adds readiness and smoke steps to the AWS interop sequence.
StackRox OPP readiness gate
ci-operator/step-registry/stackrox/opp-readiness/*
Discovers ACS namespaces and validates Central access, cluster connectivity, sensor health, and policy loading. Writes credentials and connection details to SHARED_DIR.
StackRox OPP smoke-test execution
ci-operator/step-registry/stackrox/opp-smoke/*
Loads readiness outputs, prepares source repositories, runs testSMOKE, preserves the exit status, and publishes JUnit and optional HTML reports.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AWSInterop
  participant ReadinessGate
  participant OpenShift
  participant SmokeRunner
  participant ARTIFACT_DIR
  AWSInterop->>ReadinessGate: validate StackRox OPP readiness
  ReadinessGate->>OpenShift: check Central, clusters, sensors, and policies
  OpenShift-->>ReadinessGate: return readiness status
  ReadinessGate->>SmokeRunner: provide SHARED_DIR credentials and endpoints
  SmokeRunner->>OpenShift: run ACS backend smoke tests
  SmokeRunner->>ARTIFACT_DIR: publish test reports
Loading
🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning The smoke step clones stackrox/stackrox and stackrox/scanner from github.com, and the runner image downloads oc from mirror.openshift.com; these require public internet access. Use internal mirrors for all downloads or mark the test [Skipped:Disconnected]; also run /payload-job periodic-ci-openshift-release-master-nightly-4.22-e2e-metal-ipi-ovn-ipv6.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding an ACS smoke-test pipeline for OPP interop.
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.
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 The complete PR diff adds only CI shell/YAML, metadata, and OWNERS files; it contains no Ginkgo It/Describe/Context/When declarations or dynamic test titles.
Test Structure And Quality ✅ Passed The PR adds Bash/YAML CI wiring only; no Ginkgo test files or lifecycle/assertion constructs are present, and the smoke step invokes an external Gradle suite.
Microshift Test Compatibility ✅ Passed The PR adds CI shell scripts and YAML/metadata only; no new Ginkgo e2e tests or Describe/Context/When/It declarations are present.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The complete PR diff adds only CI YAML, JSON, OWNERS, and shell files; it contains no new Ginkgo tests or SNO multi-node assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The PR adds CI image and StackRox step scripts/refs only; no deployment, operator, controller, affinity, topology spread, node selection, toleration, replica, or PDB scheduling constraints are intr...
Ote Binary Stdout Contract ✅ Passed The PR changes only shell, YAML, JSON, and OWNERS files; it adds no OTE or openshift-tests binary entrypoint. Shell echo output is CI-step logging, not OTE stdout.
No-Weak-Crypto ✅ Passed The complete PR patch has no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom crypto, or secret/token comparisons; its only hash check is SHA-256.
Container-Privileges ✅ Passed No privileged, host namespace, SYS_ADMIN, or allowPrivilegeEscalation settings exist; the image uses root only for installation and sets runtime USER 1001.
No-Sensitive-Data-In-Logs ✅ Passed Credential reads and authenticated curl calls run with xtrace disabled; logs emit only status/count messages and do not print passwords or Central URLs.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 5

🧹 Nitpick comments (2)
ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh (1)

40-41: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Pin the cloned repositories to a specific ref for reproducible smoke runs.

git clone --depth 1 --filter=blob:none --sparse pulls the default main branch of stackrox/stackrox and stackrox/scanner with no commit or tag pin. Any change on those repos' main branches (e.g., a broken qa-tests-backend commit) will affect every future run of this step, independent of changes in this repository, making failures harder to attribute and reproduce.

Pin to a known-good tag or commit SHA, and consider making it overridable via an environment variable for maintenance.

Also applies to: 49-50

🤖 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 `@ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh`
around lines 40 - 41, Update the StackRox repository clone commands in the
smoke-test setup to check out a known-good tag or commit SHA instead of the
default branch, applying the same pin to the scanner clone. Allow the pinned ref
to be overridden through an environment variable for maintenance while retaining
the known-good value as the default.
ci-operator/config/stolostron/policy-collection/stolostron-policy-collection-main__ocp4.22.yaml (1)

51-57: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Pin the base image tag and verify the downloaded client binaries.

The acs-smoke-runner image builds FROM registry.access.redhat.com/ubi9/openjdk-17:latest, an unpinned tag, and extracts oc/kubectl from a remote tarball with no checksum or signature verification. Both reduce build reproducibility: the image content can change silently between CI runs, and a compromised or corrupted download would not be detected.

Pin the base image to a specific tag or digest, and validate the downloaded tarball against a published checksum before extracting it.

🔒 Proposed hardening for the Dockerfile literal
   - dockerfile_literal: |
-      FROM registry.access.redhat.com/ubi9/openjdk-17:latest
+      FROM registry.access.redhat.com/ubi9/openjdk-17:1.21
       USER root
       RUN microdnf install -y git && microdnf clean all
-      RUN curl -sL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz \
-          | tar xz -C /usr/local/bin oc kubectl
+      RUN curl -sLo /tmp/oc-client.tar.gz https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz \
+          && curl -sL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/sha256sum.txt | grep openshift-client-linux.tar.gz | sha256sum -c - \
+          && tar xz -f /tmp/oc-client.tar.gz -C /usr/local/bin oc kubectl \
+          && rm -f /tmp/oc-client.tar.gz
🤖 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
`@ci-operator/config/stolostron/policy-collection/stolostron-policy-collection-main__ocp4.22.yaml`
around lines 51 - 57, Update the acs-smoke-runner dockerfile_literal to use a
specific immutable UBI OpenJDK base tag or digest instead of latest, and
download the OpenShift client checksum from the corresponding published source.
Verify the tarball against that checksum before extracting oc and kubectl,
failing the build on mismatch.
🤖 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
`@ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-commands.sh`:
- Around line 80-81: Remove the echo of CENTRAL_URL from the readiness command
flow to prevent the Central route host from appearing in CI logs. Keep writing
CENTRAL_URL to SHARED_DIR as the existing downstream mechanism, without adding
another URL-bearing log statement.
- Around line 98-107: Replace the unconditional `set -x 2>/dev/null || true`
restoration commands in `check_clusters_connected` and the corresponding blocks
around lines 112-117, 166-175, and 184-186 with restoration that keeps xtrace
disabled. Preserve the existing sensitive-command protection and error-return
behavior without enabling tracing for the remainder of the script.

In
`@ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-ref.yaml`:
- Line 9: Increase the step timeout configured near the stackrox-opp-readiness
step beyond 10m0s so the seven sequential wait_for checks in
stackrox-opp-readiness-commands.sh can exhaust their retry budgets and emit
their own timeout diagnostics before ci-operator terminates the pod.

In `@ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh`:
- Line 31: Remove the Central URL value from the logging statement in the smoke
command script by deleting the echo or replacing ${CENTRAL_URL} with a redacted
placeholder, while preserving other smoke-test logging.
- Around line 27-29: Remove the unconditional tracing enablement after reading
ROX_ADMIN_PASSWORD in the stackrox-opp-smoke command flow. Preserve tracing as
disabled, matching the behavior of stackrox-opp-readiness-commands.sh, and avoid
invoking set -x in this script.

---

Nitpick comments:
In
`@ci-operator/config/stolostron/policy-collection/stolostron-policy-collection-main__ocp4.22.yaml`:
- Around line 51-57: Update the acs-smoke-runner dockerfile_literal to use a
specific immutable UBI OpenJDK base tag or digest instead of latest, and
download the OpenShift client checksum from the corresponding published source.
Verify the tarball against that checksum before extracting oc and kubectl,
failing the build on mismatch.

In `@ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh`:
- Around line 40-41: Update the StackRox repository clone commands in the
smoke-test setup to check out a known-good tag or commit SHA instead of the
default branch, applying the same pin to the scanner clone. Allow the pinned ref
to be overridden through an environment variable for maintenance while retaining
the known-good value as the default.
🪄 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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f2aed87-8e32-442a-837a-76c046a31b39

📥 Commits

Reviewing files that changed from the base of the PR and between 7e2cec1 and dcd29b7.

📒 Files selected for processing (9)
  • ci-operator/config/stolostron/policy-collection/stolostron-policy-collection-main__ocp4.22.yaml
  • ci-operator/step-registry/stackrox/opp-readiness/OWNERS
  • ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-commands.sh
  • ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-ref.metadata.json
  • ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-ref.yaml
  • ci-operator/step-registry/stackrox/opp-smoke/OWNERS
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-ref.metadata.json
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-ref.yaml

Comment thread ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-ref.yaml Outdated
Comment thread ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh Outdated
Comment thread ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh Outdated
redhat-chai-bot and others added 2 commits August 4, 2026 14:24
- Remove sensitive URL/namespace values from CI logs
- Remove incorrect set -x re-enablement (tracing was never on)
- Increase readiness step timeout from 10m to 40m
- Add non-root USER 1001 to acs-smoke-runner Dockerfile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Make stackrox/scanner clone refs overridable via env vars
- Pin ubi9/openjdk-17 base image to tag 1.21
- Add SHA-256 checksum verification for oc client download

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh (2)

71-72: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Initialize TEST_EXIT before running Gradle.

If the job environment already defines TEST_EXIT, a successful Gradle run preserves that stale value because the || branch is skipped. The step can report failure after a successful smoke test.

Initialize TEST_EXIT=0 before Line 71, or use an explicit if/else.

Proposed fix
+TEST_EXIT=0
 ./gradlew testSMOKE -i --no-daemon || TEST_EXIT=$?
-TEST_EXIT="${TEST_EXIT:-0}"
🤖 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 `@ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh`
around lines 71 - 72, Initialize TEST_EXIT to 0 before the ./gradlew testSMOKE
command, so a successful run cannot preserve a stale environment value; retain
the existing assignment of the Gradle failure status when the command fails.

77-88: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep artifact collection from changing or hiding the test result.

mkdir -p at Line 86 runs under set -e without a guard. An artifact-directory failure can exit the script before it returns the captured TEST_EXIT. The cp commands suppress all errors, so report publication can fail without a warning.

Handle mkdir and cp failures explicitly, log warnings, and always return the captured test status.

🤖 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 `@ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh`
around lines 77 - 88, Update the artifact collection block after the smoke test
to explicitly handle failures from mkdir and both cp operations, logging
warnings when JUnit or HTML report publication fails instead of suppressing
errors. Ensure these failures cannot terminate the script under set -e, and
preserve the final return of the captured TEST_EXIT status regardless of
artifact-collection outcomes.
🤖 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.

Outside diff comments:
In `@ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh`:
- Around line 71-72: Initialize TEST_EXIT to 0 before the ./gradlew testSMOKE
command, so a successful run cannot preserve a stale environment value; retain
the existing assignment of the Gradle failure status when the command fails.
- Around line 77-88: Update the artifact collection block after the smoke test
to explicitly handle failures from mkdir and both cp operations, logging
warnings when JUnit or HTML report publication fails instead of suppressing
errors. Ensure these failures cannot terminate the script under set -e, and
preserve the final return of the captured TEST_EXIT status regardless of
artifact-collection outcomes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e6271c7-827a-47b7-bb0b-248711493638

📥 Commits

Reviewing files that changed from the base of the PR and between c20f375 and 27c76c8.

📒 Files selected for processing (2)
  • ci-operator/config/stolostron/policy-collection/stolostron-policy-collection-main__ocp4.22.yaml
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • ci-operator/config/stolostron/policy-collection/stolostron-policy-collection-main__ocp4.22.yaml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@amp-rh
amp-rh marked this pull request as ready for review August 4, 2026 18:43
@redhat-chai-bot

Copy link
Copy Markdown
Contributor

/pj-rehearse


AI-generated. Review for accuracy.

@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 Aug 4, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

- Declare STACKROX_REF and SCANNER_REF in smoke ref YAML
- Guard artifact collection against masking test exit code
- Increase memory request to 6Gi with JVM heap cap
- Add retry wrapper for sparse git clones

@coderabbitai coderabbitai Bot left a comment

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.

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 `@ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh`:
- Around line 37-49: Update retry_clone and its callers to remove the known
StackRox and Scanner clone destination directories before each retry attempt,
including the additional clone call sites noted in the review. Ensure cleanup
occurs only before rerunning a failed clone and preserves the existing retry
behavior.
🪄 Autofix

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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: c9b25810-6c54-47f0-843e-76c3a5e6d696

📥 Commits

Reviewing files that changed from the base of the PR and between 12743d6 and cdc0f79.

📒 Files selected for processing (2)
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-ref.yaml

Comment on lines +37 to +49
retry_clone() {
local max_attempts=3
local attempt=1
while [[ $attempt -le $max_attempts ]]; do
if "$@"; then
return 0
fi
echo "[smoke] Clone attempt $attempt/$max_attempts failed, retrying in 10s..."
sleep 10
attempt=$((attempt + 1))
done
echo "[smoke] ERROR: Clone failed after $max_attempts attempts"
return 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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Remove failed clone directories before each retry.

If git clone fails after it creates its destination, the next attempt uses the same non-empty directory and fails immediately. Clean the known StackRox and Scanner clone destinations before rerunning each clone command, or clone into a new temporary directory for each attempt.

Also applies to: 55-57, 66-66

🤖 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 `@ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh`
around lines 37 - 49, Update retry_clone and its callers to remove the known
StackRox and Scanner clone destination directories before each retry attempt,
including the additional clone call sites noted in the review. Ensure cleanup
occurs only before rerunning a failed clone and preserves the existing retry
behavior.

The RUN command downloaded the OC client tarball as /tmp/oc-client.tar.gz
but sha256sum.txt references openshift-client-linux.tar.gz. When
sha256sum -c reads from stdin, it looks for a file named
openshift-client-linux.tar.gz which does not exist, causing the
verification to always fail.

Fix by cd-ing into /tmp and using curl -LO to save the file with its
original name (openshift-client-linux.tar.gz), matching what sha256sum
expects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@redhat-chai-bot

Copy link
Copy Markdown
Contributor

/pj-rehearse


AI-generated. Review for accuracy.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@redhat-chai-bot: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@amp-rh: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-stolostron-policy-collection-main-ocp4.22-images stolostron/policy-collection presubmit Ci-operator config changed
periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-aws N/A periodic Ci-operator config changed
periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-vsphere N/A periodic Ci-operator config changed
periodic-ci-stolostron-policy-collection-main-ocp4.22-upgrade-interop-opp-upgrade-aws N/A periodic Ci-operator config changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@amp-rh

amp-rh commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@amp-rh: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci

openshift-ci Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@amp-rh: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/rehearse/periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-vsphere f19cb22 link unknown /pj-rehearse periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-vsphere
ci/rehearse/periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-aws f19cb22 link unknown /pj-rehearse periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-aws
ci/rehearse/periodic-ci-stolostron-policy-collection-main-ocp4.22-upgrade-interop-opp-upgrade-aws f19cb22 link unknown /pj-rehearse periodic-ci-stolostron-policy-collection-main-ocp4.22-upgrade-interop-opp-upgrade-aws

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.

@amp-rh

amp-rh commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by new PR from amp-rh fork with code fixes addressing review feedback.

@amp-rh amp-rh closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants