When a fork is stuck, deleting the project may orphan the route
Real-life consequences: After having an orphaned route, you cannot rename your user: https://gitlab.com/gitlab-org/gitlab-ce/issues/47180
I found 71 orphaned routes, out of 4169 gitlab-ce forks due to users deleting the fork after getting fed up waiting: https://gitlab.com/gitlab-org/gitlab-ce/issues/47180#note_77016362
*** PRODUCTION *** production> Route.where("path like '%/gitlab-ce'").count
=> 4169
*** PRODUCTION *** production> bad_routes = Route.where("path like '%/gitlab-ce'").select { |r| r.source_type == 'Project' && !Project.where(id: r.source_id).exists? };bad_routes.size
=> 71
*** PRODUCTION *** production> bad_routes.map(&:created_at).sort.last
=> Mon, 04 Jun 2018 14:33:06 UTC +00:00
Some of these users likely waited a reasonable amount of time, but many likely didn't wait long enough.
Edited by Michael Kozono