app.yaml api_version 将 Google AppEngine 从 Go 1.9 迁移到 Go 1.11 的问题

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

$DAYJOB,我们使用的是基于 Go 1.9 的 AppEngine 应用程序。现在 Google 正在弃用 1.9 版,我正尝试使用 migration guide 迁移到 1.11。它说我应该设置 runtime: go111 并从 app.yaml 中删除 api_version: go1.9 值,但是在这样做时,我收到一条错误消息 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 
--------------------------------------------------------------------------------

如果我尝试将其添加回去,无论我在其中输入什么值,我都会收到一条错误消息:

╔════════════════════════════════════════════════════════════╗
╠═ 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.

我在这里有点不知所措,我做错了什么?

运行 在本地使用 dev_appserver.py 工作正常。

我安装了不匹配的 SDK 包:

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

升级不匹配的软件包解决了这个问题。感谢@icza 的提示!