From one day to another I suddenly could no longer deploy my GoLang project to AppEngine. I get this error message in the log:
Step #2 - "build": Status: Downloaded newer image for eu.gcr.io/gae-runtimes/buildpacks/google-gae-18/go/builder:go_20230305_RC00
Step #2 - "build": eu.gcr.io/gae-runtimes/buildpacks/google-gae-18/go/builder:go_20230305_RC00
Step #2 - "build": ===> ANALYZING
Step #2 - "build": ERROR: failed to initialize analyzer: getting previous image: getting config file for image "eu.gcr.io/staticform/app-engine-tmp/app/www/ttl-18h:latest": GET https://storage.googleapis.com/eu.artifacts.staticform.appspot.com/containers/images/sha256:af3ff480dc0053108a52bf8b7ec3e45893e4e97c507102ff524b07bc01e03249?access_token=REDACTED: unexpected status code 404 Not Found: <?xml version='1.0' encoding='UTF-8'?><Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Details>No such object: eu.artifacts.staticform.appspot.com/containers/images/sha256:af3ff480dc0053108a52bf8b7ec3e45893e4e97c507102ff524b07bc01e03249</Details></Error>
Finished Step #2 - "build"
ERROR
ERROR: build step 2 "eu.gcr.io/gae-runtimes/buildpacks/google-gae-18/go/builder:go_20230305_RC00" failed: step exited with non-zero status: 1
First I thought Go 1.11 was finally deactivated but changing to 1.19 didn't solve the problem. It seems deploying with a new service name works but updating an existing service does not. Even when I change the service version.
I tested it with two of my GoLang projects (one without any changes). My Java projects deploy fine.
Here is my command to deploy:
gcloud app deploy --project=staticform --version=1 app.yaml
Update:
Here is my app.yaml
:
runtime: go111
automatic_scaling:
min_idle_instances: 0
max_instances: 1
handlers:
- url: /.*
script: auto
secure: always
- url: /admin/.*
script: auto
secure: always
login: admin
As it turned out all I needed was the --no-cache
option. I don't know why, and I don't care. ;)
So with this command the deployment was successful:
gcloud app deploy --project=staticform --version=1 --no-cache app.yaml