Geo Replication Details: Replication info
What does this MR do and why?
Broken off from !182620 (closed)
Part of #509363 (closed)
Uses feature flag geo_replicables_show_view
This change is part of a larger effort to add a Details view for Replication Registry Items for Geo. This change is focused on adding the second section to the page Replication information
Screenshots or screen recordings
| Replication Status | Screenshot |
|---|---|
| Pending | ![]() |
| Started | ![]() |
| Synced | ![]() |
| Failed | ![]() |
| Unknown | ![]() |
| Missing on Primary (non-error) | ![]() |
How to set up and validate locally
Setup Geo (optional)
Important: To properly test Geo you will need a separate GDK setup. Setup is straightforward but takes some time. Another option is to validate the code functionally and if needed schedule a call to sync and I can screen share my instance.
- Ensure no other GDKs are running.
gdk stop/gdk kill - Open an empty directory and install and run Geo with the one-line command found on the Easy installation instructions
- Access your primary and secondary Geo instances via
127.0.0.1:3000and127.0.0.1:3001.
Testing
- Enable the feature flag
Feature.enable(:geo_replicables_show_view) - Access your primary GDK Geo Page (
127.0.0.1:3000/admin/geo) - Scroll down to the very bottom
Replication detailssection - Click one of the blue links (ex:
Project Repositories) - Click one of the records in the list
- Ensure the Replication information is visible and shows the correct state (see below on how to mock states)
How to mock states
note: The rails-background-jobs will come behind and rescue any changes you make after a few minutes
- On secondary-gdk/gitlab
rails c
Trigger replication failure
registry = Geo::ProjectRepositoryRegistry.first
registry.failed!(message: "The sync has failed", error: ArgumentError.new("arg error"))
Explicitly set replication status
# Available states PENDING, STARTED, SYNCED, FAILED
registry = Geo::ProjectRepositoryRegistry.first
registry.update(state: 'FAILED')
Mark missing on primary
registry = Geo::ProjectRepositoryRegistry.first
registry.update(missing_on_primary: true)
Edited by Zack Cuddy





