Geo: Generate checksum for the snippet on the secondary
Problem to solve
When snippets are synced, we should generate a checksum based on the repository content and store it on the Geo Tracking Database.
Proposal
- Build required set of fields based on
project_registry
, insnippets_registry
- Extract functionality from
ee/app/workers/geo/repository_verification/secondary
and build a generic version that can be used for the Geo framework (it should do what's necessary by receiving the replicator as param)
Additional Information
Checksum is performed by gitaly, and can be triggered by calling repository.checksum
. Geo current implementation triggers that either when an event is processed (repository sync), and/or periodically by a backfilling job controlled by ee/app/workers/geo/repository_verification/secondary/*
, or when manually triggered by the UI.
Most of the code for the verification on the primary can be found here: /ee/app/services/geo/repository_verification_secondary_service.rb
Documentation
Add to the existing Geo framework documentation, what are the changes required for storing the verification metadata and how to wire that up with the framework
What does success look like, and how can we measure that?
When a snippet is synced, a checksum should be stored/updated on the snippets_registry
table.