Geo: Insert a record in project_repositories only when a Git repo is inserted
This is part of a multi-step implementation plan to handle Geo verification/replication of projects without Git repositories to reduce errors caused when Gitaly tries to fetch non-existent repos.
Steps | ||
---|---|---|
1 | Add has_repo column in <repo type>_repositories table |
|
2 | Backfill has_repo column |
|
3 | Introduce a feature flag to be used in the next two steps | |
4 | Insert record in <repo type>_repositories only when a Git repo is created; at the same time update has_repo
|
|
5 | Do not attempt to verify/replicate Git repo when <repo type>__repositories (and Git repo) doesn't exist |
|
6 | Enumerate <repo_type>_repositories instead of repo types table for verification/replication of Git repos, if not already done |
|
7 | Delete project_repositories rows where Git repos don't exist |
We want to make sure a project_repositories record exists only if a Git repo exists, since it represents a Git repo in the rails code.
Insert a record in this table, every time a Git repo is inserted for a gitlab project and update has_repo
in projects
.
Edited by 🤖 GitLab Bot 🤖