Skip to content

CMP-4630: ComplianceAsCode/ocp4e2e: Add non-cluster unit presubmit - #84258

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
yuumasato:ocp4e2e-add-unit-presubmit
Sep 3, 2026
Merged

CMP-4630: ComplianceAsCode/ocp4e2e: Add non-cluster unit presubmit#84258
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
yuumasato:ocp4e2e-add-unit-presubmit

Conversation

@yuumasato

@yuumasato yuumasato commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What

Adds a unit presubmit to ComplianceAsCode/ocp4e2e that runs make test-unit from src, mirroring the unit step in ComplianceAsCode/compliance-operator.

Today the ocp4e2e presubmits are all live-cluster AWS e2e jobs, so the repo's Go unit tests (helpers, resultparser) are never run in CI. This job:

  • runs make test-unit (go test -cover over the packages that have tests, excluding vendor and the cluster-backed root e2e package),
  • needs no cloud lease / cluster profile (contrast the existing e2e jobs),
  • is guarded by skip_if_only_changed: ^.*(md|adoc)$|^LICENSE$.

Why now

ocp4e2e PR ComplianceAsCode/ocp4e2e#84 (CMP-4630) adds a unit regression test for the assertion-file generator. Without this presubmit, that test would never run in CI. The make test-unit target lands in that PR.

How generated

  • Edited ci-operator/config/ComplianceAsCode/ocp4e2e/ComplianceAsCode-ocp4e2e-main.yaml (added the unit test).
  • Regenerated ci-operator/jobs/.../ComplianceAsCode-ocp4e2e-main-presubmits.yaml with make ci-operator-prowgen WHAT=ComplianceAsCode/ocp4e2e.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Adds a non-cluster unit presubmit for ComplianceAsCode/ocp4e2e.
  • Runs make test-unit from src with Go unit-test coverage.
  • Excludes vendor code and the cluster-backed root e2e package.
  • Skips documentation-only and LICENSE-only changes.
  • Updates the presubmit configuration and generated Prow jobs.

@coderabbitai

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

Run ID: 9770207f-1735-4947-b322-1d22b7c8b2d3

📥 Commits

Reviewing files that changed from the base of the PR and between c382e0b and d763e22.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/ComplianceAsCode/ocp4e2e/ComplianceAsCode-ocp4e2e-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (1)
  • ci-operator/config/ComplianceAsCode/ocp4e2e/ComplianceAsCode-ocp4e2e-main.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • ci-operator/config/ComplianceAsCode/ocp4e2e/ComplianceAsCode-ocp4e2e-main.yaml

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


Walkthrough

The ComplianceAsCode CI configuration adds a unit test step. The step runs make test-unit in the src container and skips documentation-only or LICENSE-only changes.

Changes

ComplianceAsCode Unit Tests

Layer / File(s) Summary
Unit test execution
ci-operator/config/ComplianceAsCode/ocp4e2e/ComplianceAsCode-ocp4e2e-main.yaml
The configuration runs make test-unit in the src container and skips Markdown, AsciiDoc, and LICENSE-only changes.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to d763e

