在$DAYJOB
,我们正在使用基于Go 1.9的AppEngine应用程序。现在,Google将弃用1.9版,我正尝试使用migration guide升级到1.11版。它说我应该设置runtime: go111
并从api_version: go1.9
中删除app.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
在本地运行会很好。
答案 0 :(得分: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的提示!