Staging instance, all changes can be removed at any time

Skip to content

Add `requested` and `referencing` fields to recovery bundle

Jérémy Bobbio (Lunar) requested to merge lunar/swh-alter:manifest-v3 into main

This should be reviewed commit by commit.

Experiments have shown that it would be beneficial to add two fields to the recovery bundle manifests:

  • requested: list the origin URLs or SWHIDs which are at the root of the removal. Basically what is given to swh alter remove.
  • referencing: list of SWHIDs referenced by objects in the bundle that have not been removed from the archive.

The latter helps us figure out the order in which recovery bundles should be recovered or deleted (e.g. after expiration). For example, picture the following scenario with repositories A and B which is a fork of A:

  1. Remove project A. Common objects with B will not be removed.
  2. Remove project B. All objects have been removed.
  3. Restore bundle of project A. Oops, we now have objects referencing objects not in the archive, as they are only in the recovery bundle for B.

We now display warning and require confirmation before the bundle for A is restored.

After these changes, the manifest is at version 3.

Edited by Jérémy Bobbio (Lunar)

Merge request reports

Loading