Geo: Get replicator classes reliably
Problem
Gitlab::Geo::ReplicableModel.replicators
requires all Models which include ReplicableModel to be loaded before being called !35443 (comment 376048633)
What does this MR do?
Look up replicator classes by their files in ee/app/replicators/geo
.
The new Geo framework already relies heavily on convention over configuration, and we get to decide what is required, so I don't expect people will create Replicator classes outside of this directory. We also don't expect nested Replicator classes at this time, but that would be easy to add support for later if needed. I think we don't need extensive checks on these methods, since if they miss a replicator, many things will be broken. Also we don't want the tests to include lists of replicators since that would defeat the purpose of these methods (to make it easy to add new replicators).
Closes #227693
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry => no behavior change
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.