Skip to content

Geo: Get replicator classes reliably

Michael Kozono requested to merge mk/get-replicators-reliably into master

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

Availability and Testing

Edited by Michael Kozono

Merge request reports