From d0072cb81d707899afaa799d5e3e64d61c52dcd7 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Tue, 19 Mar 2024 15:06:46 -0600 Subject: [PATCH] Adds a small sleep before deploying dispatch.yaml A previous build of this repo in the measurement-lab failed on the step trying to deploy dispatch.yaml, and this was because the previous build step had triggered some operations that were still in progress when the dispatch.yaml step started, and app engine did not like this. This change adds a 30s sleep before deploying dispatch.yaml just to be 100% sure that all app engine operations that the previous step triggered have completed. There is probably a more elegant solution using: gcloud app operations wait ... but this would require basically a shell script as a build step, whereas a simple sleep should work just fine. The operations which caused the previous build failure completed just seconds after the dispatch.yaml had started, so 30s should be more than enough. --- cloudbuild.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index ca5c3c3..d0247e8 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -33,6 +33,6 @@ steps: env: - PROJECT_IN=measurement-lab args: - - gcloud app operations wait $(gcloud app operations list --format="value(id)" --pending --limit=1) || true + - sleep 30 # Give all operations in previous step a few seconds to complete - gcloud app deploy grafana-public/dispatch.yaml --project $PROJECT_ID