Google-App-Engine

gcloud app deploy source-context.json SHA 不匹配

  • April 22, 2020

我有一個 Python 3 項目,我在 Google AppEngine Standard 上託管。直到幾天前,我才能夠正常部署(因為我在 2019 年 7 月進行了初始設置)。現在我收到以下回复:

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

知道為什麼會發生這種情況以及如何解決嗎?

PS我使用以下命令進行部署:

gcloud --project my-project app deploy app.yaml

我的 gcloud 版本是:

Google Cloud SDK 260.0.0
beta 2019.05.17
bq 2.0.47
core 2019.08.23
gsutil 4.42

在與穀歌工程師( https://issuetracker.google.com/issues/154588981?pli=1 )交談後,以下工作:

  1. 刪除了 source-context.json 文件
  2. 刪除了部署文件所在的bucket,即gs://staging.my-project.appspot.com
  3. 再次部署

引用自:https://serverfault.com/questions/1013417