Geo Replication Details: Verification 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 third section to the page Verification information
Screenshots or screen recordings
| Status | Screenshot |
|---|---|
| All Green | ![]() |
| Sync Failed | ![]() |
| Verification Failed | ![]() |
| Verification Checksum Mismatch | ![]() |
| Verification Pending | ![]() |
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 Verification 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"))
Trigger a verification failure
# Available states PENDING, STARTED, SYNCED, FAILED
registry = Geo::ProjectRepositoryRegistry.first
registry.verification_pending!
registry.verification_failed_with_message!('Error during verification', ArgumentError.new("Error with the verification"))
Trigger a verification checksum mismatch
registry = Geo::ProjectRepositoryRegistry.first
registry.verification_pending!
registry.verification_failed_due_to_mismatch!("1395a9bd59ff0e7d2207bd9cde6b67ee4a2f56fd", "df65f2a4ee76b6edc9db7022d7e0ff95db9a5931")
Edited by Zack Cuddy




