简体   繁体   中英

Problems with app.yaml api_version migrating Google AppEngine from Go 1.9 to Go 1.11

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM