Skip to content

test(perfmetrics): support workflow-specific parallel execution in presubmit - #5071

Draft
PranjalC100 wants to merge 2 commits into
masterfrom
split-kokoro-presubmit-workflows
Draft

PranjalC100 wants to merge 2 commits into
masterfrom
split-kokoro-presubmit-workflows

Conversation

@PranjalC100

@PranjalC100 PranjalC100 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Description

Supports granular workflow routing in perfmetrics/scripts/presubmit_test/pr_perf_test/build.sh via the PRESUBMIT_WORKFLOW environment variable ("regional", "zonal", "perf", "other", or default "all").

  • Enables Kokoro to run presubmit test suites concurrently across dedicated VMs instead of executing them sequentially on a single VM.
  • Includes fast-exit checks (<3s) that query PR labels via GitHub API and immediately exit 0 when a requested workflow's label is absent.
  • Preserves 100% backward compatibility when PRESUBMIT_WORKFLOW is unset.

Link to the issue in case of a bug fix.

Fixes b/446921841

Testing details

  1. Manual - Simulated all 11 workflow combinations (fast-exits and positive label matches for perf, regional, zonal, other, and default all) with mock GitHub label payloads; verified all exited with code 0.
  2. Unit tests - Verified go build ./... and go fmt ./....
  3. Integration tests - NA

Any backward incompatible change? If so, please explain.

No. When PRESUBMIT_WORKFLOW is not specified, it defaults to "all" and behaves identically to existing master runs.

…esubmit

Add PRESUBMIT_WORKFLOW routing in pr_perf_test/build.sh to allow Kokoro to run regional, zonal, perf, and other tests concurrently across dedicated VMs. Includes fast-exit handling (<3s) when requested labels are absent, while preserving full backward compatibility when PRESUBMIT_WORKFLOW is unset.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request refactors the presubmit script (build.sh) to support running specific test workflows (perf, regional, zonal, other, or all) based on a new PRESUBMIT_WORKFLOW environment variable, and introduces fast-exit conditions for each workflow type. Feedback was provided regarding critical issues with the curl command fetching PR details, which could silently bypass tests on failure, append to stale data, or fetch incorrect PRs if the PR number is unset.

Comment thread perfmetrics/scripts/presubmit_test/pr_perf_test/build.sh Outdated
@PranjalC100 PranjalC100 changed the title test(perfmetrics): support workflow-specific parallel CI execution test(perfmetrics): support workflow-specific parallel execution in presubmit Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant