Page MenuHomeSoftware Heritage

Add a seaweedfs backend
ClosedPublic

Authored by douardda on Mar 27 2019, 11:25 AM.

Details

Summary

an add support for the seaweedfs backend in get_objstorage().
Note that streaming methods have not been implemented yet.

Depends on D1275

Diff Detail

Repository
rDOBJS Object storage
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd requested changes to this revision.Mar 27 2019, 11:43 AM
olasd added a subscriber: olasd.

The top level documentation for both classes needs some love (or at least it'd be nicer if it wasn't empty :D)

The WeedFiler class does no real error checking at all which doesn't leave a great feeling.

No tests? :(

swh/objstorage/objstorage_weed.py
80–81

Looks like this shouldn't be hardcoded?

This revision now requires changes to proceed.Mar 27 2019, 11:43 AM

Add tests and (consequently) few fixes

olasd requested changes to this revision.Mar 27 2019, 4:23 PM

Sorry for going for another loop, but that's still missing error checking on get/put/delete methods of the WeedFiler: these methods will return truthy values even when the server responds (properly) with an error condition and has failed to comply.

This revision now requires changes to proceed.Mar 27 2019, 4:23 PM
In D1298#27999, @olasd wrote:

Sorry for going for another loop

don't apologize. I'm the one that have been lazy!

In D1298#27999, @olasd wrote:

Sorry for going for another loop, but that's still missing error checking on get/put/delete methods of the WeedFiler: these methods will return truthy values even when the server responds (properly) with an error condition and has failed to comply.

On the other side, the ObjStorage 'API' (as defined in swh/objstorage/objstorage.py) does not describe how errors should be handled. So I can add some error checking code in the WeedFiler class, but I'm not quite clear what to do with these errors on the ObjStorage class part...

So I am tempted to add XXX in this code for now.

This revision is now accepted and ready to land.Mar 28 2019, 10:42 AM
This revision was landed with ongoing or failed builds.Mar 28 2019, 10:57 AM
This revision was automatically updated to reflect the committed changes.