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

panic when deploying #164

Closed jamesward closed 4 years ago

jamesward commented 4 years ago

When deploying: https://github.com/GoogleCloudPlatform/cloud-run-hello

I just got:

[ / ] Deploying service cloud-run-hello to Cloud Run... panic: assignment to entry in nil map

goroutine 1 [running]:
main.applyMeta(...)
        /src/cmd/cloudshell_open/deploy.go:116
main.patchService(0xc0000cf200, 0xc000331f80, 0xc00027c750, 0x22, 0xa39499)
        /src/cmd/cloudshell_open/deploy.go:142 +0x1e5
main.deploy(0xc0005186e0, 0xb, 0xc00054bcd0, 0xf, 0xc00027c750, 0x22, 0xa39499, 0xb, 0x0, 0x0, ...)
        /src/cmd/cloudshell_open/deploy.go:37 +0x842
main.run(0x7fffceda01dc, 0x3a, 0x0, 0x0, 0x0, 0x0, 0xa365c4, 0x7)
        /src/cmd/cloudshell_open/main.go:354 +0x26b0
main.main()
        /src/cmd/cloudshell_open/main.go:79 +0x207

I deleted the service and tried again but wasn't able to reproduce this.

ahmetb commented 4 years ago

Yeah it seems like this happens when annotations: field was somehow empty while updating an existing service. When you deploy to Cloud Run fully managed, you'll always get some annotations inserted to your app. So I'll take a look at this.

jamesward commented 4 years ago

Maybe there was a time when that didn't get set or something. I think I was deploying over something I deployed a long time ago.

jamesward commented 4 years ago

Thanks!