googlearchive / cloud-functions-go

Unofficial Native Go Runtime for Google Cloud Functions
Apache License 2.0
423 stars 44 forks source link

Can't deploy function to Google Cloud Platform #37

Closed tlaplusplus closed 6 years ago

tlaplusplus commented 6 years ago

Hello, Thank you for this wonderful initiative to add Go support to Cloud Functions! Unfortunately, I cannot seem to be able to deploy the example function. It works fine locally, but after uploading the zip file to the new function it just gets stuck during deployment and it eventually gets cut off by the quota limit. status: { code: 10 message: "Operation interrupted." }

Any ideas of what might be going wrong? Thanks again!

iangudger commented 6 years ago

I wasn't able to reproduce. It may have been a transient issue with the Cloud Functions deployment process. Can you try again?

tlaplusplus commented 6 years ago

I did. I tried to follow the steps in the README. My OS is Ubuntu 18.04, 64bit, kernel version 4.15.0-22-generic. I ran make on my machine and uploaded the zip file to google cloud functions. It just times out when trying to deploy. Is there anything I should change in the standard configuration? (When running make test, I can see the Hello from Go message locally)

Update: deployment works when using vagrant and virtualbox, so the issue must be with one of the dependencies. Will investigate further

iangudger commented 6 years ago

Are any errors printed during make? What changes have you made from stock Ubuntu 18.04?

tlaplusplus commented 6 years ago

No errors printed during make. Something weird happened, I tried it again on native Ubuntu after using vagrant and now it seems to deploy fine. Even though I did not change anything. Comparing the 2 zip files I found just this difference between package.json files: For the one in vagrant the line is : "execer": "file:local_modules/execer" For the one in native Ubuntu: "execer": "file://local_modules/execer" On Ubuntu I also have node 8.10.0 vs 6.14.3 and gcc 7.3.0 vs 6.3.0

I did not make any changes to the stock Ubuntu installation (well, apart from installing extra packages, but those are too many to keep track of)

iangudger commented 6 years ago

GCC is used for testing locally, but no outputs from GCC are uploaded. Some outputs from Node are uploaded as you found and I think GCF uses Node 6.x, so maybe it is a breaking change in Node 8.x.

tlaplusplus commented 6 years ago

Thanks for the help! Couldn't pinpoint the exact problem, but I will let you know if I find out.