Skip to content
Snippets Groups Projects
  1. Jul 02, 2024
  2. Jun 04, 2024
  3. May 31, 2024
  4. May 29, 2024
    • Nicolas Dandrimont's avatar
      multiplexer: handle PermissionErrors in `check_config` · cd672034
      Nicolas Dandrimont authored
      Some objstorages are configured read-only implicitly by way of
      permissions, so `check_config` raises a PermissionError instead of
      returning False. Handle that situation explicitly.
      
      Also handle RemoteExceptions with a warning, to support the old
      situation where PermissionError was not properly wrapped by the RPC
      layer.
      cd672034
    • Nicolas Dandrimont's avatar
      api: support PermissionErrors · b2f39088
      Nicolas Dandrimont authored
      `check_config` raises a PermissionError under some circumstances, and
      it's nicer to be able to handle that directly than to have to unwrap a
      RemoteException.
      b2f39088
  5. May 23, 2024
  6. May 22, 2024
    • David Douard's avatar
      Make the ReadOnlyObjStorageProxy raise ReadOnlyObjStorageError when needed · daee75c0
      David Douard authored
      It used to do nothing, which is inconsistent with the behavior of the
      HTTPReadOnlyObjStorage.
      
      Adapt a bit the multiplexer to handle this properly:
      
      - keep a list of RW storage threads separated from the full list of
        backend storage threads
      - the decision is made using a call to check_config(check_write=True)
        for each of the backend storages
      - adapt a bit the API/behavior of the check_config() method to make it
        return False when called with 'check_write=True' for a RO obj storage,
      - for the multiplexer, check_config(check_write=True) returns True if at
        least one backend objstorage is green,
      - remove reference to deleted filters in the multiplexer doc string.
      daee75c0
    • David Douard's avatar
      Rename ReadOnlyObjStorage and NonIterableObjStorage exceptions · 315e84d0
      David Douard authored
      Add an 'Error' suffix so there is no confusion, especially with regard
      to the new ReadOnlyProxyObjStorage proxy objstorage class (even if it's
      not the same name, it can be very confusing).
      315e84d0
    • David Douard's avatar
      Simplify a bit the MultiplexerObjStorage · 59f19176
      David Douard authored
      Move the implementation in swh/objstorage/multiplexer.py since there is
      nothing left in the swh/objstorage/multiplexer/ but this class.
      
      Make the constructor able to instantiate the encapsulated objstorages so
      we can get rid of the factory _construct_multiplexer_objstorage
      function.
      59f19176
    • David Douard's avatar
      Convert the ObjStorageFilter as a simple proxy ObjStorage · d32b610c
      David Douard authored
      Get rid of the generic ObjStorageFilter complexity, since we only have a
      single filter. This allows also to get rid of the
      _construct_filtered_objstorage() factory function in factory.py; this later
      is only deprecated for now for bw compat, but uses the new
      ReadOnlyObjstorageProxy class instead.
      d32b610c
    • David Douard's avatar
      Add support for naming objstorage instances from configuration · 807be812
      David Douard authored
      this will allow using this name to add statsd probes ie.g. counting which
      backend has been successful in a multiplexed backend.
      807be812
  7. May 05, 2024
  8. May 04, 2024
  9. Apr 25, 2024
  10. Apr 24, 2024
  11. Apr 23, 2024
  12. Apr 19, 2024
    • Nicolas Dandrimont's avatar
      pathslicing: skip over bogus files when iterating · a6fc3e5a
      Nicolas Dandrimont authored
      When an addition has been interrupted, a tmpfile can be lying around. A
      lot of pathslicing objstorages are legacy, read-only partitions, so
      removing these bogus files is not an option. Instead of breaking
      iteration, just print a warning and keep on going.
      a6fc3e5a
  13. Apr 18, 2024
  14. Apr 02, 2024
Loading