post_compile puts revision.txt only in the dist/ directory, however when SERVE_MINIFIED_UI is unset, files are served from the ui/ directory instead. This means on later deploys, when pre_deploy tries to fetch "$SITE_URL/revision.txt" (in order to generate a GitHub compare URL for the New Relic deploy reporting), it gets s 404, causing the deploy step to abort, preventing the deployment. Workaround is to set both `SKIP_PREDEPLOY=1` and unset `SERVE_MINIFIED_UI` at the same time. Fix is just to make sure revision.txt is in both ui/ and dist/.
Created attachment 8788578 [details] [review] [treeherder] mozilla:heroku-revision-txt > mozilla:master
Attachment #8788578 - Flags: review?(wlachance)
Comment on attachment 8788578 [details] [review] [treeherder] mozilla:heroku-revision-txt > mozilla:master lgtm, assuming you've tested it. :)
Attachment #8788578 - Flags: review?(wlachance) → review+
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/0a0a0b78f004e3055ac4b0b3cd0882a5bea1d5e2 Bug 1299443 - Fix revision.txt on Heroku when SERVE_MINIFIED_UI is unset Previously `<site-root>/revision.txt` would 404 if `SERVE_MINIFIED_UI` was unset on Heroku, which would then cause the next deploy to fail. It's now made available in both the `ui/` and `dist/` directories, so it can be found regardless of the value of `SERVE_MINIFIED_UI`.
Yeah tested on heroku-stage earlier - thank you for the review :-)
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.