Skip to content

INTEROP-9236: Add ACS SMOKE test pipeline for OPP interop - #83102

Open
amp-rh wants to merge 14 commits into
openshift:mainfrom
amp-rh:acs-opp-interop-phase1
Open

INTEROP-9236: Add ACS SMOKE test pipeline for OPP interop#83102
amp-rh wants to merge 14 commits into
openshift:mainfrom
amp-rh:acs-opp-interop-phase1

Conversation

@amp-rh

@amp-rh amp-rh commented Aug 7, 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, 10 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) OPP smoke-test integration to the OpenShift CI interop suite for OPP 4.22.

  • Adds readiness checks for ACS Central, authenticated API health, secured cluster connectivity, sensor readiness, and default policies.
  • Publishes ACS credentials and connection details to $SHARED_DIR.
  • Adds a smoke step that runs qa-tests-backend SMOKE tests and publishes JUnit and HTML reports.
  • Adds the acs-smoke-runner image and wires both steps into the interop-opp-aws test chain.
  • Sets the readiness timeout to 1 hour 15 minutes.
  • Uses authenticated /v1/metadata requests and removes the jq dependency.
  • Hardens xtrace scoping to prevent internal hostnames from appearing in CI logs.
  • Validates sensor readiness through the Ready=True condition.
  • Adds step ownership and generated registry metadata.

redhat-chai-bot and others added 7 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>
- 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>
Pre-initialize TEST_EXIT=0 before the Gradle invocation so that the
exit code is deterministic regardless of environment state.
Download the OC client with its original filename (-O) so sha256sum -c
can find it. Previously the file was saved as oc-client.tar.gz but the
sha256sum.txt referenced openshift-client-linux.tar.gz, causing all
three rehearsal jobs to fail at the image build step.
Increase per-check TIMEOUT from 300s to 600s in the readiness gate.
The Central API health check timed out at 300s in rehearsal runs
because Central can take 5-10 minutes to become responsive after
deployment.

Add rm -rf of clone target directories in the smoke runner before
git clone to prevent failures from stale partial clones.
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 7, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@amp-rh: This pull request references INTEROP-8003 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 epic to target the "5.0.0" version, but no target version was set.

Details

In response to this:

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, 10 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

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-merge-bot

Copy link
Copy Markdown
Contributor

@amp-rh, pj-rehearse: unable to determine affected jobs. This could be due to a branch that needs to be rebased. ERROR:

couldn't prepare candidate: couldn't checkout base SHA 881c8238ec9127f03dea4855057f97c86eac9845: error checking out "881c8238ec9127f03dea4855057f97c86eac9845": exit status 128 fatal: unable to read tree (881c8238ec9127f03dea4855057f97c86eac9845)

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 7, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-aws

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

@coderabbitai

coderabbitai Bot commented Aug 7, 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

Adds ACS OPP readiness validation and smoke testing to the OCP 4.22 AWS interop workflow. The changes add a runner image, readiness checks, shared credentials, test execution, and report collection.

Changes

ACS OPP testing

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/..., ci-operator/step-registry/stackrox/opp-smoke/...
Adds the acs-smoke-runner image, registers the readiness and smoke steps, and invokes both steps in the AWS interop workflow.
ACS readiness validation
ci-operator/step-registry/stackrox/opp-readiness/...
Discovers ACS namespaces, validates Central, cluster connectivity, sensor pods, and policy count, then writes credentials and connection details to SHARED_DIR.
ACS smoke-test execution
ci-operator/step-registry/stackrox/opp-smoke/...
Loads readiness outputs, clones StackRox and Scanner sources, runs testSMOKE, and copies JUnit and HTML reports to ARTIFACT_DIR.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AWSInterop
  participant ReadinessStep
  participant OpenShift
  participant Central
  participant SharedDir
  participant SmokeStep
  participant ArtifactDir

  AWSInterop->>ReadinessStep: Run ACS readiness
  ReadinessStep->>OpenShift: Discover namespaces and check sensors
  ReadinessStep->>Central: Validate API, clusters, and policies
  ReadinessStep->>SharedDir: Write credentials and connection details
  AWSInterop->>SmokeStep: Run ACS smoke tests
  SmokeStep->>SharedDir: Load readiness outputs
  SmokeStep->>Central: Execute testSMOKE
  SmokeStep->>ArtifactDir: Publish test reports
Loading

Important

