Add geo/git_repositories/:gl_repository/head REST API resource
What does this MR do and why?
Add geo/git_repositories/:gl_repository/head REST API resource
- Will be used to ensure a Geo secondary repository has the current HEAD commit of the primary repository
Related to #415179 (closed)
How to set up and validate locally
- Install in a Geo instance
- For testing purposes,
require_gitlab_workhorse!
should be commented out fromee/lib/ee/api/geo.rb
on the secondary node - Create a repository with some files, and make sure it is replicated to the secondary
- Query primary API. The response should be HEAD commit sha, and
nil
- Query secondary API. The response should be HEAD commit sha, and
true
- Stop sidekiq on the secondary
- Commit a change to the primary repository
- Query primary API. The response should be new HEAD commit, and
nil
- Query secondary API. The response should be new HEAD commit and
false
- Start sidekiq on the secondary node and wait for the project to replicate
- Query the secondary API. The response should be the new HEAD commit and
true
.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Ian Baum