Cleanup stale +deleted repo paths on project removal (adjusts project removal bug)
What does this MR do?
https://gitlab.com/gitlab-org/gitlab-ce/issues/46146#note_84727526 discussions show that:
- When removing projects, we can end-up leaving the
+deleted
repo path dirty and not successfully removing the non-deleted namespace (mv
process is not atomic and can be killed without fully moving the path). - In order to solve that, we're adding a clean-up phase on
ensure
which will schedule possible staled+deleted
path deletion. Note that we don't check the current state (if there is or not a repo) in order to schedule the deletion. That's intentional in order to leverageGitlab::GitalyClient::NamespaceService#remove
idempotency and ensure consistency.
What are the relevant issue numbers?
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/46146
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Oswaldo Ferreira