0

我们正在$DAYJOB使用基于 Go 1.9 的 AppEngine 应用程序。现在 Google 正在弃用 1.9 版,我正在尝试使用迁移指南迁移到 1.11 。它说我应该设置runtime: go111和删除 的api_version: go1.9app.yaml,但是这样做时,我收到一条错误消息部署:

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工作正常。

4

1 回答 1

0

我安装了不匹配的 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 的提示!

于 2019-08-21T11:29:10.730 回答