Use state machine for all the registries
Problem
This is needed to make states obvious and the code easier to understand.
See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3809#note_192774960
Proposal
-
Refactor each Registry class to use a state machine. This is already done for DesignRegistry and ContainerRepositoryRegistry. -
ProjectRegistry < BaseRegistry<= Maybe leave this alone - JobArtifactRegistry < BaseRegistry
- FileRegistry < BaseRegistry (inherited by LFS and Upload, but they will split in #10067 (closed))
- LfsObjectRegistry < FileRegistry
- UploadRegistry < FileRegistry
-
-
Consider Syncable, which has some scopes related to sync state. -
Consider code reuse between Registry classes (this has implications for ease of replicating and verifying new data types)
Edited by 🤖 GitLab Bot 🤖