Skip to content

Add get_storage_pipeline utility function for more readable configurations.

This would allow writing configurations like:

storage:
  cls: pipeline
  steps:
    - cls: filter
    - cls: buffer
    - cls: remote
      url: http://swh-storage:5002/

or

storage:
  cls: filter
  storage:
    cls: buffer
    storage:
      cls: remote
      url: http://swh-storage:5002/

instead of:

storage:
  cls: filter
  args:
    storage:
      cls: buffer
      args:
        storage:
          cls: remote
          args:
            url: http://swh-storage:5002/

(example from swh-docker-dev!115 (closed))

I think I gives more readable configs, but on the other hand it adds more code to maintain. So I'm not sure if this is a good idea.

Comments welcome.


Migrated from D2276 (view on Phabricator)

Merge request reports