Skip to content
Snippets Groups Projects
  1. Mar 28, 2025
  2. Mar 26, 2025
  3. Mar 13, 2025
  4. Feb 17, 2025
  5. Dec 16, 2024
  6. Dec 13, 2024
  7. Nov 22, 2024
  8. Nov 21, 2024
    • Jérémy Bobbio (Lunar)'s avatar
      Add a notification watcher for mirrors · c564b0a8
      Jérémy Bobbio (Lunar) authored and David Douard's avatar David Douard committed
      On removals, we will publish notification on a dedicated Kafka topic.
      This new notification watcher that should be run on mirrors will listen
      to the topic and in order:
      
      1. Create a new masking request in the masking proxy database and add
         a “decision pending” entry for every SWHID listed in the
         notification.
      2. Send an email to the mirror operator with commands to either
         propagate the removal, mask permanently, or unmask all objects.
      
      See the newly added section in `usage.rst` for a description of the new
      commands.
      
      Implementation-wise, the passing of information between the mirror
      notification watcher and the `handle-removal-notification` command
      group is done via the masking database. Useful information that
      were in the removal notification are serialized in YAML to the masking
      request “reason” field. This will then be retrieved when handling
      the removal notification, as well as the list of objects that have been
      masked. While this is a bit of abuse, it feels way simpler that
      creating a whole new database just for this purpose.
      
      We surely will want to revisit this design once the [takedown request
      processing workflow] has been implemented.
      
      [takedown request processing workflow]: https://gitlab.softwareheritage.org/product-management/swh-archive-website/-/issues/1
      
      Address #20
      c564b0a8
  9. Jul 18, 2024
  10. Jul 11, 2024
  11. Jul 10, 2024
    • Jérémy Bobbio (Lunar)'s avatar
      Retry deleting an object from objstorage multiple times · ada70e0b
      Jérémy Bobbio (Lunar) authored
      Some objstorages perform network accesses which sometimes result in
      transient errors. Instead of giving up the whole removal for a single
      timeout, we now retry 3 times to delete an object from an objstorage
      before raising the most recent exception.
    • Jérémy Bobbio (Lunar)'s avatar
      Handle missing data in objstorage · 11140642
      Jérémy Bobbio (Lunar) authored
      When a Content was missing from the objstorage – because it had been
      manually erased before or in a case of corruption – we used to crash
      with a ValueError. Instead, we now display a proper error message.
      The message suggests using the `--allow-empty-content-objects` flag.
      When specified, getting no data will display a warning and a Content
      object with no data will be recorded in the recovery bundle.
      
      Closes #22
      11140642
    • Jérémy Bobbio (Lunar)'s avatar
      Display a progressbar per object type during backup · 20a96c40
      Jérémy Bobbio (Lunar) authored
      The time it takes to backup objects vary widely between an object type
      from the next. Lumping all of them all in a single progressbar
      results in very inaccurate ETA. Instead, we display a progress bar
      for each object we backup.
      
      This required moving progress bar management to
      `RecoveryBundleCreator.backup_swhids()`, leading to
      a refactor of `Remover.create_recovery_bundle()`,
      `iter_swhids_grouped_by_type()` and its other users.
      The result feels more symmetric with `RecoveryBundle.restore()` which
      was already managing its progress bar.
      
      We take the opportunity to use different chunk sizes depending on the
      type of objects we are backing up. As Content objects have to retrieve
      data from objstorage, they tend to be longer to backup. We use smaller
      chunks there so we can update the progress more often.
      
      We also handle a hidden issue were RawExtrinsingMetadata would be
      wrongly numbered in a RecoveryBundle if they were added in multiple
      calls to `RecoveryBundleCreator.backup_swhids()`. Trying to do so will
      now raise an exception.
      
      Finally, objects being backed up are now storted by SWHID to ease
      reproducibility.
      
      Closes #23
      20a96c40
    • Jérémy Bobbio (Lunar)'s avatar
    • Jérémy Bobbio (Lunar)'s avatar
  12. Jul 08, 2024
    • Jérémy Bobbio (Lunar)'s avatar
      Break down the displayed number of objects to remove by type · 35cb8d1f
      Jérémy Bobbio (Lunar) authored
      Instead of asking “Proceed with removing 98 SWHIDs?” which turns out to
      be hard to interpret, we now display the number of objects to remove for
      each type having a SWHID. We also mention that some objects do not have
      a SWHID (as they will add to the counts shown later).
      
      We also now prefer to display these numbers rather than a list of SWHID
      when `--dry-run=stop-before-recovery-bundle` is specified. Getting the
      list of SWHIDs can be done using `swh alter list-candidates`.
    • Jérémy Bobbio (Lunar)'s avatar
      Add a progress bar when enumerating RawExtrinsicMetadata · 26bc40b1
      Jérémy Bobbio (Lunar) authored
      Enumerating the RawExtrinsicMetadata objects that need to be
      removed can be quite a lengthly operation. We now display a progress bar
      (or several if some RawExtrinsicMetadata objects reference other
      RawExtrinsicMetadata objects).
      26bc40b1
    • Jérémy Bobbio (Lunar)'s avatar
      Ensure we end the inventory progressbar on 0 left · 307abc9b
      Jérémy Bobbio (Lunar) authored
      We forgot that `Lister._iter_inventory_candidates()` would end the
      iteration when 0 objects remain to be looked up. This would result in
      moving to the removable step while still showing a progressbar
      displaying “4 left to look up”.
      
      We now always update the progress bar saying that we are done after
      leaving the loop in `Lister.inventory_candidates()`.
      307abc9b
  13. Jul 03, 2024
  14. Jun 27, 2024
Loading