Abdelaziz Elrashed
Abdelaziz Elrashed

Reputation: 743

AppEngine Deploy is Conflicting SHA1 sum for a file

I want to deploy an update to our app but we have an issue with gcloud command which failed to "Conflicting SHA1 sum for file". Here is the output:

➜ 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"
    }
  ]
]

I do delete this file c819d7599ceb31df8d4370eed1981defcb5034c6 but everytime new hash will be generated, delete entire block staging.xxx-xxx-xxxx.appspot.com and I did clear Memcache but with no luck trying all these options! :(

I don't know what to do anymore with this, any suggestions may help me out?

Thanks

Upvotes: 2

Views: 962

Answers (2)

Alex
Alex

Reputation: 5276

OP's answer seemed to indicate that a file got touched during the gcloud deploy process.

The solution for me was to:

  1. git checkout some random branch
  2. git checkout the branch I was actually trying to deploy again
  3. run gcloud app deploy . --version my_version_id --project my_project_id

Upvotes: 0

Abdelaziz Elrashed
Abdelaziz Elrashed

Reputation: 743

I think after sometime in research the issue, the app itself has a live feature which lead to update one file while you open live page. So, that change what gcloud uploaded. gcloud upload then verify. And if file changed after upload and before verify gcloud will through this error on your face. Ha ha ha ^_^

Upvotes: 3

Related Questions