chore(storage): optimize zonal system tests CloudBuild and make concurrency-safe#17171
Merged
chandra-siri merged 2 commits intoMay 19, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the zonal system tests to use a pre-packaged source code tarball instead of cloning the repository on the VM. Key changes include adding a packaging step in the Cloud Build configuration, registering SSH keys with a TTL via OS Login, and simplifying VM naming. Review feedback recommends removing obsolete environment variables from the remote execution command and ensuring that the VM deletion step does not interfere with returning the correct test exit status.
056f8a9 to
687e612
Compare
…rrency-safe
- Replace Git cloning/fetching commands inside the GCE VM with local workspace archiving. We package the packages/google-cloud-storage directory and scp it to the VM directly. This ensures 100% reliability, natively supports fork PRs, and enables manual pre-push testing of local uncommitted changes.
- Replace the concurrency-breaking cleanup-old-keys step with OS Login key registration with a 1-hour Time-To-Live (TTL). This allows GCP to automatically expire and delete old keys safely without interfering with other active concurrent builds.
- Clean up substitutions by removing nested substitution variables (_SHORT_BUILD_ID and _VM_NAME) and instead using direct gcb-${BUILD_ID} naming in all step definitions, matching standard CloudBuild compliance rules.
- Add safe default substitutions to support running builds manually from the local workspace without throwing validation errors.
687e612 to
12be96b
Compare
5 tasks
Mahalaxmibejugam
approved these changes
May 19, 2026
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.
This PR optimizes the zonal system tests CloudBuild configuration (
zb-system-tests-cloudbuild.yaml) and its execution script (run_zonal_tests.sh) to make the test execution robust, fast, and concurrency-safe.Proposed Changes
/workspace/packages/google-cloud-storagedirectory on the Cloud Build runner and copying the tarball viascpto the VM. This eliminates Git and repo-cloning requirements on the GCE VM, improving speed and reliability.cleanup-old-keysstep (which deleted all OS Login SSH keys for the project and interfered with concurrent builds) by registering the generated SSH key with OS Login using a 1-hour Time-To-Live (TTL). GCP automatically expires old keys, preventing key accumulation without affecting other concurrent builds."${_VM_NAME}"ingcloud computessh, scp, and delete commands._PR_NUMBER,_CROSS_REGION_BUCKET,_ZONAL_BUCKET,_ZONAL_VM_SERVICE_ACCOUNT) to support manual builds.CROSS_REGION_BUCKETwith a fallback default in the test runner script.dynamicSubstitutions: trueunder CloudBuild options to support active evaluation of build variables.Verification Results
Both verification scenarios were executed and confirmed:
fixes - b/514186407
TAG=agy
CONV=16d817fd-2422-432e-816b-bf159b381df2