We attempted a deployment of a Ruby on Rails application to Google App Engine’s environment yesterday (2017-01-12) and the links to all of our assets broke. In short, roll back the version of Google’s Cloud Components and it will probably fix your links.
Update - 2017-03-07
This morning we ran an update:
gcloud components update
Our previous version of 135.0.0 was updated to 146.0.0, and we had no asset issues upon deployment.
Google Cloud SDK 146.0.0 bq 2.0.24 bq-nix 2.0.24 core 2017.02.28 core-nix 2016.11.07 gcloud gcloud-deps 2017.02.28 gcloud-deps-darwin-x86_64 2017.02.21 gsutil 4.22 gsutil-nix 4.18 kubectl kubectl-darwin-x86_64 1.5.3
The Problem - No Fingerprints on Assets
At the end of most deployments we will run
gcloud components update when Google prompts that there’s a new release of their Cloud SDK. Who doesn’t? We all want to make sure we have access to the cool new feature’s in Google’s Cloud SDK.
instead of this:
The Solution - Restore Cloud SDK Components
When we confirmed there was nothing wrong with our application’s configuration we decided to roll back absolutely everything to be in line with our last deployment, which meant running:
gcloud components restore
This restored us to:
Google Cloud SDK 135.0.0 bq 2.0.24 bq-nix 2.0.24 core 2016.11.11 core-nix 2016.11.07 gcloud gsutil 4.22 gsutil-nix 4.18 kubectl kubectl-darwin-x86_64 1.4.4
After running another deployment we confirmed that all of our assets and their fingerprints were back and we could move forward. We don’t know the exact cause for the problem yet. As of this morning the latest available Google Cloud SDK is 139.0.0.
Google Cloud SDK 139.0.0 bq 2.0.24 bq-nix 2.0.24 core 2017.01.11 core-nix 2016.11.07 gcloud gsutil 4.22 gsutil-nix 4.18 kubectl kubectl-darwin-x86_64 1.5.1
A Note on Deployment
A moment to emphasize something important that you should take into account when deploying to GAE. Don’t just deploy with the default options to automatically promote the new version and stop the previous version. Do this:
gcloud app deploy --no-promote --no-stop-previous-version
After your application has been deployed, take the opportunity to confirm that the new deployment is functional. Then you can use Google’s web based console to migrate traffic over to the new release when you know everything is working.