Skip to content

Commit

Permalink
Adds adds a wait operation for deployments to measurement-lab
Browse files Browse the repository at this point in the history
A production build failed with this error:

> Cannot operate on apps/measurement-lab because an operation is already in progress for apps/measurement-lab

Looking at the build step timing compared to the operations in App Engine,
there is a very tight timing issue. This commit adds a new build step that
waits for the most recent pending operation to complete before moving on to
deploying dispatch.yaml. I _believe_ this should safeguard against this
particular error condition in the build.
  • Loading branch information
nkinkade committed Mar 19, 2024
1 parent 5f29e3f commit 7a515ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ steps:
env:
- PROJECT_IN=measurement-lab
args:
- gcloud app operations wait $(gcloud app operations list --format="value(id)" --pending --limit=1) || true
- gcloud app deploy grafana-public/dispatch.yaml --project $PROJECT_ID

0 comments on commit 7a515ba

Please sign in to comment.