2

I am trying to migrate my Go app to runtime go112, but dev_appserver.py throw the following error:

RuntimeError: Unknown runtime 'go112'; supported runtimes are 'custom', 'go', 'go111', 'java', 'java7', 'java8', 'php55', 'php72', 'python', 'python-compat', 'python27', 'python37'.

Current Go version is 1.12.11

Edit: I used apt-get to install the SDK.

apt-get update && apt-get install google-cloud-sdk google-cloud-sdk-app-engine-python\
    google-cloud-sdk-app-engine-python-extras\
    google-cloud-sdk-app-engine-java\
    google-cloud-sdk-app-engine-go\
    google-cloud-sdk-datalab\
    google-cloud-sdk-datastore-emulator\
    google-cloud-sdk-pubsub-emulator\
    google-cloud-sdk-cbt\
    google-cloud-sdk-cloud-build-local\
    google-cloud-sdk-bigtable-emulator\
    kubectl -y

That way it seems I can't use gcloud components update and the packages are not up-to-date in the repos.

Now my questions is: Does google-cloud-sdk-app-engine-go support go runtime 1.12? If not, when will it support runtime 1.12?

Update: I installed cloud SDK and run gcloud components update successfully on another computer, dev_server.py still throw the same error. Does the local SDK actually support rumtime 1.12?

Chaoming Li
  • 205
  • 2
  • 16

2 Answers2

2

go112 runtime is not available on local dev_appserver.py. This has been discussed on the App Engine Go forum at

https://groups.google.com/forum/#!topic/google-appengine-go/kHxZ9zIb_QE

The expectation is that starting from go112 runtime, there is no "appengine" way of running the go server and works normally like any go server outside GAE. There are a few open issues like dispatching urls though.

Siva
  • 1,096
  • 7
  • 20
  • Thanks, this answers the question. There are some problems with this approach and I hope Google would have a better solution for upgrading to 1.12 – Chaoming Li Oct 23 '19 at 22:36
  • I am able to run 1.12 locally, but not really an app engine simulation. That's quite a poor solution as dispatch, queue, and other features are not able to be tested locally. – Chaoming Li Oct 23 '19 at 23:28
0

It sounds like you gcloud SDK is an old version and not recognize "runtime: go112", please run this command in order to update your SDK.

gcloud components update

After the update you can be able to deploy an app engine service using GO 1.12 runtime, check the changes that you need to perform in you App.yaml in this link

Jan Hernandez
  • 4,414
  • 2
  • 12
  • 18
  • Hmm...it seems the way I installed the SDK doesn't have the latest version. I used apt-get. – Chaoming Li Oct 21 '19 at 22:31
  • Hi Jorge, doesn't seem the SDK actually support runtime 1.12. Could you confirm after updating you could run app engine locally with runtime 1.12? – Chaoming Li Oct 21 '19 at 23:22
  • @ Chaoming Li this is the official documentation for go 1.12 over app engine, check if your environment is in compliance with this guide. https://cloud.google.com/appengine/docs/standard/go112/quickstart In this official repository for app engine is using go 1.12 https://github.com/GoogleCloudPlatform/golang-samples/tree/master/appengine/go11x/helloworld – Jan Hernandez Oct 22 '19 at 14:57
  • I check your update on your question i think that you need run this command "gcloud components install app-engine-go" as is mentioned in de official documentation – Jan Hernandez Oct 22 '19 at 15:04