Skip to content

Use RemoteMirrors::CreateService in push mirror creation process

What does this MR do and why?

Contributes to #455515

Problem

Currently, push mirror creation logic is duplicated and inconsistent between API and UI. Moreover, we rely on Projects::UpdateService to make changes to push mirrors. It's error-prone and inconvenient to use push mirrors.

Solution

  • Extract common push mirror creation logic into RemoteMirrors::CreateService
  • Replace old code with calls to the new service
  • Use feature flag to ensure that nothing breaks.

Roadmap

  1. Add create service for push mirrors (!149700 - merged) (adds a new service)
  2. Use RemoteMirrors::CreateService in push mirror... (!149263) 👈

How to set up and validate locally

  1. Enable feature flag use_remote_mirror_create_service
  2. Create a new push mirror
  3. Create a new pull mirror
  4. Delete push and pull mirror
  5. Everything should work without any problems

Numbered steps to set up and validate the change are strongly suggested.

Edited by Vasilii Iakliushin

Merge request reports