Add REST API endpoint to sync push mirrors
What does this MR do and why?
Contributes to #388907 (closed)
Problem
It's not possible to trigger a push mirror sync via API. However, this functionality is available on UI.
Solution
- Add a new SyncService to handle push mirror sync logic
- Add a new endpoint to handle API requests
- Update API documentation
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Setup a push mirror (see docs)
- Make a request like
curl -I --request POST --header "PRIVATE-TOKEN: <token>" --header "Content-Type: application/json" "http://127.0.0.1:3000/api/v4/projects/<project_id>/remote_mirrors/<remote_mirror_id>/sync"
- You should see 204 No Content response (if there are no errors)
Edited by Vasilii Iakliushin