0

At $DAYJOB we are using a Go 1.9-based AppEngine application. Now that Google is deprecating version 1.9, I am trying to move to 1.11, using the migration guide. It says that I should set runtime: go111 and remove the api_version: go1.9 value from app.yaml, but when doing so, I get an error message deploying:

ERROR: (gcloud.app.deploy) Staging command [/usr/lib/google-cloud-sdk/platform/google_appengine/go-app-stager /home/peter/src/licensemanager/src/web/app.yaml /home/peter/src/licensemanager/src/web /home/peter/tmp/tmpBB3Yk8/tmpQQPTFj] failed with return code [1].

------------------------------------ STDOUT ------------------------------------
------------------------------------ STDERR ------------------------------------
2019/08/21 07:59:20 invalid api_version value 
--------------------------------------------------------------------------------

If I try to add it back, no matter what value I put in it, I get an error message:

╔════════════════════════════════════════════════════════════╗
╠═ Uploading 12 files to Google Cloud Storage               ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: The following fields are not allowed in app.yaml: api_version.

I am a bit at a loss here, what am I doing wrong?

Running locally with dev_appserver.py works fine.

nafmo
  • 448
  • 4
  • 19
  • 1
    Maybe you have the old or both versions of the SDK? Try removing it and get only the new version. – icza Aug 21 '19 at 11:07
  • Indeed. Seems I had the wrong version installed some of the `google-cloud-sdk-*` packages. Thanks! – nafmo Aug 21 '19 at 11:28

1 Answers1

0

I had mismatching SDK packages installed:

ii  google-cloud-sdk                    259.0.0-0       all          Utilities for the Google Cloud Platform
ii  google-cloud-sdk-app-engine-go      194.0.0-0       amd64        Go runtime for Google App Engine

Upgrading the mismatching packages fixed the issue. Thanks to @icza for the tip!

nafmo
  • 448
  • 4
  • 19