Skip to content

Commit e7e6910

Browse files
committed
address gemini review
1 parent 00ae7e3 commit e7e6910

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

tools/cloud-build/check_retriable_error.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ if [ -z "$LOG_FILE" ]; then
2121
exit 2
2222
fi
2323

24+
if [ ! -f "$LOG_FILE" ]; then
25+
echo "Error: Log file '$LOG_FILE' does not exist or is not a regular file." >&2
26+
exit 2
27+
fi
28+
2429
# Define all retriable errors here.
2530
# Note: "Couldn't find a zone to deploy" and "ERROR: ZONE not found" are not included here
2631
# because find_available_zone.sh now internally loops and waits for zone capacity to maintain Kueue locks.

tools/cloud-build/daily-tests/builds/slurm-gcp-v6-rocky8.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ steps:
5151
- id: generate-job-manifest
5252
name: gcr.io/cloud-builders/gcloud
5353
entrypoint: /bin/bash
54-
secretEnv: ['GCLUSTER_GCS_PATH', 'SA_EMAIL']
54+
secretEnv: ['GCLUSTER_GCS_PATH', 'SA_EMAIL', 'TRIAGE_GCS_BUCKET', 'TRIAGE_PROJECT_NUMBER', 'TRIAGE_INVOKER_SA', 'TRIAGE_CLOUD_RUN_URL']
5555
args:
5656
- -c
5757
- |
@@ -258,7 +258,6 @@ steps:
258258
- -c
259259
- |
260260
gcloud artifacts docker images delete us-central1-docker.pkg.dev/$PROJECT_ID/hpc-toolkit-repo/test-runner:$BUILD_ID --quiet
261-
secretEnv: ['GCLUSTER_GCS_PATH', 'TRIAGE_GCS_BUCKET', 'TRIAGE_PROJECT_NUMBER', 'TRIAGE_INVOKER_SA', 'TRIAGE_CLOUD_RUN_URL', 'SA_EMAIL']
262261
availableSecrets:
263262
secretManager:
264263
- versionName: projects/${PROJECT_ID}/secrets/gcluster-develop-release-bucket/versions/latest

tools/cloud-build/wait_for_available_zone.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ while true; do
2121
# To extract the exported variables, we have the subshell write them to a file.
2222
set +e
2323
(
24-
source /workspace/tools/cloud-build/find_available_zone.sh
24+
set -e
25+
source /workspace/tools/cloud-build/find_available_zone.sh
2526
# If it succeeds, these lines will execute and save the exports.
26-
echo "export ZONE=${ZONE}" >/tmp/zone_export.sh
27-
echo "export PROVISIONING_MODEL=${PROVISIONING_MODEL}" >>/tmp/zone_export.sh
27+
echo "export ZONE=\"${ZONE}\"" >/tmp/zone_export.sh
28+
echo "export PROVISIONING_MODEL=\"${PROVISIONING_MODEL}\"" >>/tmp/zone_export.sh
2829
) 2>&1 | tee /tmp/zone_output.log
2930

3031
EXIT_CODE=${PIPESTATUS[0]}

0 commit comments

Comments
 (0)