Skip to content

CMO: add pipeline_skip_if_only_changed to second-stage tests and move ginkgo-tests to second-stage pipeline - #83434

Open
machine424 wants to merge 3 commits into
openshift:mainfrom
machine424:kightttt
Open

CMO: add pipeline_skip_if_only_changed to second-stage tests and move ginkgo-tests to second-stage pipeline #83434
machine424 wants to merge 3 commits into
openshift:mainfrom
machine424:kightttt

Conversation

@machine424

@machine424 machine424 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Two changes to improve CMO CI efficiency:

  1. Move ginkgo-tests to second-stage — it was the only e2e-class job still running as first-stage (always_run: true), despite spawning a full cluster. Aligns with all other e2e tests already in second-stage.

  2. Add pipeline_skip_if_only_changed to all 6 second-stage tests — skip expensive cluster-provisioning tests when a PR only touches non-functional files (docs, OWNERS, hack scripts, linter config, etc.).

Skip matrix

Job Skips when only these change
e2e-aws-ovn docs, meta, hack/, test/*
e2e-aws-ovn-techpreview docs, meta, hack/, test/*
e2e-aws-ovn-upgrade docs, meta, hack/, test/*
e2e-hypershift-conformance docs, meta, hack/, test/*
e2e-agnostic-operator docs, meta, hack/, test/ext/, test/monitoring/, test/rules/
ginkgo-tests docs, meta, hack/, test/e2e/, test/ext/, test/rules/
  • e2e-agnostic-operator runs make test-e2e (sources in test/e2e/) → still triggers on test/e2e/ changes
  • ginkgo-tests runs make test-ginkgo (sources in test/monitoring/) → still triggers on test/monitoring/ changes
  • Neither uses test/ext/ (external tests binary shipped in image, not exercised by these jobs)
  • The 4 image-only tests skip all of test/ since they only test the deployed binary

Impact (measured from last 47 PRs to main)

Job Triggers saved Total %
e2e-aws-ovn 63 238 26%
e2e-aws-ovn-techpreview 79 299 26%
e2e-aws-ovn-upgrade 58 195 30%
e2e-hypershift-conformance 62 228 27%
e2e-agnostic-operator 7 232 3%
ginkgo-tests 50 191 26%
TOTAL 319 1383 23%

14/47 PRs (30%) only touched docs/meta/hack and never needed second-stage testing. Skip-eligible PRs averaged ~23 triggers each due to flake retesting.

Test plan

  • Verify CI jobs still trigger on functional code changes (cmd/, pkg/, manifests/, assets/, Makefile, go.mod)
  • Verify CI jobs are skipped for docs-only or OWNERS-only PRs
  • Confirm ginkgo-tests now appears as second-stage in pipeline controller comment

The org-wide LGTM pipeline rollout moved e2e jobs to second-stage
using a name-based heuristic (jobs containing "e2e"). The ginkgo-tests
job was missed because its name does not contain "e2e", but it provisions
a full AWS cluster (workflow: ipi-aws) and is just as expensive.

Set always_run: false for consistency with the other cluster-provisioning
tests already in second-stage.
@machine424 machine424 changed the title Kightttt CMO: add pipeline_skip_if_only_changed to second-stage tests and move ginkgo-tests to second-stage pipeline Aug 14, 2026
@openshift-ci
openshift-ci Bot requested review from jan--f and slashpai August 14, 2026 12:13
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/openshift/cluster-monitoring-operator/openshift-cluster-monitoring-operator-main-presubmits.yaml is excluded by !ci-operator/jobs/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: dc3eb92f-f7c8-4dc0-8824-d55a937213af

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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: 573167f5-9fb3-4974-846b-9b54266f7f45

📥 Commits

Reviewing files that changed from the base of the PR and between 17f4133 and 9f8a988.

📒 Files selected for processing (1)
  • ci-operator/config/openshift/cluster-monitoring-operator/openshift-cluster-monitoring-operator-main.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • ci-operator/config/openshift/cluster-monitoring-operator/openshift-cluster-monitoring-operator-main.yaml

Walkthrough

The change adds pipeline_skip_if_only_changed filters to several conformance pipelines. It also makes ginkgo-tests conditional and excludes selected test-only changes from execution.

Changes

Pipeline filtering

Layer / File(s) Summary
Configure pipeline skip behavior
ci-operator/config/openshift/cluster-monitoring-operator/openshift-cluster-monitoring-operator-main.yaml
AWS OVN, tech-preview, agnostic-operator, upgrade, and Hypershift pipelines now skip selected documentation, metadata, configuration, and test-only changes. The ginkgo-tests pipeline is no longer unconditional and excludes e2e, ext, and rules test-only changes.

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

Merge Risk: ⚪ Minimal · up to 9f8a9

This change only adjusts CI test scheduling and skip conditions; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: jan--f, slashpai

🚥 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.
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 changes only pipeline YAML metadata and filters; the diff adds no Ginkgo title calls or dynamic test-title values.
Test Structure And Quality ✅ Passed The commit changes only six pipeline YAML filter lines; no Ginkgo test implementation, setup, waits, or assertions changed, so this check has no applicable failure.
Microshift Test Compatibility ✅ Passed The diff changes only CI YAML filters and pipeline settings; it adds no Ginkgo tests or test references to MicroShift-incompatible APIs.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The commit changes only one CI YAML file; the parent diff contains no added or modified Ginkgo e2e tests, so SNO compatibility criteria are not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The diff changes only CI pipeline filters and always_run; it adds no deployment manifest, operator/controller code, or topology-related scheduling constraint.
Ote Binary Stdout Contract ✅ Passed The diff changes only one CI YAML file: pipeline skip filters and always_run; it adds no OTE binary or process-level stdout writes.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR changes only one CI YAML file; the diff adds pipeline filters and always_run, with no new Ginkgo test declarations or network code.
No-Weak-Crypto ✅ Passed The PR changes only CI pipeline YAML filters and always_run; the combined diff introduces no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret-comparison code.
Container-Privileges ✅ Passed The PR adds only six pipeline_skip_if_only_changed keys and introduces none of privileged:true, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation:true.
No-Sensitive-Data-In-Logs ✅ Passed The PR changes one YAML file and adds only six pipeline_skip_if_only_changed regex entries; no logging, output, or sensitive-data handling was introduced.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main changes: adding skip filters and moving ginkgo-tests to the second-stage pipeline.
✨ 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 14, 2026
Skip expensive and potentially flaky cluster-provisioning tests when
a PR only touches non-functional files (docs, OWNERS, hack scripts,
linter config, etc.).

Job                        | Skips when only these change
---------------------------|--------------------------------------------
e2e-aws-ovn               | docs, meta, hack/, test/*
e2e-aws-ovn-techpreview   | docs, meta, hack/, test/*
e2e-aws-ovn-upgrade       | docs, meta, hack/, test/*
e2e-hypershift-conformance | docs, meta, hack/, test/*
e2e-agnostic-operator     | docs, meta, hack/, test/ext/, test/monitoring/, test/rules/
ginkgo-tests              | docs, meta, hack/, test/e2e/, test/ext/, test/rules/

e2e-agnostic-operator runs make test-e2e (test/e2e/) so it still
triggers on test/e2e/ changes. ginkgo-tests runs make test-ginkgo
(test/monitoring/) so it still triggers on test/monitoring/ changes.
Neither uses test/ext/ (external tests binary, shipped in image but
not exercised by these jobs). The 4 image-only tests (e2e-aws-ovn,
techpreview, upgrade, hypershift) skip all of test/.

Analysis of the last 47 PRs to main (excluding 3 with 100+ files):

Job                        | Triggers saved | Total | %
---------------------------|----------------|-------|----
e2e-aws-ovn               | 63             | 238   | 26%
e2e-aws-ovn-techpreview   | 79             | 299   | 26%
e2e-aws-ovn-upgrade       | 58             | 195   | 30%
e2e-hypershift-conformance | 62             | 228   | 27%
e2e-agnostic-operator     | 7              | 232   | 3%
ginkgo-tests              | 50             | 191   | 26%
TOTAL                     | 319            | 1383  | 23%

319/1383 second-stage triggers (23%) would be eliminated.
14/47 PRs (30%) only touched docs/meta/hack and never needed
second-stage testing. Heavy flake retesting amplifies the waste:
skip-eligible PRs averaged ~23 triggers each.
@coderabbitai

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

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: machine424

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

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@machine424: 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-openshift-cluster-monitoring-operator-main-e2e-agnostic-operator openshift/cluster-monitoring-operator presubmit Ci-operator config changed
pull-ci-openshift-cluster-monitoring-operator-main-e2e-aws-ovn openshift/cluster-monitoring-operator presubmit Ci-operator config changed
pull-ci-openshift-cluster-monitoring-operator-main-e2e-aws-ovn-techpreview openshift/cluster-monitoring-operator presubmit Ci-operator config changed
pull-ci-openshift-cluster-monitoring-operator-main-e2e-aws-ovn-upgrade openshift/cluster-monitoring-operator presubmit Ci-operator config changed
pull-ci-openshift-cluster-monitoring-operator-main-e2e-hypershift-conformance openshift/cluster-monitoring-operator presubmit Ci-operator config changed
pull-ci-openshift-cluster-monitoring-operator-main-ginkgo-tests openshift/cluster-monitoring-operator presubmit 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.

@machine424

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

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

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant