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-partition

References

How to set up and validate locally

Requires a primary + secondary Geo setup (e.g. two GDKs).

  1. On both sites, run migrations:

    bin/rake db:migrate db:migrate:geo

  2. On the primary, enable replication:

    Feature.enable(:geo_vulnerability_export_part_upload_replication)

  3. Generate an export with parts on the primary (UI: trigger a vulnerability export for a group/project that produces parts, or call Vulnerabilities::Exports::ExportService directly).

  4. On the secondary, confirm the registry row was created and replication + verification succeeded:

    Geo::VulnerabilityExportPartUploadRegistry.last => state: 'synced', verification_state: 'succeeded'

  5. Confirm the file is present at the secondary's upload path and that verification_checksum matches the primary's.

  6. Optionally re-verify:

    Geo::VulnerabilityExportPartUploadRegistry.last.verification_pending!

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Edited by Victor Prêté

Merge request reports

Loading