Handle orphaned zoekt repos
What does this MR do and why?
This relates to this epic: &14886 (closed)
This is based on the MR to handle orphaned indices !164222 (merged)
Closes #485806 (closed)
Search::Zoekt::Repository.should_be_marked_as_orphaned
https://postgres.ai/console/gitlab/gitlab-production-main/sessions/31375/commands/97410
SELECT "zoekt_repositories".* FROM "zoekt_repositories" WHERE "zoekt_repositories"."project_id" IS NULL
Search::Zoekt::Repository.should_be_deleted
https://postgres.ai/console/gitlab/gitlab-production-main/sessions/31375/commands/97411
SELECT "zoekt_repositories".* FROM "zoekt_repositories" WHERE "zoekt_repositories"."state" IN (230, 240)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
| Before | After |
|---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Edited by John Mason