Clean up projects in `pending_delete` state
We have many projects on GitLab.com that are stuck in pending_delete
. Users can neither see them or delete them. Many have nil
namespaces (see gitlab-org/gitlab-ce!4341), so we may not be able to find their repository paths directly since Project#path_with_namespace
would point to an incomplete path. gitlab-org/gitlab-ce!4341 and gitlab-org/gitlab-ce!5695 should fix this problem. For the projects that DO have a valid namespace, we need to consider either:
- Running the
Projects::DestroyService
on each of the project to destroy them - Setting
pending_delete
back tofalse
For the projects that do not have a namespace, we may need to consider ways of restoring the namespace (e.g. from logs?) or some other approach.
Relates to gitlab-org/gitlab-ce#20365.