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.
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!