Pre-merge checks failed

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

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error The readiness script re-enables xtrace before writing CENTRAL_URL; Bash traces the expanded value, which can expose an internal Central hostname in CI logs. Keep xtrace disabled through all SHARED_DIR writes, or disable xtrace globally and use safe, non-secret status messages.
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning The added SMOKE step clones stackrox/stackrox and stackrox/scanner from github.com, so it requires public internet access in disconnected CI. Mirror the repositories and Gradle dependencies, or skip this test in disconnected jobs; also run the IPv6 CI job /payload-job periodic-ci-openshift-release-master-nightly-4.22-e2e-metal-ipi-ovn-ipv6.
✅ Passed checks (12 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 addition of the ACS smoke test pipeline for OPP interop.
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 PR adds CI shell steps and invokes an external Gradle testSMOKE suite; it adds no Ginkgo test declarations or test titles, dynamic or otherwise.
Test Structure And Quality ✅ Passed The PR adds only Bash/YAML CI wiring; no Ginkgo It, BeforeEach, AfterEach, Eventually, or Consistently code is present. testSMOKE is an external Gradle suite.
Microshift Test Compatibility ✅ Passed The PR adds CI shell scripts and YAML/JSON/OWNERS files, but no new Ginkgo e2e tests or test declarations; the MicroShift compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds CI shell scripts, YAML/JSON registry metadata, and config wiring; it adds no Ginkgo It/Describe/Context/When tests or SNO-relevant multi-node assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The aggregate PR adds only CI image/step refs and shell checks; no Deployment/operator/controller manifests or affinity, spread, selectors, tolerations, replicas, or PDB constraints.
Ote Binary Stdout Contract ✅ Passed The PR changes only shell, YAML, JSON, and OWNERS files; no OTE binary, Go entry point, or Ginkgo suite setup was added.
No-Weak-Crypto ✅ Passed Changed CI scripts contain no MD5, SHA1, DES, RC4, Blowfish, or ECB usage; the image verifies downloads with SHA-256, and no secret/token comparisons are implemented.
Container-Privileges ✅ Passed No privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings exist; the image uses root only during build and runs as USER 1001.
✨ 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.

@openshift-ci

openshift-ci Bot commented Aug 7, 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 justinkuli 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 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: 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
`@ci-operator/config/stolostron/policy-collection/stolostron-policy-collection-main__ocp4.22.yaml`:
- Around line 56-58: Pin all externally executed artifacts to immutable
revisions: in
ci-operator/config/stolostron/policy-collection/stolostron-policy-collection-main__ocp4.22.yaml
lines 56-58, replace the stable OpenShift client URL with a release-specific URL
and validate it against a fixed expected checksum; in
ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh
lines 31-32, replace mutable StackRox and Scanner main-branch references with
immutable revisions and verify each checked-out commit before running Gradle.

In
`@ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-commands.sh`:
- Around line 87-90: Enable TLS certificate verification for all Central
requests by removing curl’s -k option in
ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-commands.sh
at lines 87-90 (health request), 101-105 (authenticated cluster request), and
165-171 (authenticated policy request); rely on the system trust bundle or
provide the ingress CA via --cacert.

In
`@ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-ref.yaml`:
- Line 9: Align the readiness gate’s total timeout with its retry budget: in
ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-ref.yaml
at lines 9-9, increase the step timeout if each wait_for check retains its
independent budget; alternatively, in
ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-commands.sh
at lines 30-30, replace the per-check ELAPSED reset with one deadline covering
all seven checks.
🪄 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: 9bf41049-e10a-4671-acca-4f75e94c5a38

📥 Commits

Reviewing files that changed from the base of the PR and between 574791c and c5b1593.

📒 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
Increase stackrox-opp-readiness step timeout from 40m to 50m.
With TIMEOUT=600 per check across 7 sequential checks, a slow
staged deployment could exceed 40m. The 50m budget provides
adequate headroom while the individual check timeouts prevent
infinite hangs.
@amp-rh

amp-rh commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-aws

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

@amp-rh amp-rh changed the title INTEROP-8003: Add ACS SMOKE test pipeline for OPP interop INTEROP-9236: Add ACS SMOKE test pipeline for OPP interop Aug 7, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@amp-rh: This pull request references INTEROP-9236 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 "5.0.0" version, but no target version was set.

Details

In response to this:

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, 10 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) OPP SMOKE test integration to the OpenShift CI interop suite for OPP 4.22.

  • Adds a readiness step that validates ACS Central, API health, secured cluster connectivity, sensor pods, and default policies.
  • Publishes ACS credentials and connection details to $SHARED_DIR.
  • Adds a smoke step that runs qa-tests-backend SMOKE tests and publishes JUnit and HTML reports.
  • Adds the acs-smoke-runner image and wires both steps into the interop-opp-aws test chain.
  • Sets the readiness timeout to 50 minutes for sequential checks.
  • Adds step ownership and generated registry metadata.

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.

- shell options: set -eux -o pipefail (openshift/release convention)
- function naming: function PascalCase () with typeset locals
- xtrace discipline: set +x / set -x pairs around sensitive ops
- replace || true with find -exec for artifact copy
- step timeout 50m -> 1h15m to cover worst-case polling budget

