Post-install scan of duplicate Sprocket manifest files
On GitLab.com (https://gitlab.com/gitlab-org/gitlab-ce/issues/41371#note_53211658) and in a customer ticket (https://gitlab.zendesk.com/agent/tickets/89607), we've seen cases where a bad install may leave a stale Sprockets manifest file around. This can wreak havoc, causing clients to load stale CSS and JavaScript files and make GitLab unusable.
I suggest we add a post-install step that checks the number of files that match this pattern:
ls -al /opt/gitlab/embedded/service/gitlab-rails/public/assets/.sprockets*
If there is more than one file, we should flag a loud warning and advise admins to remove the stale file:
stanhu@web-04.sv.prd.gitlab.com:/opt/gitlab/embedded/service/gitlab-rails/public/assets$ ls -al | grep sprockets
-rw-r--r-- 1 root root 1733955 Nov 30 19:38 .sprockets-manifest-b302a344a22cd2f00aecb55c5e3504a7.json
-rw-r--r-- 1 root root 1747570 Dec 28 12:37 .sprockets-manifest-fd4aecbed690865a5d1962c56088dfde.json
/cc: @collen