Geo primary verification API: Add support for composite primary keys
What does this MR do and why?
Add support for composite primary keys
This MR changes the id field to support strings and calculate a B64 URL safe ID for models with a composite primary key.
References
Geo Primary Verification API: Add support for c... (#559272 - closed)
How to set up and validate locally
- Enable the feature flag in Rails console
Feature.enable(:geo_primary_verification_view); - Test the new API endpoint as an admin user:
# Replace YOUR_ADMIN_TOKEN with an actual admin personal access token
curl -H "Authorization: Bearer YOUR_ADMIN_TOKEN" \
"http://localhost:3000/api/v4/admin/data_management/lfs_object/1"
- Verify the response contains the expected fields:
-
primary_identifier,model_class,created_at - Geo verification fields:
checksum,checksum_state,checksum_retry_count, etc.
There is no models with composite primary keys in the set of allowed models yet for this API, so it's not possible to manually check composite keys' behaviour.
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.
Related to #559272 (closed)