@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: 2

Caution

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

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

30-43: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Use one deadline for the readiness sequence.

Line 30 resets ELAPSED for every WaitFor call. The seven calls at Lines 66, 69, 79, 94, 125, 159, and 175 can each consume TIMEOUT. The full sequence can run for approximately 7 * TIMEOUT, not the single polling budget stated for this step.

Set one deadline before the first wait. Calculate each retry budget from that deadline.

🤖 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-readiness/stackrox-opp-readiness-commands.sh`
around lines 30 - 43, Use a single readiness deadline initialized before the
sequence of WaitFor calls instead of resetting ELAPSED inside each WaitFor
invocation. Update WaitFor and its retry/timeout checks to calculate remaining
time from that shared deadline, so all readiness checks collectively remain
within one TIMEOUT budget.
🤖 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 151-156: Update the sensor pod readiness check that builds
notRunning from podJson to require both status.phase == "Running" and a pod
status.conditions entry with type "Ready" and status "True" for every pod.
Preserve the existing name-and-phase reporting for pods that fail either
requirement and the final empty-result readiness check.
- Line 2: Update the shell options near CheckCentralApi so the script starts
without xtrace enabled, while retaining errexit and pipefail. Enable tracing
only in a narrowly scoped region that cannot expand or log the Central URL, and
disable it before the URL-consuming commands.

---

Outside diff comments:
In
`@ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-commands.sh`:
- Around line 30-43: Use a single readiness deadline initialized before the
sequence of WaitFor calls instead of resetting ELAPSED inside each WaitFor
invocation. Update WaitFor and its retry/timeout checks to calculate remaining
time from that shared deadline, so all readiness checks collectively remain
within one TIMEOUT budget.
🪄 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: 4afc50ba-93ee-42f1-942c-3bfde202dcdf

📥 Commits

Reviewing files that changed from the base of the PR and between a4d408d and 15c840d.

📒 Files selected for processing (3)
  • ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-commands.sh
  • ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-ref.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/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh

@amp-rh

amp-rh commented Aug 7, 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.

- Wrap CENTRAL_URL expansion and curl calls with set +x/set -x to
  prevent internal hostnames from leaking to CI xtrace output
- Change sensor pod check from phase-based (Running) to condition-based
  (Ready=True) to prevent flaky smoke runs when pods are Running but
  containers are not yet ready
- Add missing trailing newlines to metadata.json files
@amp-rh

amp-rh commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-aws

ACS Central now requires authentication for /v1/metadata.
Move ROX_ADMIN_PASSWORD extraction before the API health check
and pass credentials to the curl request.
@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.

@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

Caution

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

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

103-129: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Retry the central-htpasswd lookup.

The admin-password extraction runs once outside WaitFor. With set -euo pipefail, a transient oc, jq, or base64 failure can terminate readiness before later checks retry.

Move the lookup and non-empty validation into a WaitFor check function. Keep xtrace disabled for the complete secret-handling scope.

Proposed fix
+function CheckAdminPassword () {
+    # Disable xtrace while reading the admin password.
+    set +x
+    typeset password=""
+    password="$(oc get secret -n "${CENTRAL_NS}" central-htpasswd \
+        -o json | jq -r '.data.password' | base64 -d)" || {
+        set -x
+        return 1
+    }
+    [[ -n "${password}" ]] || {
+        set -x
+        return 1
+    }
+    ROX_ADMIN_PASSWORD="${password}"
+    set -x
+}
+
+WaitFor "admin password extraction" CheckAdminPassword
🤖 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-readiness/stackrox-opp-readiness-commands.sh`
around lines 103 - 129, Move the central-htpasswd lookup and empty-password
validation into a dedicated WaitFor-compatible check function, preserving the
existing ROX_ADMIN_PASSWORD assignment and fatal validation behavior. Ensure the
function returns failure when oc, jq, base64, or the resulting password is
unavailable so WaitFor retries transient failures. Keep xtrace disabled
throughout the complete secret-handling operation, and invoke this check before
CheckClustersConnected.
🤖 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 81-83: Keep xtrace disabled through every command that writes or
expands CENTRAL_URL, including the corresponding scopes at the referenced
credential and later URL blocks; move each set -x until after the protected
command completes. Add a comment immediately before each set +x documenting
whether the scope protects the Central URL or a credential, while preserving
tracing for all unrelated commands.

---

Outside diff comments:
In
`@ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-commands.sh`:
- Around line 103-129: Move the central-htpasswd lookup and empty-password
validation into a dedicated WaitFor-compatible check function, preserving the
existing ROX_ADMIN_PASSWORD assignment and fatal validation behavior. Ensure the
function returns failure when oc, jq, base64, or the resulting password is
unavailable so WaitFor retries transient failures. Keep xtrace disabled
throughout the complete secret-handling operation, and invoke this check before
CheckClustersConnected.
🪄 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: cebc18db-28f2-461b-b7f6-6ead74fe3c00

📥 Commits

Reviewing files that changed from the base of the PR and between 15c840d and 06f1ca7.

📒 Files selected for processing (4)
  • 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-smoke/stackrox-opp-smoke-commands.sh
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-ref.metadata.json
🚧 Files skipped from review as they are similar to previous changes (3)
  • ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-ref.metadata.json
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-ref.metadata.json
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-commands.sh

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@amp-rh: pj-rehearse could not automatically process this event because the request waited in queue for longer than 5 minutes. Use /pj-rehearse to trigger rehearsals manually.

@amp-rh

amp-rh commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-aws

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

The `cli` base image does not include jq. Replace all jq calls:
- Secret extraction: oc jsonpath instead of jq
- Cluster/policy counts: python3 JsonLength helper
- Sensor pod checks: oc jsonpath + python3 for OOMKilled detection

@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-readiness/stackrox-opp-readiness-commands.sh`:
- Around line 162-171: Update the notReady assignment in the Sensor readiness
check to preserve and propagate failures from the oc get pods pipeline instead
of masking them with || true. Ensure the surrounding readiness condition returns
failure when the query fails, allowing WaitFor to retry, while retaining the
existing notReady handling for successful queries.
🪄 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: 41b4439a-0b9a-4062-93f7-068421398bc3

📥 Commits

Reviewing files that changed from the base of the PR and between 06f1ca7 and 1f2d557.

📒 Files selected for processing (3)
  • 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-smoke/stackrox-opp-smoke-ref.metadata.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • ci-operator/step-registry/stackrox/opp-smoke/stackrox-opp-smoke-ref.metadata.json
  • ci-operator/step-registry/stackrox/opp-readiness/stackrox-opp-readiness-ref.metadata.json

Comment on lines +162 to +171
typeset notReady=""
notReady="$(oc get pods -n "${SC_NS}" -l app=sensor \
-o jsonpath='{range .items[*]}{.metadata.name}{" "}{range .status.conditions[*]}{.type}={.status}{" "}{end}{"\n"}{end}' 2>/dev/null \
| while IFS= read -r line; do
[[ -z "${line}" ]] && continue
if ! echo "${line}" | grep -q 'Ready=True'; then
echo "${line%% *}:NotReady"
fi
done)" || true
[[ -z "${notReady}" ]]

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not treat a failed Sensor query as ready.

|| true converts an oc get pods failure into an empty notReady value. Line 171 then returns success. A transient API or authorization failure can start the smoke step without verifying Sensor readiness.

Return failure from this pipeline so WaitFor retries it.

Proposed fix
-        done)" || true
+        done)" || return 1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
typeset notReady=""
notReady="$(oc get pods -n "${SC_NS}" -l app=sensor \
-o jsonpath='{range .items[*]}{.metadata.name}{" "}{range .status.conditions[*]}{.type}={.status}{" "}{end}{"\n"}{end}' 2>/dev/null \
| while IFS= read -r line; do
[[ -z "${line}" ]] && continue
if ! echo "${line}" | grep -q 'Ready=True'; then
echo "${line%% *}:NotReady"
fi
done)" || true
[[ -z "${notReady}" ]]
typeset notReady=""
notReady="$(oc get pods -n "${SC_NS}" -l app=sensor \
-o jsonpath='{range .items[*]}{.metadata.name}{" "}{range .status.conditions[*]}{.type}={.status}{" "}{end}{"\n"}{end}' 2>/dev/null \
| while IFS= read -r line; do
[[ -z "${line}" ]] && continue
if ! echo "${line}" | grep -q 'Ready=True'; then
echo "${line%% *}:NotReady"
fi
done)" || return 1
[[ -z "${notReady}" ]]
🤖 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-readiness/stackrox-opp-readiness-commands.sh`
around lines 162 - 171, Update the notReady assignment in the Sensor readiness
check to preserve and propagate failures from the oc get pods pipeline instead
of masking them with || true. Ensure the surrounding readiness condition returns
failure when the query fails, allowing WaitFor to retry, while retaining the
existing notReady handling for successful queries.

@amp-rh

amp-rh commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-aws

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

stackrox/stackrox and stackrox/scanner use master as their
default branch, not main.
@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-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
periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-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.

@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@amp-rh: The following test 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-upgrade-interop-opp-upgrade-aws 15c840d 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

/pj-rehearse periodic-ci-stolostron-policy-collection-main-ocp4.22-interop-opp-aws

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

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.

3 participants