Home > Net >  App Engine Deployment with Cloud Build failed with an "operation is already in progress" e
App Engine Deployment with Cloud Build failed with an "operation is already in progress" e

Time:10-13

I try to deploy a new version of app engine service with google cloud build with following steps:

  1. deploy maintenance dispatch.yml to route all requests to maintenance page
  2. Upgrade database
  3. deploy new version
  4. deploy dispatch.yml to route requests back to default service

The first three steps are working, but step 4 results in the following error:

an operation is already in progress

Screenshot of error message

The running GAE process is the one which is stopping the previous version. So how can I find the running process and wait until it is stopped before I deploy the dispatch.yml?

CodePudding user response:

Per the documentation, to migrate traffic from one version to another, you should use the set-traffic command. So I think your step 4 should be replaced by the set-traffic command

CodePudding user response:

I could solve the problem by myself with the following statement:

gcloud app operations wait $(gcloud app operations list --format="value(id)" --pending --limit=1) || true

This would wait for a running operation. In my case I had to add this line twice because there where to running operations to wait for.

  • Related