Skip to content

Conversation

@sunzhaohua2
Copy link
Contributor

@sunzhaohua2 sunzhaohua2 commented Jan 9, 2026

Add SHARD_ARGS to enable parallel test execution in ci.

Now when shard_count: 2 is configured (openshift/release#73182), both jobs run all test cases instead of splitting them.

Summary by CodeRabbit

  • Chores
    • Enhanced test execution configuration to support additional test parameters, enabling more flexible test runs during development and CI/CD processes.

✏️ Tip: You can customize this high-level summary in your review settings.

@openshift-ci-robot
Copy link

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

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

openshift-ci-robot commented Jan 9, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3017 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Add SHARD_ARGS to enable parallel test execution in ci.

Now when shard_count: 2 is configured (openshift/release#73182), both jobs run all test cases instead of splitting them.

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
Copy link

coderabbitai bot commented Jan 9, 2026

📝 Walkthrough

Walkthrough

The hack/test.sh test script has been modified to introduce support for passing shard arguments to Ginkgo. A new SHARD_ARGS variable with a default empty value is now plumbed into the test invocation command.

Changes

Cohort / File(s) Summary
Test Harness Enhancement
hack/test.sh
Added SHARD_ARGS variable initialization and integrated it into both the echoed command line and the eval invocation for Ginkgo test execution

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A shard here, a shard there,
Test arguments flow through the air,
Ginkgo dances with newfound grace,
Parameters bloom in their rightful place,
Small edits, big flexibility to spare! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly relates to the main change: adding SHARD_ARGS to enable parallel test execution in CI, which matches the file modifications and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@openshift-ci openshift-ci bot requested review from damdo and theobarberbany January 9, 2026 01:29
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 9, 2026

@sunzhaohua2: This pull request references OCPCLOUD-3017 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Add SHARD_ARGS to enable parallel test execution in ci.

Now when shard_count: 2 is configured (openshift/release#73182), both jobs run all test cases instead of splitting them.

Summary by CodeRabbit

  • Chores
  • Enhanced test execution configuration to support additional test parameters, enabling more flexible test runs during development and CI/CD processes.

✏️ Tip: You can customize this high-level summary in your review settings.

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
hack/test.sh (1)

23-23: LGTM! SHARD_ARGS variable introduced correctly.

The variable follows the same pattern as other configurable arguments in the script (GINKGO_EXTRA_ARGS, etc.) and the empty default ensures backward compatibility.

Optionally, consider adding a brief comment to document its purpose for future maintainers:

# Shard arguments for parallel test execution (e.g., --shard-index=1 --shard-total=2)
SHARD_ARGS=${SHARD_ARGS:-""}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 8369105 and d34d53c.

📒 Files selected for processing (1)
  • hack/test.sh
🔇 Additional comments (1)
hack/test.sh (1)

37-38: Looks good. The SHARD_ARGS variable is correctly integrated into both the echo preview and the actual test invocation, with proper placement between GINKGO_ARGS and GINKGO_EXTRA_ARGS.

Note: If using Ginkgo's native sharding, use the -p flag for parallel processes instead of custom shard flags (e.g., ginkgo -p with GinkgoParallelProcess() and GinkgoConfiguration().ParallelTotal in your tests to coordinate resource allocation).

Copy link
Member

@damdo damdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2026
@openshift-ci-robot
Copy link

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-capi-techpreview
/test e2e-aws-ovn
/test e2e-aws-ovn-serial-1of2
/test e2e-aws-ovn-serial-2of2
/test e2e-aws-ovn-techpreview
/test e2e-aws-ovn-techpreview-upgrade
/test e2e-azure-capi-techpreview
/test e2e-azure-ovn-techpreview
/test e2e-azure-ovn-techpreview-upgrade
/test e2e-gcp-capi-techpreview
/test e2e-gcp-ovn-techpreview
/test e2e-metal3-capi-techpreview
/test e2e-openstack-capi-techpreview
/test e2e-openstack-ovn-techpreview
/test e2e-vsphere-capi-techpreview
/test regression-clusterinfra-aws-ipi-techpreview-capi

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damdo

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 9, 2026
@damdo
Copy link
Member

damdo commented Jan 9, 2026

Overriding e2es as this is a no-op config change for now

/override ci/prow/e2e-aws-capi-techpreview ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-serial-1of2 ci/prow/e2e-aws-ovn-serial-2of2 ci/prow/e2e-aws-ovn-techpreview ci/prow/e2e-aws-ovn-techpreview-upgrade ci/prow/e2e-azure-capi-techpreview ci/prow/e2e-azure-ovn-techpreview ci/prow/e2e-azure-ovn-techpreview-upgrade ci/prow/e2e-gcp-capi-techpreview ci/prow/e2e-gcp-ovn-techpreview ci/prow/e2e-metal3-capi-techpreview ci/prow/e2e-openstack-capi-techpreview ci/prow/e2e-openstack-ovn-techpreview ci/prow/e2e-vsphere-capi-techpreview ci/prow/regression-clusterinfra-aws-ipi-techpreview-capi

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

@damdo: Overrode contexts on behalf of damdo: ci/prow/e2e-aws-capi-techpreview, ci/prow/e2e-aws-ovn, ci/prow/e2e-aws-ovn-serial-1of2, ci/prow/e2e-aws-ovn-serial-2of2, ci/prow/e2e-aws-ovn-techpreview, ci/prow/e2e-aws-ovn-techpreview-upgrade, ci/prow/e2e-azure-capi-techpreview, ci/prow/e2e-azure-ovn-techpreview, ci/prow/e2e-azure-ovn-techpreview-upgrade, ci/prow/e2e-gcp-capi-techpreview, ci/prow/e2e-gcp-ovn-techpreview, ci/prow/e2e-metal3-capi-techpreview, ci/prow/e2e-openstack-capi-techpreview, ci/prow/e2e-openstack-ovn-techpreview, ci/prow/e2e-vsphere-capi-techpreview, ci/prow/regression-clusterinfra-aws-ipi-techpreview-capi

Details

In response to this:

Overriding e2es as this is a no-op config change for now

/override ci/prow/e2e-aws-capi-techpreview ci/prow/e2e-aws-ovn ci/prow/e2e-aws-ovn-serial-1of2 ci/prow/e2e-aws-ovn-serial-2of2 ci/prow/e2e-aws-ovn-techpreview ci/prow/e2e-aws-ovn-techpreview-upgrade ci/prow/e2e-azure-capi-techpreview ci/prow/e2e-azure-ovn-techpreview ci/prow/e2e-azure-ovn-techpreview-upgrade ci/prow/e2e-gcp-capi-techpreview ci/prow/e2e-gcp-ovn-techpreview ci/prow/e2e-metal3-capi-techpreview ci/prow/e2e-openstack-capi-techpreview ci/prow/e2e-openstack-ovn-techpreview ci/prow/e2e-vsphere-capi-techpreview ci/prow/regression-clusterinfra-aws-ipi-techpreview-capi

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.

@damdo
Copy link
Member

damdo commented Jan 9, 2026

/verified bypass

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jan 9, 2026
@openshift-ci-robot
Copy link

@damdo: The verified label has been added.

Details

In response to this:

/verified bypass

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 openshift-merge-bot bot merged commit b76286b into openshift:main Jan 9, 2026
25 checks passed
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 9, 2026

@sunzhaohua2: 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. 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. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants