Remove faulty deploy refs for gitlab.com projects
In the last release cycle we've deployed code that saves refs for each Deployment object. So users can pull these refs locally and checkout more easily what was deployed.
Before the release however, GitLab saved deployments with their ID instead of their IID. We never reference the ID in the UI anywhere, so this made perfect sense. The impact of this 'bug' is that there are refs saved (by ID) which don't seem to exist on GitLab.com because we find them by IID.
Example: pulling all the refs will give you a number of refs, either in the range of 1300-1500 or 63000-69000. The latter should all be removed.
Now a couple of steps could be taken to fix this, and I'm unsure which is the best one:
- For projects we maintain, we remove the refs from the filesystem and be done with this.
- For all projects using deployments, find out which refs are wrong and remove those (rm path/to/ref/)
- Nothing -- this might create weird unreproducible bugs later.
About the second option, I'm not sure we can do this? The first option we should perform in any case, and is really simple:
cd path/to/www-gitlab-com/refs/environments/production
rm 6*
exit