Get rid of rename repository in delete calls

At the moment, when a project is deleted it uses the Repositories::DestroyService to delete the repos for that project. This is what it roughly does:

  1. Checks the existence of the repo and bails out if it doesn't
  2. Moves the repo from path.git to path+deleted.git
  3. Schedules a Repositories::ShellDestroyService to delete path+delete.git after 5min

For Gitaly the move/rename is troublesome to do in an atomic way. But OTOH, Gitaly supports removing repos in an atomic way (since gitaly!4145 (merged)). It basically does what gitlab-rails is doing. So with that we can remove the rename from the Repositories::DestroyService, and let Gitaly itself do the rename/delete dance for us.

Edited May 06, 2022 by Toon Claes
Assignee Loading
Time tracking Loading