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 All_Green
Sync Failed Sync_Failed
Verification Failed Verification_Failed
Verification Checksum Mismatch Verificattion_Checksum_MIsmatch
Verification Pending 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.

  1. Ensure no other GDKs are running. gdk stop/gdk kill
  2. Open an empty directory and install and run Geo with the one-line command found on the Easy installation instructions
  3. Access your primary and secondary Geo instances via 127.0.0.1:3000 and 127.0.0.1:3001.

Testing

  1. Enable the feature flag Feature.enable(:geo_replicables_show_view)
  2. Access your primary GDK Geo Page (127.0.0.1:3000/admin/geo)
  3. Scroll down to the very bottom Replication details section
  4. Click one of the blue links (ex: Project Repositories)
  5. Click one of the records in the list
  6. 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

  1. 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

Merge request reports

Loading