我想将更新部署到我们的应用程序,但是gcloud
命令存在问题,该命令未能“与文件的SHA1和冲突”。输出如下:
➜ gcloud app deploy xxx-xxx-xxxx.yaml --project xxx-xxx-xxxx --quiet
Services to deploy:
descriptor: [/home/vzool/Workspace/xxx-xxxx-xxxxxxxxxxx/xxx-xxx-xxxx.yaml]
source: [/home/vzool/Workspace/xxx-xxxx-xxxxxxxxxxx]
target project: [xxx-xxx-xxxx]
target service: [default]
target version: [20180917t110153]
target url: [https://xxx-xxx-xxxx.appspot.com]
Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 1 file to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [3] The following errors occurred while copying files to App Engine:
File https://storage.googleapis.com/staging.xxx-xxx-xxxx.appspot.com/c819d7599ceb31df8d4370eed1981defcb5034c6 failed with: Conflicting SHA1 sum for file. Expected "ddb6af3b_cf4bff57_613fb78d_208480fa_1717b3c4" but received "c819d759_9ceb31df_8d4370ee_d1981def_cb5034c6".
Details: [
[
{
"@type": "type.googleapis.com/google.rpc.ResourceInfo",
"description": "Conflicting SHA1 sum for file. Expected \"ddb6af3b_cf4bff57_613fb78d_208480fa_1717b3c4\" but received \"c819d759_9ceb31df_8d4370ee_d1981def_cb5034c6\".",
"resourceName": "https://storage.googleapis.com/staging.xxx-xxx-xxxx.appspot.com/c819d7599ceb31df8d4370eed1981defcb5034c6",
"resourceType": "file"
}
]
]
我确实删除了该文件c819d7599ceb31df8d4370eed1981defcb5034c6
,但是每次都会生成新的哈希,请删除整个块staging.xxx-xxx-xxxx.appspot.com
,并且我确实清除了Memcache
,但是没有运气尝试所有这些选项! :(
我不知道该怎么办,有什么建议可以帮助我吗?
谢谢
答案 0 :(得分:1)
我认为经过一段时间的研究后,该应用程序本身具有实时功能,可在您打开实时页面时更新一个文件。
因此,gcloud
上传的内容发生了变化。
gcloud
上传然后验证。并且,如果文件在上传后更改,并且在验证之前gcloud
会通过您的脸上的错误进行更改。哈哈哈^ _ ^
答案 1 :(得分:0)
OP的回答似乎表明文件在gcloud
部署过程中被触摸。
对我来说,解决方案是:
git checkout
随机分支git checkout
我实际上正在尝试再次部署的分支gcloud app deploy . --version my_version_id --project my_project_id