Geo: Replicate Vulnerabilities::Export::Part uploads
What does this MR do and why?
Adds Geo SSF (self-service framework) replication and verification for the vulnerability_export_part_uploads partition table so Vulnerabilities::Export::Part attachments are mirrored from the primary to secondary Geo sites alongside the other upload partitions.
Generated with scripts/geo/generate-blob-replicator:
scripts/geo/generate-blob-replicator \
--replicable-name=vulnerability_export_part_upload \
--model-class=Vulnerabilities::Export::Part \
--table-name=vulnerability_export_part_uploads \
--sharding-key=organization_id \
--milestone=19.1 \
--upload-partitionReferences
- Closes #589922 (closed).
- Parent epic: &20933
How to set up and validate locally
Requires a primary + secondary Geo setup (e.g. two GDKs).
-
On both sites, run migrations:
bin/rake db:migrate db:migrate:geo -
On the primary, enable replication:
Feature.enable(:geo_vulnerability_export_part_upload_replication) -
Generate an export with parts on the primary (UI: trigger a vulnerability export for a group/project that produces parts, or call
Vulnerabilities::Exports::ExportServicedirectly). -
On the secondary, confirm the registry row was created and replication + verification succeeded:
Geo::VulnerabilityExportPartUploadRegistry.last=> state:'synced', verification_state:'succeeded' -
Confirm the file is present at the secondary's upload path and that
verification_checksummatches the primary's. -
Optionally re-verify:
Geo::VulnerabilityExportPartUploadRegistry.last.verification_pending!
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.