Skip to content

CNTRLPLANE-3642: ci(hypershift): skip E2E when only unit test files change - #80732

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
mgencur:CNTRLPLANE-3642_skip_e2e_for_unittests
Jun 25, 2026
Merged

CNTRLPLANE-3642: ci(hypershift): skip E2E when only unit test files change#80732
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
mgencur:CNTRLPLANE-3642_skip_e2e_for_unittests

Conversation

@mgencur

@mgencur mgencur commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Extend pipeline_skip_if_only_changed to match *_test.go files under all non-test top-level directories. PRs touching only unit tests no longer trigger expensive E2E runs.

This unit test was used to verify the new pattern: mgencur/hypershift@d3de17d

Fixes https://redhat.atlassian.net/browse/CNTRLPLANE-3642

Summary by CodeRabbit

This PR modifies the HyperShift CI configuration to optimize E2E (end-to-end) test execution by preventing resource-intensive test runs when PRs contain only unit test changes.

Summary by CodeRabbit

This updates the HyperShift CI configuration to make E2E job skipping smarter for the OpenShift CI setup. In practical terms, changes that only touch unit tests in non-test top-level directories will now be more likely to skip expensive E2E runs, reducing unnecessary CI load for the openshift/hypershift repo.

It broadens the pipeline_skip_if_only_changed matching logic across several HyperShift jobs to include *_test.go paths, and also normalizes the markdown path matching used by the GKE v2 job. A unit test was added to verify the new skip pattern behavior.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 18, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

@mgencur: This pull request references CNTRLPLANE-3642 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Extend pipeline_skip_if_only_changed to match *_test.go files under all non-E2E top-level directories. PRs touching only unit tests no longer trigger expensive E2E runs.

This unit test was used to verify the new pattern: mgencur/hypershift@b5f40c5

Fixes https://redhat.atlassian.net/browse/CNTRLPLANE-3642

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.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

The hypershift main CI config updates pipeline_skip_if_only_changed regexes across several e2e jobs. The changes add *_test.go path matching, and the GKE v2 job also broadens markdown matching to *.md.

Changes

Hypershift CI pipeline skip pattern expansion

Layer / File(s) Summary
Expanded skip patterns
ci-operator/config/openshift/hypershift/openshift-hypershift-main.yaml
Updates pipeline_skip_if_only_changed in multiple hypershift e2e job definitions to add *_test.go skip eligibility, and changes the GKE v2 markdown match to *.md.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • csrwng
  • bryan-cox
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: expanding HyperShift CI E2E skipping for unit test-only changes.
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 only touched file is CI YAML; it contains skip-regex updates and no Ginkgo titles (It/Describe/Context/When).
Test Structure And Quality ✅ Passed PASS: the PR only changes a ci-operator YAML regex (7/7 lines) and includes no Ginkgo test code, so the test-structure checklist is not applicable.
Microshift Test Compatibility ✅ Passed PR only changes CI skip regexes in a YAML config; it adds no new Ginkgo tests or test bodies to assess for MicroShift compatibility.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR only changes ci-operator YAML skip regexes; no new Ginkgo e2e tests or openshift/hypershift test files are added, so the SNO check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only ci-operator skip-regex updates were touched; no manifests, controllers, or scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed PR changes only CI YAML regexes; no main/init/TestMain/suite code or stdout writes were introduced.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Only CI config regexes changed in YAML; no new Ginkgo e2e tests or IP/network logic were added.
No-Weak-Crypto ✅ Passed Only CI YAML/presubmit regexes changed; no MD5/SHA1/DES/RC4/ECB/custom crypto or secret comparisons added.
Container-Privileges ✅ Passed PR only updates pipeline_skip_if_only_changed regexes in a ci-operator YAML; no privileged, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation fields are present.
No-Sensitive-Data-In-Logs ✅ Passed The PR only adjusts CI skip regexes in a YAML config; it adds no logging or secret-bearing output.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ 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 Nirshal and sjenning June 18, 2026 12:44

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

The Jira acceptance criteria include a make verify target and a tracked directory list to prevent the skip pattern from going stale as new top-level directories are added. Neither appears in this PR. Was this intentionally deferred?

If so, please open a follow-up ticket and link it here, and update the Jira story accordingly. Without the verify target, the risk of silent drift is real — someone adds a new top-level directory of unit tests, forgets to update the skip pattern, and PRs start triggering unnecessary E2E runs again.

@mgencur

