Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AppEngine/Go: Using a new version of Go with the SDK

The Go SDK currently ships with Go version is 1.6.2 but the most recent is 1.7.1 . I need some enhancements/bugfixes that were released since 1.6.2 . However, when I replace the goroot directory in the SDK directory that contains Go 1.6.2 with a symlink that points to 1.7.1, I get an error that has to do with not being able to find bin/goapp, which looks to be AppEngine-specific and not provided in the standard Go build.

Does anyone know a way to upgrade the Go available in the AppEngine SDK? Does this mean that the Go in production is also 1.6.2?

like image 447
Dustin Oprea Avatar asked Sep 22 '16 11:09

Dustin Oprea


People also ask

What is go App Engine?

Google App Engine is a service and a platform where you can develop and host web applications. You can learn more about Google App Engine at the official Google App Engine site. With App Engine integration, you can run and debug Google App Engine applications.

What type of service model is Google Appengine using?

App Engine is a fully managed, serverless platform for developing and hosting web applications at scale. You can choose from several popular languages, libraries, and frameworks to develop your apps, and then let App Engine take care of provisioning servers and scaling your app instances based on demand.

How do I install Google Appengine?

Download and Install You can download the Google App Engine SDK by going to: http://code.google.com/appengine/downloads.html and download the appropriate install package. Download the Windows installer – the simplest thing is to download it to your Desktop or another folder that you remember.

What is difference between cloud run and App Engine?

App Engine is for deploying code, Cloud Run for deploying containers, and containers are today's requirements. Cloud Run runs containers, so for each release you have to build a container and push it to GCP.


Video Answer


1 Answers

Unfortunately you're stuck with the Go version that comes bundled in the latest App Engine Go SDK.

Even if you "switch" it locally with Go 1.7.1 and somehow you manage to compile and run your app with Go 1.7.1 (by adding the missing files from the SDK's Go root), the production environment currently also uses Go 1.6.2, so your app and Go code will run into errors in the live environment when code that is missing from 1.6.2 is referenced. Most likely even the deployment would fail.

Also note that when you deploy your app to App Engine, only the source files are uploaded, and your app is compiled in the cloud. So you can't even "trick" it by compiling it locally and somehow "exclude" source files and upload only the binaries (binaries are not even uploaded).

You can't do anything else but wait for Go 1.7.1 (or a newer version) to make it to the SDK. Note that the Go version bundled in the SDK usually lags a few versions behind, because for it to become the "live" version, it usually needs modifications / altering for the sandboxed environment of App Engine (certain restrictions must be applied / implemented), and it needs further / additional testing / strengthening regarding security.

like image 129
icza Avatar answered Sep 27 '22 23:09

icza