GoogleCloudPlatform / cloud-run-button

Let anyone deploy your GitHub repos to Google Cloud Run with a single click
https://cloud.run
Apache License 2.0
528 stars 92 forks source link

Wait for credentials to be present #163

Closed ahmetb closed 4 years ago

ahmetb commented 4 years ago

In some cases such as G Suite requiring some users to be re-authed every N hours, creds won't be present in the Cloud Shell. This patch adds a 2-minute wait to the experience, with an indicator telling user to authenticate.

Internal bug: 154573156 cc: @jamesward

jamesward commented 4 years ago

Nice! Thanks for doing this. I tried this out in the docker container and got a crazy error when it tried to do the build:

[ ✖ ] Failed to build container image.
Error: attempted to build and failed: docker build failed: exit status 2, output:
Sending build context to Docker daemon  437.2kB
Step 1/9 : FROM golang as builder
 ---> 25c4671a1478
Step 2/9 : WORKDIR /go/src/cloudrun/hello
 ---> Using cache
 ---> 09706419d7be
Step 3/9 : COPY . .
 ---> 6756817e4030
Step 4/9 : RUN CGO_ENABLED=0 GOOS=linux go build -v -o hello
 ---> Running in 39a46abeeebc
runtime: mlock of signal stack failed: 12
runtime: increase the mlock limit (ulimit -l) or
runtime: update your kernel to 5.3.15+, 5.4.2+, or 5.5+
fatal error: mlock failed
...

Maybe this is something with my environment or maybe something has changed with the base Cloud Shell image?

jamesward commented 4 years ago

BTW, this worked fine not in the docker container.

ahmetb commented 4 years ago

Maybe this is something with my environment or maybe something has changed with the base Cloud Shell image?

This docker build in the CI is giving too many issues. This is most likely a false negative. I suspect it might work fine on GCB, as it seems it depends on kernel version.

jamesward commented 4 years ago

Do you think that message is from my host machine because I'm mounting my docker socket?

ahmetb commented 4 years ago

Hard to tell. I haven't seen this sort of error message from go compiler before, but looks like memory issue.

jamesward commented 4 years ago

I tried this on Cloud Shell and didn't get the error. So it seems like just something with my env. I'm getting another error though... Troubleshooting now.

jamesward commented 4 years ago

Error is unrelated: https://github.com/GoogleCloudPlatform/cloud-run-button/issues/164