Skip to content

Geo: Refactor file replication

Gabriel Mazetto requested to merge 10586-geo-replication-refactor into master

What does this MR do?

This is a collection of small refactors to organize the codebase in a way that it makes it easier to understand which parts are interacting with each other to execute file replication (user uploads, lfs objects and ci artifacts).

This changes and simplifications are essential to pave the road for the introduction of Object Storage replication.

Extracted from the effort in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/15606

Highlights:

  • Gitlab::Geo::*Downloader Gitlab::Geo::*Uploader Gitlab::Geo::*Transfer moved to Gitlab::Geo::Replication
  • Extracted Base classes for each one of them
  • Some magic constants were extracted to Gitlab::Geo::Replication module
  • Removed the meta programming that was used to instantiate the classes above to make it easier to follow the code and do the refactors from an IDE
  • Gitlab::Geo::*Uploader renamed to Gitlab::Geo::*Retriever to remove the confusion with CarrierWave own uploader.

Does this MR meet the acceptance criteria?

Conformity

Related to #10586 (closed)

Edited by Gabriel Mazetto

Merge request reports

Loading