2

AppEngine supports Go 1.16 for a year now. But dev_appengine.py still doesn't:

RuntimeError: Unknown runtime 'go116'; supported runtimes are 'custom', 'go', 'go111', 'go112', 'go113', 'go114', 'go115', 'java', 'java7', 'java8', 'php55', 'php72', 'php81', 'python', 'python-compat', 'python27', 'python310', 'python37', 'python38', 'python39'.

The official documentation is unhelpful.

How can I do local Go 1.16 development of my AppEngine app?

Mike
  • 33
  • 3
  • Why do you need an emulator? Do you use App Engine specific APIs? – guillaume blaquiere Nov 18 '22 at 13:49
  • @guillaumeblaquiere - if you need to test route handlers in ```app.yaml``` file, or test that multi-service Apps (make sure ```dispatch.yaml```) is correctly working, you'll need to run your App with ```dev_appserver.py```. If you also wish to view the contents of your local datastore, you'll need that tool unless you use 3rd party GUIs built for the datastore emulator – NoCommandLine Nov 18 '22 at 14:36
  • Understood. And I don't have any solution. You can try to build a container and set your to custom your emulator env. – guillaume blaquiere Nov 18 '22 at 14:44
  • https://groups.google.com/g/golang-nuts/c/OspOyUz7CBQ - it seems like the Go version of AppEngine is no longer supported at Google... – Mike Nov 18 '22 at 14:45
  • Don't see anything in that google group link that says so. – NoCommandLine Nov 18 '22 at 16:06

1 Answers1

1

I assume you meant dev_appserver.py and not dev_appengine.py. If so, then

  1. It looks like you're using GAE Standard env in which case, gcloud CLI version 409.0.0 (which seems to be the latest, at least for Mac) doesn't support go 1.1.6. The go runtimes supported in it are
 go, go111, go112, go113, go114, go115
You can find the list of supported runtimes in the file 

{{path to gcloud sdk_installation}}/platform/google_appengine/google/appengine/tools/devappserver2/runtime_factories.py
  1. If you switch to GAE Flex, I believe you'll be able to use go 1.1.6 since you'll then be using a custom runtime

  2. You can also just run your App as you would a standard go App e.g using command go run <go_package>

NoCommandLine
  • 5,044
  • 2
  • 4
  • 15