Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Build - source-context.json SHA mismatch

I have a Python 3 project which I am hosting on Google AppEngine Standard. Until a couple of days ago I was able to deploy normally (right since I did the initial setup in July 2019) until a couple of days ago. Now I get the following response:

starting build "abc"

FETCHSOURCE
BUILD
Starting Step #0 - "fetcher"
Step #0 - "fetcher": Already have image (with digest): gcr.io/cloud-builders/gcs-fetcher
Step #0 - "fetcher": Fetching manifest gs://staging.my-project.appspot.com/ae/xxx/manifest.json.
Step #0 - "fetcher": Processing 312 files.
Step #0 - "fetcher": Failed to fetch gs://staging.my-project.appspot.com/xxx, will no longer retry: fetching "gs://staging.my-project.appspot.com/xxx" with timeout 1h0m0s to temp file "/workspace/.download/staging.my-project.appspot.com-xxx": source-context.json SHA mismatch, got "xxx", want "yyy"
Step #0 - "fetcher": Failed to download at least one file. Cannot continue.
Finished Step #0 - "fetcher"
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/gcs-fetcher" failed: step exited with non-zero status: 1

Any idea why this would be happening and how to fix it?

P.S. I use the following command for deployment:

gcloud --project my-project app deploy app.yaml
like image 387
Severin Avatar asked Apr 21 '20 14:04

Severin


1 Answers

After conversation with Google engineers (https://issuetracker.google.com/issues/154588981?pli=1) the following worked:

  1. Remove the source-context.json file
  2. Delete the bucket where the deployment files are, e.g. gs://staging.my-project.appspot.com
  3. Deploy again

If you need the source-context.json file, you can follow these steps: https://www.google.com/url?q=https://cloud.google.com/debugger/docs/source-context&sa=D&usg=AFQjCNHMB7Dm_jISwG2AnpokQ7XN5GmLAw

like image 127
Navid Avatar answered Oct 23 '22 09:10

Navid