This change adds a non-cluster unit-test presubmit for ocp4e2e without altering product runtime behavior; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: smg247, vincent056

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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 pull request changes only CI YAML. The added test identifier and generated Prow job name are static (unit and pull-ci-ComplianceAsCode-ocp4e2e-main-unit). The added lines contain no Ginkgo tit…
Test Structure And Quality ✅ Passed PASS: The pull request changes only two YAML CI configuration files. The diff adds a unit job that invokes make test-unit; it adds no Ginkgo test code, It blocks, cluster-resource setup, waits, …
Microshift Test Compatibility ✅ Passed PASS: The pull request changes only two CI YAML files. The parent-to-HEAD diff adds a unit job and its generated Prow presubmit; it adds no Ginkgo test files or Describe, Context, When, or `It…
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request changes only CI configuration and a generated Prow job. The diff adds a unit presubmit that runs make test-unit; it adds no Go files or Ginkgo declarations such as It(), `Descri…
Topology-Aware Scheduling Compatibility ✅ Passed PASS — The pull request changes only the ci-operator test configuration and generated Prow presubmit job. The diff adds a make test-unit test and a documentation-only skip rule. It does not add or m…
Ote Binary Stdout Contract ✅ Passed PASS: The pull request changes only two CI YAML files. It adds a make test-unit command and its generated Prow job. The diff adds no OTE binary code and no process-level stdout or logging writes i…
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The pull request changes only two CI YAML files. The added job runs make test-unit in the src container and adds no Ginkgo e2e test code, IPv4 literals, IP parsing, URL construction, or external c…
No-Weak-Crypto ✅ Passed The pull request changes only two YAML CI configuration files. The added lines define a unit job, invoke make test-unit, set the source container, and add CI secret mounts. They introduce no MD5, …
Container-Privileges ✅ Passed PASS — The pull request adds only a unit test entry and its generated Prow job. The changed YAML contains no privileged: true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, `allowPrivilegeEsca…
No-Sensitive-Data-In-Logs ✅ Passed PASS: The PR adds only a make test-unit CI test and its generated Prow job. The added lines contain no logging statements or sensitive values. The generated job mounts standard CI credential secrets…
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 a non-cluster unit presubmit for ComplianceAsCode/ocp4e2e.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Full details: Stable And Deterministic Test Names

Explanation

The pull request changes only CI YAML. The added test identifier and generated Prow job name are static (unit and pull-ci-ComplianceAsCode-ocp4e2e-main-unit). The added lines contain no Ginkgo title constructs such as It(), Describe(), Context(), or When(), and no dynamic pod, node, namespace, timestamp, IP, UUID, or generated identifier values. Therefore, this check is not violated.

Full details: Test Structure And Quality

Explanation

PASS: The pull request changes only two YAML CI configuration files. The diff adds a unit job that invokes make test-unit; it adds no Ginkgo test code, It blocks, cluster-resource setup, waits, or assertions. Therefore the five Ginkgo test-quality requirements are not applicable to this pull request.

Full details: Microshift Test Compatibility

Explanation

PASS: The pull request changes only two CI YAML files. The parent-to-HEAD diff adds a unit job and its generated Prow presubmit; it adds no Ginkgo test files or Describe, Context, When, or It declarations. The MicroShift compatibility check is therefore not applicable.

Full details: Single Node Openshift (Sno) Test Compatibility

Explanation

The pull request changes only CI configuration and a generated Prow job. The diff adds a unit presubmit that runs make test-unit; it adds no Go files or Ginkgo declarations such as It(), Describe(), Context(), or When(). Therefore, the SNO multi-node compatibility check is not applicable.

Full details: Topology-Aware Scheduling Compatibility

Explanation

PASS — The pull request changes only the ci-operator test configuration and generated Prow presubmit job. The diff adds a make test-unit test and a documentation-only skip rule. It does not add or modify deployment manifests, operator code, controllers, pod affinity, topology spread, node selectors, tolerations, replica counts, or PDBs. The topology-aware scheduling check is therefore not applicable.

Full details: Ote Binary Stdout Contract

Explanation

PASS: The pull request changes only two CI YAML files. It adds a make test-unit command and its generated Prow job. The diff adds no OTE binary code and no process-level stdout or logging writes in main(), init(), TestMain(), suite setup, or RunSpecs() setup. The stdout contract check is therefore not applicable.

Full details: Ipv6 And Disconnected Network Test Compatibility

Explanation

The pull request changes only two CI YAML files. The added job runs make test-unit in the src container and adds no Ginkgo e2e test code, IPv4 literals, IP parsing, URL construction, or external connectivity commands. The custom check is therefore not applicable.

Full details: No-Weak-Crypto

Explanation

The pull request changes only two YAML CI configuration files. The added lines define a unit job, invoke make test-unit, set the source container, and add CI secret mounts. They introduce no MD5, SHA1, DES, RC4, 3DES, Blowfish, ECB, custom cryptography, or secret/token comparisons. The CI secret references are credential mounts, not weak-crypto usage.

Full details: Container-Privileges

Explanation

PASS — The pull request adds only a unit test entry and its generated Prow job. The changed YAML contains no privileged: true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, allowPrivilegeEscalation: true, or root security setting. The unit job uses the same standard ci-operator container pattern as the existing ComplianceAsCode unit job.

Full details: No-Sensitive-Data-In-Logs

Explanation

PASS: The PR adds only a make test-unit CI test and its generated Prow job. The added lines contain no logging statements or sensitive values. The generated job mounts standard CI credential secrets and passes file paths to ci-operator; it does not print or interpolate secret contents. Existing unit jobs use the same credential-handling pattern.

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

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

@openshift-ci
openshift-ci Bot requested review from Vincent056 and smg247 August 31, 2026 10:06
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 31, 2026
@yuumasato

Copy link
Copy Markdown
Contributor Author

CC: @taimurhafeez

@yuumasato
yuumasato force-pushed the ocp4e2e-add-unit-presubmit branch from 4d394f6 to 5a0fe24 Compare August 31, 2026 13:43
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@yuumasato

Copy link
Copy Markdown
Contributor Author

/retest

The ocp4e2e presubmits only run live-cluster e2e jobs, so the repo's Go unit
tests (helpers, resultparser) are never exercised in CI. Add a `unit` test
that runs `make test-unit` from src, mirroring compliance-operator's unit
step, guarded by skip_if_only_changed for docs/LICENSE-only changes. Needs no
cloud lease. Presubmits regenerated with prowgen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@yuumasato
yuumasato force-pushed the ocp4e2e-add-unit-presubmit branch from 5a0fe24 to d763e22 Compare September 1, 2026 09:14
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@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-ocp4e2e-main-unit ComplianceAsCode/ocp4e2e presubmit Presubmit 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.

@yuumasato yuumasato changed the title ComplianceAsCode/ocp4e2e: Add non-cluster unit presubmit CMP-4630: ComplianceAsCode/ocp4e2e: Add non-cluster unit presubmit Sep 1, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 1, 2026
@openshift-ci-robot

openshift-ci-robot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@yuumasato: This pull request references CMP-4630 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 bug to target the "5.1.0" version, but no target version was set.

Details

In response to this:

What

Adds a unit presubmit to ComplianceAsCode/ocp4e2e that runs make test-unit from src, mirroring the unit step in ComplianceAsCode/compliance-operator.

Today the ocp4e2e presubmits are all live-cluster AWS e2e jobs, so the repo's Go unit tests (helpers, resultparser) are never run in CI. This job:

  • runs make test-unit (go test -cover over the packages that have tests, excluding vendor and the cluster-backed root e2e package),
  • needs no cloud lease / cluster profile (contrast the existing e2e jobs),
  • is guarded by skip_if_only_changed: ^.*(md|adoc)$|^LICENSE$.

Why now

ocp4e2e PR ComplianceAsCode/ocp4e2e#84 (CMP-4630) adds a unit regression test for the assertion-file generator. Without this presubmit, that test would never run in CI. The make test-unit target lands in that PR.

How generated

  • Edited ci-operator/config/ComplianceAsCode/ocp4e2e/ComplianceAsCode-ocp4e2e-main.yaml (added the unit test).
  • Regenerated ci-operator/jobs/.../ComplianceAsCode-ocp4e2e-main-presubmits.yaml with make ci-operator-prowgen WHAT=ComplianceAsCode/ocp4e2e.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Adds a non-cluster unit presubmit for ComplianceAsCode/ocp4e2e.
  • Runs make test-unit from src with Go unit-test coverage.
  • Excludes vendor code and the cluster-backed root e2e package.
  • Skips documentation-only and LICENSE-only changes.
  • Updates the presubmit configuration and generated Prow jobs.

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.

@taimurhafeez

Copy link
Copy Markdown
Contributor

/lgtm

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

openshift-ci Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@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 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 Sep 3, 2026
@openshift-ci

openshift-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@yuumasato: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 77912ec into openshift:main Sep 3, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants