Skip to content

Resolve "Geo: Replicate deletion of remote stored files"

What does this MR do and why?

Updates Geo::FileRegistryRemovalService to try removing a file from object storage if it cannot be found in local storage.

How to set up and validate locally

  1. Setup a Geo instances using object storage replication
  2. Currently, removing a file backed by object storage should result in the file remaining on the secondary object storage bucket, and the secondary sidekiq instance logging an error:

    Unable to unlink file because file path is unknown. A file may be orphaned

  3. Upgrade to package from this MR
  4. Removing a file backed by object storage should now remove the file from the secondary object storage bucket
  5. Manually destroy file (for a package file for instance):
    1. Create a project with a package file in the package registry
    2. Find the model id by checking in the Geo event log for the created event
    3. In a rails console on the primary instance run:
      Packages::PackageFile.find(ID).destroy!
    4. Verify that object is removed from primary and secondary object storage

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #247438 (closed)

Edited by Ian Baum

Merge request reports