Live data from Hacker News

Cloud Functions: Go 1.11 is now a supported language

cloud.google.com

1–10 of 107 posts

Re: Cloud Functions: Go 1.11 is now a supported language

#4

Hey all - Seth from Google here. We're really excited to bring Go to Google Cloud Functions (GCF). Please try it out, give us feedback, and let us know if you have any questions!

As we all know, it took Google so long to get this. Can you overview on what are some of the technical challenges faced? Just curious. Thanks.

Re: Cloud Functions: Go 1.11 is now a supported language

#5
post #3

Better late than never.

You're not wrong. Cloud Functions Product Manager here. We've been running a private early access preview since we first showed this at GopherCon in August. I'm really happy to see this first step but we have a lot of work ahead of us.

Re: Cloud Functions: Go 1.11 is now a supported language

#8
post #4

Hey all - Seth from Google here. We're really excited to bring Go to Google Cloud Functions (GCF). Please try it out, give us feedback, and let us know if you have any questions!

As we all know, it took Google so long to get this. Can you overview on what are some of the technical challenges faced? Just curious. Thanks.

Cloud Functions PM here. I can give some insight:

* We've been running a private early access preview/alpha since last August.

* This was our first compiled language on Cloud Functions, which came with its own set of challenges.

* It took us a while to find the right approach for supporting dependencies (both Go Modules and vendoring are supported). Unlike other providers, when you deploy your source code, Cloud Functions will automatically install dependencies listed in your go.mod file.

* Our testers gave us a ton of feedback that helped us polish the developer experience -- we identified and fixed many rough edges related to error messages during deployment/build and errors at runtime. Serverless products can be a bit opaque (since you can't just ssh into a machine), so getting this right is important.

I'd like to say that there was one big, interesting challenge that we had to tackle. But the reality is that we worked through many small details that only became apparent during testing. We wanted to address these so that we could offer a high quality experience for our public beta launch. We owe our alpha testers major credit for helping us find and solve issues.

Speaking of testers -- if you have feedback on the runtime, we'd love to hear from you in our Cloud Functions Beta Tester group [1].

[1] https://cloud.google.com/functions/docs/getting-support#beta...

Re: Cloud Functions: Go 1.11 is now a supported language

#9

Hey all - Seth from Google here. We're really excited to bring Go to Google Cloud Functions (GCF). Please try it out, give us feedback, and let us know if you have any questions!

IIRC only the Node.js runtime has the ability to be emulated locally. Is this still the case? If I wanted to test my function locally, how would I go about doing that?

Re: Cloud Functions: Go 1.11 is now a supported language

#10
post #9

Hey all - Seth from Google here. We're really excited to bring Go to Google Cloud Functions (GCF). Please try it out, give us feedback, and let us know if you have any questions!

IIRC only the Node.js runtime has the ability to be emulated locally. Is this still the case? If I wanted to test my function locally, how would I go about doing that?

Use regular "go test" for unit testing. If you're using metadata inside your function (e.g., to extract an event ID) you can use metadata.NewContext to pass into your function while testing: https://godoc.org/cloud.google.com/go/functions/metadata#New...

If you just want to execute your function, create another package main and start an HTTP server, as you'd normally do.

There are some examples on this page: https://cloud.google.com/functions/docs/bestpractices/testin...

We're thinking about ways to improve the local development/testing story, and are keen to hear any ideas/feedback.

Disclaimer: I work at Google, and worked on this product.

Post reply on HN