AppEngine部署中的隐秘错误

时间:2017-12-14 06:14:09

标签: google-app-engine

在没有代码更改的情况下部署到AppEngine会突然失败,并显示一条神秘的错误消息:

Beginning deployment of service [default]...
WARNING: Deployment of service [default] will ignore the skip_files field in the configuration file, because the image has already been built.
Updating service [default] (this may take several minutes)...
...........................failed.
ERROR: (gcloud.app.deploy) Error Response: [13] Deployment Manager operation failed, name: operation-1513231070597-56046906d0f88-da77cf52-0e00ca2f, error: [{"code":"CONDITION_NOT_MET","location":"/deployments/aef-default-50474e3/resources/aef-default-50474e3-00it->$.properties","message":"\"/properties/metadata/items/12/value\": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: [\"string\"]; found: \"number\""}]
Exited with code 1

1 个答案:

答案 0 :(得分:5)

这是由于传递给deploy命令的版本被解析为数字/整数而不是字符串。修复是为了确保将其作为字符串传递。

注意:如果您基于截断的git哈希自动生成版本,则完全有可能生成将被解析为数字的版本,例如:哈希50474e3将被视为科学记数法。