Skip to content

Commit

Permalink
Adds a small sleep before deploying dispatch.yaml
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nkinkade committed Mar 19, 2024
1 parent 7a515ba commit d0072cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d0072cb

Please sign in to comment.