Closed Bug 1198452 Opened 9 years ago Closed 9 years ago

Save the deployed revision SHA to somewhere outside of the media directory

Categories

(Tree Management :: Treeherder: Infrastructure, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

We currently store the deployed revision in: <repo-root>/treeherder/webapp/media Which gets served as: treeherder.{mozilla,allizom}.org/media/revision However in bug 1197799 we're switching from serving assets with Apache, to using gunicorn/Whitenoise, and Whitenoise does not support serving files from /media/. Given `revision` isn't anything to do with Django, I'd say let's move it out of /media/ and into the site root, by placing it in the dist/ directory. We'll need to update the What's Deployed link, and the IRC pushbots config in puppet, but I think the new URL of treeherder.{mozilla,allizom}.org/revision makes more sense anyway.
Status: NEW → ASSIGNED
Comment on attachment 8652541 [details] [review] Save the deployed revision to <site-root>/revision.txt Now that's a low-risk fix. :)
Attachment #8652541 - Flags: review?(cdawson) → review+
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/90576b9fd9a0b7727072151c00042ea47c719161 Bug 1198452 - Save the deployed revision to <site-root>/revision.txt Since WhiteNoise won't serve files from /media/, so the existing file in `treeherder/webapp/media/` 404s when accessed via: https://treeherder.{mozilla,allizom}.org/media/revision IMO the site root makes more sense for this file anyway, so let's just save it under `dist/`. Also adds a .txt extension for clarity. The old file has been left for now to ease the transition, and will be deleted once the IRC pushbots config and What's Deployed URLs have been updated.
Depends on: 1198535
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/abbaa1918d99eb092b0de25cda49a1d447f3eb1e Bug 1198452 - Stop creating treeherder.*.org/media/revision Now that the IRC pushbot configs/What's Deployed links have been updated to use the new revision.txt file location, we can stop creating the file in the old location.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
I've also removed the old `treeherder/webapp/media/revision` file on the admin node's stage/prod directories (since post bug 1124382 they won't be covered by the .gitignore, and so will show as untracked changes).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: