test(perfmetrics): support workflow-specific parallel execution in presubmit - #5071
Draft
PranjalC100 wants to merge 2 commits into
Draft
PranjalC100 wants to merge 2 commits into
PranjalC100 wants to merge 2 commits into
Conversation
…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.
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Supports granular workflow routing in
perfmetrics/scripts/presubmit_test/pr_perf_test/build.shvia thePRESUBMIT_WORKFLOWenvironment variable ("regional","zonal","perf","other", or default"all").0when a requested workflow's label is absent.PRESUBMIT_WORKFLOWis unset.Link to the issue in case of a bug fix.
Fixes b/446921841
Testing details
perf,regional,zonal,other, and defaultall) with mock GitHub label payloads; verified all exited with code 0.go build ./...andgo fmt ./....Any backward incompatible change? If so, please explain.
No. When
PRESUBMIT_WORKFLOWis not specified, it defaults to"all"and behaves identically to existing master runs.