Skip to content

CompliaceAsCode: Use content image from PR to test rules on 4.22 RHCOS10#80828

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
yuumasato:use-content-from-PR-on-rhcos10
Jun 23, 2026
Merged

CompliaceAsCode: Use content image from PR to test rules on 4.22 RHCOS10#80828
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
yuumasato:use-content-from-PR-on-rhcos10

Conversation

@yuumasato

@yuumasato yuumasato commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Let's use a content image built from the PR, rather than the default image:
quay.io/redhat-user-workloads/ocp-isc-tenant/compliance-operator-content-dev:master

While reviewing ComplianceAsCode/content#14812 and looking at test:
https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/ComplianceAsCode_content/14812/pull-ci-ComplianceAsCode-content-master-4.22-e2e-aws-openshift-node-compliance-rhcos10/2068004200914096128

I noticed that it used the default image rather than an image built from the PR with Alex's changes:
https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/ComplianceAsCode_content/14812/pull-ci-ComplianceAsCode-content-master-4.22-e2e-aws-openshift-node-compliance-rhcos10/2068004200914096128/artifacts/e2e-aws-openshift-node-compliance-rhcos10/test/build-log.txt

Summary by CodeRabbit

This PR updates the OpenShift CI configuration for the ComplianceAsCode/content repository to ensure that the RHEL 10/RHCOS10 compliance testing jobs use the content image built from the pull request under review.

What changed:

The CI configuration for the e2e-aws-openshift-platform-compliance-rhcos10 and e2e-aws-openshift-node-compliance-rhcos10 test jobs now explicitly pass the -content-image="$CONTENT_IMAGE" flag to the compliance test commands and declare a dependency on the ocp4-content-ds image component.

Why this matters:

Previously, these RHCOS10-specific compliance tests were not using the PR-built content image, meaning they would test against a stale or default image rather than the actual compliance rules and changes submitted in a pull request. This change aligns the RHCOS10 tests with the existing behavior of the standard (non-RHCOS10) compliance tests, ensuring that all compliance changes are properly validated before merge. This provides more accurate testing results for RHEL 10 / RHCOS10 compliance scenarios.

Let's use a content image built from the PR, rather than the default
image:
quay.io/redhat-user-workloads/ocp-isc-tenant/compliance-operator-content-dev:master
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: e0e66489-0374-4658-9018-17378572570d

📥 Commits

Reviewing files that changed from the base of the PR and between 211ade3 and d759965.

📒 Files selected for processing (1)
  • ci-operator/config/ComplianceAsCode/content/ComplianceAsCode-content-master.yaml

Walkthrough

Two rhcos10 e2e test steps (e2e-aws-openshift-platform-compliance-rhcos10 and e2e-aws-openshift-node-compliance-rhcos10) in the ComplianceAsCode content master CI config are updated to pass -content-image="$CONTENT_IMAGE" to go test and to declare a dependencies entry sourcing CONTENT_IMAGE from the ocp4-content-ds component.

Changes

rhcos10 e2e CONTENT_IMAGE wiring

Layer / File(s) Summary
Add -content-image flag and CONTENT_IMAGE dependency to rhcos10 e2e steps
ci-operator/config/ComplianceAsCode/content/ComplianceAsCode-content-master.yaml
Both the platform and node rhcos10 e2e test commands now include -content-image="$CONTENT_IMAGE", and each step gains a dependencies block wiring CONTENT_IMAGE from ocp4-content-ds.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: using content image from PR for testing rules on 4.22 RHCOS10, which aligns with the PR's objective to use PR-built content images instead of default images.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 custom check for stable/deterministic Ginkgo test names is not applicable to this PR. This is a CI configuration repository (OpenShift Release) that contains no Ginkgo tests - only YAML workflo...
Test Structure And Quality ✅ Passed The PR modifies only CI configuration YAML, not Ginkgo test code. The custom check for Ginkgo test quality is not applicable to this pull request since no test implementation code is changed.
Microshift Test Compatibility ✅ Passed PR modifies only YAML CI configuration files, not adding any new Ginkgo e2e test code (It, Describe, Context, When, etc.), making the custom check not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR modifies CI configuration only, not adding new Ginkgo e2e tests. Custom check applies only to new test additions.
Topology-Aware Scheduling Compatibility ✅ Passed This PR modifies only CI configuration (a ci-operator config file), not deployment manifests, operator code, or controllers. No scheduling constraints are introduced.
Ote Binary Stdout Contract ✅ Passed This PR modifies openshift/release (CI infrastructure config) and utility tools, not OTE test binaries. The custom check is inapplicable as the PR contains no OTE binary implementations.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests are being added in this PR. The changes only modify CI operator configuration to pass the -content-image parameter to existing tests in the ocp4e2e repository.
No-Weak-Crypto ✅ Passed PR modifies CI/build configuration YAML file with no weak crypto usage; contains no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB modes, custom crypto, or insecure comparisons.
Container-Privileges ✅ Passed PR modifies CI-operator configuration file only, which does not contain container or Kubernetes manifests. No privileged container settings (privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, al...
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data exposed in logs. The file contains CI test configuration with environment variables referencing public image repositories, standard test parameters (PROFILE, PRODUCT), and public...

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 Prucek and hector-vido June 22, 2026 10:43
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@yuumasato: 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-ComplianceAsCode-content-master-e2e-aws-openshift-node-compliance-rhcos10 ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-e2e-aws-openshift-platform-compliance-rhcos10 ComplianceAsCode/content presubmit Ci-operator config changed

Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals.

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.

@Anna-Koudelkova

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 22, 2026
@yuumasato

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@yuumasato

Copy link
Copy Markdown
Contributor Author

/pj-rehearse

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@yuumasato

yuumasato commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

The change is working correctly:
From the test logs https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_release/80828/rehearse-80828-pull-ci-ComplianceAsCode-content-master-e2e-aws-openshift-node-compliance-rhcos10/2069064104621903872/artifacts/e2e-aws-openshift-node-compliance-rhcos10/test/build-log.tx
I see the logs:

2026/06/22 15:46:00 Using content image: registry.build11.ci.openshift.org/ci-op-mg15iccf/pipeline@sha256:d7455939a625719564f9474c130a8fb97b994f2edd7e6aee9c2cfc57353e6291

@taimurhafeez

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Anna-Koudelkova, taimurhafeez, yuumasato

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

@yuumasato

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

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

@openshift-merge-bot openshift-merge-bot Bot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Jun 23, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 5e89546 into openshift:main Jun 23, 2026
12 of 16 checks passed
@openshift-ci

openshift-ci Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@yuumasato: 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/ComplianceAsCode/content/master/e2e-aws-openshift-node-compliance-rhcos10 d759965 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-e2e-aws-openshift-node-compliance-rhcos10

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.

@yuumasato yuumasato deleted the use-content-from-PR-on-rhcos10 branch June 23, 2026 12:58
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. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants