@@ -240,7 +240,7 @@ function deploy_udfs() {
240240 --config=" ${UDF_DIR} " /cloudbuild.yaml \
241241 --polling-interval=" 10" \
242242 --worker-pool=" projects/${PROJECT_ID} /locations/us-central1/workerPools/udf-unit-testing" \
243- --substitutions SHORT_SHA=,_JS_BUCKET=" ${_JS_BUCKET} " ,_BQ_LOCATION=" ${_BQ_LOCATION} "
243+ --substitutions SHORT_SHA=,_JS_BUCKET=" ${_JS_BUCKET} " ,_BQ_LOCATION=" ${_BQ_LOCATION} , " _TEST_DATA_GCS_BUCKET= " ${_TEST_DATA_GCS_BUCKET} "
244244}
245245
246246# ######################################
@@ -254,6 +254,9 @@ function deploy_udfs() {
254254# None
255255# ######################################
256256function main() {
257+ # Add SHORTSHA to _TEST_DATA_GCS_BUCKET env variable
258+ # to prevent collisions between concurrent builds
259+ export _TEST_DATA_GCS_BUCKET=" ${_TEST_DATA_GCS_BUCKET} /${SHORT_SHA} "
257260 # Only deploy UDFs when building master branch and there is
258261 # no associated pull request, meaning the PR was approved
259262 # and this is now building a commit on master branch.
@@ -263,10 +266,9 @@ function main() {
263266 # names do not get the SHORT_SHA value added as a suffix.
264267 cd " ${SP_DIR} " && export SHORT_SHA=" " && ./deploy.sh
265268 else
266- # Add SHORTSHA to _JS_BUCKET and _TEST_DATA_GCS_BUCKET env variables
269+ # Add SHORTSHA to _JS_BUCKET env variable
267270 # to prevent collisions between concurrent builds
268271 export _JS_BUCKET=" ${_JS_BUCKET} /${SHORT_SHA} "
269- export _TEST_DATA_GCS_BUCKET=" ${_TEST_DATA_GCS_BUCKET} /${SHORT_SHA} "
270272 build
271273 dry_run_all_sql
272274 fi
0 commit comments