Geo Primary Verification: Check actual verification state when checksumming
What does this MR do and why?
Fixes #588124 (closed) - Data management: Error message displayed when checksum button is clicked
When clicking the checksum or checksum all button on the Data Management page (Admin > Monitoring > Data Management), an error banner appears even though the operation completes successfully. This occurs on Geo primary sites where secondary nodes haven't been set up yet.
The root cause is that the data management API was using the return value of replicator.verify to assess if replication was successful. When there are no Geo secondary nodes, the publish method returns nil, which the API incorrectly interprets as a failure.
This commit fixes the issue by checking the verification state from the updated record instead of relying on the replicator.verify return value. Now the API only returns a failure when the checksum actually failed, preventing false error messages when Geo secondaries are not yet configured.
References
How to set up and validate locally
- If you GDK does not have GEo, you can configure it by adding a secondary site
- Remove the secondary node by running the command
GeoNode.find_by(primary: false).destroyin the Rails console - Access the Data management area under:
<gdk_url>/admin/monitoring/data_management - Select one object to checksum and click the button in the object's row.
- If the object is verifiable, there should be no error
🎉 - Re-create your secondary GeoNode record or remove the secondary GDK if you don't need it
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.