Cloud-builders: cloud build fail for python 3.4 flex service

Created on 19 Jul 2018  路  7Comments  路  Source: GoogleCloudPlatform/cloud-builders

We are getting fail builds with the following error

Step #1: Updating service [default] (this may take several minutes)...
Finished Step #1
TIMEOUT
ERROR: context deadline exceeded
Step #1: 

Cloud build create new versions but fails to switch traffic to it.

Most helpful comment

There are two timeouts, step timeouts and build timeouts. Step timeouts cannot be longer than the build timeout, which is 10 minutes by default. Increasing the build timeout should allow you to specify longer timeouts for steps.

https://cloud.google.com/cloud-build/docs/build-config#timeout_2

All 7 comments

Hi @maxpaynestory, we need more information in order to help you. Would you mind providing the build ID?
When you say "Cloud build create new versions but fails to switch traffic to it." that sounds like this is not just a build but part of a deployment? What is the full command line?

Hi @bendory , you are correct. buildconfig.yaml has command for deployment

gcloud app deploy

and it fails with the error

Here is the build id e8d587e6-2513-48fd-8bd0-a6fc2400497c

Hi @maxpaynestory, I inspected your build request (but not the build itself), I see you doing two build steps, each doing a gcloud app deploy, and the overall build has a 10m timeout. I suspect that 10m is simply not enough time to serially complete two end-to-end app engine deployments. I would suggest that you try some combination of:

  1. running both deployments concurrently using waitFor: ["-"]
  2. giving a longer timeout to the build itself, and possibly adding timeouts on the individual app deploy build steps if desired

You can learn about waitFor here.

Note that this is not an issue with your builds themselves; it is an issue with not allowing sufficient time for the remote deployments to complete.

I'm marking this issue as closed, you can reopen if this does not resolve the issue. Note that if you believe that your deployments should indeed complete within the given 10m timeout, that is not a cloud-builder issue but rather an App Engine issue.

@maxpaynestory Out of curiosity, did the suggested workaround help?

I have timeout issues and seem I can't increase above 10mins:
build step timeout "33m20s" must be <= build timeout "10m0s"

I have the same issue:
invalid build: invalid timeout in build step #3: build step timeout "33m20s" must be <= build timeout "10m0s"

Did someone solve this?

There are two timeouts, step timeouts and build timeouts. Step timeouts cannot be longer than the build timeout, which is 10 minutes by default. Increasing the build timeout should allow you to specify longer timeouts for steps.

https://cloud.google.com/cloud-build/docs/build-config#timeout_2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DazWilkin picture DazWilkin  路  3Comments

drgomesp picture drgomesp  路  8Comments

ptemmer picture ptemmer  路  5Comments

cove picture cove  路  7Comments

DiederikvandenB picture DiederikvandenB  路  4Comments