mgencur commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@mehabhalodiya All of this is done in the sibling PR: openshift/hypershift#8773
Have you seen it? Please let me know.

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 19, 2026
Extend pipeline_skip_if_only_changed to match *_test.go files under
all non-test top-tevel directories. PRs touching only unit tests outside
of test/ no longer trigger expensive E2E runs.

More info about matching and non-matching paths in https://regex101.com/r/0RdXcf/1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mgencur
mgencur force-pushed the CNTRLPLANE-3642_skip_e2e_for_unittests branch from f74d426 to b9524cf Compare June 24, 2026 13:04
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@mgencur: 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-hypershift-main-e2e-aks openshift/hypershift presubmit Ci-operator config changed
pull-ci-openshift-hypershift-main-e2e-aws openshift/hypershift presubmit Ci-operator config changed
pull-ci-openshift-hypershift-main-e2e-aws-upgrade-hypershift-operator openshift/hypershift presubmit Ci-operator config changed
pull-ci-openshift-hypershift-main-e2e-azure-v2-self-managed openshift/hypershift presubmit Ci-operator config changed
pull-ci-openshift-hypershift-main-e2e-kubevirt-aws-ovn-reduced openshift/hypershift presubmit Ci-operator config changed
pull-ci-openshift-hypershift-main-e2e-v2-aws openshift/hypershift presubmit Ci-operator config changed
pull-ci-openshift-hypershift-main-e2e-v2-gke openshift/hypershift 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.

@muraee

muraee commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2026

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

/lgtm

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

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mehabhalodiya, mgencur, muraee

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

@mgencur

mgencur commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

/pj-rehearse ack

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@mgencur: 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 25, 2026
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@mgencur: 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 2a0a09d into openshift:main Jun 25, 2026
16 checks passed
kasturinarra pushed a commit to kasturinarra/release that referenced this pull request Jun 26, 2026
…80732)

Extend pipeline_skip_if_only_changed to match *_test.go files under
all non-test top-tevel directories. PRs touching only unit tests outside
of test/ no longer trigger expensive E2E runs.

More info about matching and non-matching paths in https://regex101.com/r/0RdXcf/1

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
krisnababu pushed a commit to oharan2/release that referenced this pull request Jul 3, 2026
…80732)

Extend pipeline_skip_if_only_changed to match *_test.go files under
all non-test top-tevel directories. PRs touching only unit tests outside
of test/ no longer trigger expensive E2E runs.

More info about matching and non-matching paths in https://regex101.com/r/0RdXcf/1

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
andrej1991 pushed a commit to andrej1991/release that referenced this pull request Jul 6, 2026
…80732)

Extend pipeline_skip_if_only_changed to match *_test.go files under
all non-test top-tevel directories. PRs touching only unit tests outside
of test/ no longer trigger expensive E2E runs.

More info about matching and non-matching paths in https://regex101.com/r/0RdXcf/1

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
TimurMP pushed a commit to TimurMP/release that referenced this pull request Jul 8, 2026
…80732)

Extend pipeline_skip_if_only_changed to match *_test.go files under
all non-test top-tevel directories. PRs touching only unit tests outside
of test/ no longer trigger expensive E2E runs.

More info about matching and non-matching paths in https://regex101.com/r/0RdXcf/1

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
SachinNinganure pushed a commit to SachinNinganure/release that referenced this pull request Jul 20, 2026
…80732)

Extend pipeline_skip_if_only_changed to match *_test.go files under
all non-test top-tevel directories. PRs touching only unit tests outside
of test/ no longer trigger expensive E2E runs.

More info about matching and non-matching paths in https://regex101.com/r/0RdXcf/1

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
amogh-redhat pushed a commit to amogh-redhat/release that referenced this pull request Aug 5, 2026
…80732)

Extend pipeline_skip_if_only_changed to match *_test.go files under
all non-test top-tevel directories. PRs touching only unit tests outside
of test/ no longer trigger expensive E2E runs.

More info about matching and non-matching paths in https://regex101.com/r/0RdXcf/1

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
TimurMP pushed a commit to TimurMP/release that referenced this pull request Sep 5, 2026
…80732)

Extend pipeline_skip_if_only_changed to match *_test.go files under
all non-test top-tevel directories. PRs touching only unit tests outside
of test/ no longer trigger expensive E2E runs.

More info about matching and non-matching paths in https://regex101.com/r/0RdXcf/1

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

4 participants