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
526 stars 91 forks source link

nil pointer dereference crash #133

Closed ahmetb closed 4 years ago

ahmetb commented 4 years ago

Happened just now.

Welcome to Cloud Shell! Type "help" to get started.
To set your Cloud Platform project in this session use “gcloud config set project [PROJECT_ID]”
ahmetb@cloudshell:~$ cloudshell_open --repo_url "https://github.com/ahmetb/cloud-run-samples.git" --dir "grpc-server-streaming" --page "editor" --git_branch "grpc-streaming"
[ ✓ ] Cloned git repository https://github.com/ahmetb/cloud-run-samples.git.
[ ✓ ] Queried list of your GCP projects
[ ✓ ] Found 1647 projects in your GCP account.
[ ? ] Choose a project to deploy this application: ahmetb-samples-playground
[ ✓ ] Enabled Cloud Run API on project ahmetb-samples-playground.
[ ? ] Choose a region to deploy this application: us-central1
[ ! ] Attempting to build this application with its Dockerfile...
[ ! ] FYI, running the following command:
        docker build -t gcr.io/ahmetb-samples-playground/grpc-server-streaming .
[ ✓ ] Built container image gcr.io/ahmetb-samples-playground/grpc-server-streaming
[ ! ] FYI, running the following command:
        docker push gcr.io/ahmetb-samples-playground/grpc-server-streaming
[ ✓ ] Pushed container image to Google Container Registry.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x87b8af]

goroutine 1 [running]:
main.optionsToFlags(...)
        /src/cmd/cloudshell_open/cloudrun.go:37
main.run(0x7fff8de891f3, 0x2f, 0x7fff8de8925a, 0xe, 0x7fff8de89229, 0x15, 0xa6e1e0, 0xc000198700)
        /src/cmd/cloudshell_open/main.go:300 +0x198f
main.main()
        /src/cmd/cloudshell_open/main.go:81 +0x207
ahmetb commented 4 years ago

Can't repro locally, was this fixed?

Would be good to get a fix out since it's probably also breaking Cloud Run samples.

jamesward commented 4 years ago

This is the same as #128. The Cloud Shell team has been working on deploying our latest but apparently ran into some snags (unrelated to the button). I should have put the actual error in that bug to make it easier to correlate.

ahmetb commented 4 years ago

I don’t think you can do much to surface a meaningful error here, as this is a panic. Leaving open until the fix ships.