dtyz76562 2019-08-21 10:37
浏览 92

app.yaml api_version的问题将Google AppEngine从Go 1.9迁移到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.

  • 写回答

1条回答 默认 最新

  • dras2334 2019-08-21 11:29
    关注

    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!

    评论

报告相同问题?

悬赏问题

  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程