[go: up one dir, main page]

Skip to content

Geo: Add checksumming endpoint to data_management API

What does this MR do and why?

Add full table checksumming endpoint to the data_management API.

References

Related to #537709 (closed)

How to set up and validate locally

  1. Enable the feature flag in Rails console Feature.enable(:geo_primary_verification_view);
  2. Re-checksum all records for a given model, for example SnippetRepository:
# Replace YOUR_ADMIN_TOKEN with an actual admin personal access token
curl -H "Authorization: Bearer YOUR_ADMIN_TOKEN" -X PUT \
     "http://localhost:3000/api/v4/admin/data_management/snippet_repository/checksum"
  1. In the rails console, check that all records verification_state where updated to 0 (i.e "pending"):
SnippetRepository.all.map(&:verification_state).uniq => [0]

You can do this for any available model, which you can find running Gitlab::Geo::ModelMapper.available_model_names in the Rails console.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chloe Fons

Merge request reports

Loading