Page MenuHomeSoftware Heritage

Reorganise the seaweedfs backend in a subpackage
ClosedPublic

Authored by douardda on Oct 21 2021, 1:07 PM.

Details

Summary

and rename classes for better consistency:

  • move WeedFiler in b/seaweedfs/http.py and rename as HttpFiler
  • move WeedObjStorage in b/seaweedfs/objstorage.py and rename as SeaweedFilerObjStorage.

Depends on D6525

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

Build is green

Patch application report for D6526 (id=23722)

Could not rebase; Attempt merge onto 6269067ca7...

Updating 6269067..9c57a61
Fast-forward
 swh/objstorage/backends/seaweedfs/__init__.py      |   1 +
 swh/objstorage/backends/seaweedfs/http.py          | 102 ++++++++++++++++++++
 .../{seaweed.py => seaweedfs/objstorage.py}        | 104 ++-------------------
 swh/objstorage/factory.py                          |  13 ++-
 swh/objstorage/tests/test_objstorage_seaweedfs.py  |   6 +-
 5 files changed, 123 insertions(+), 103 deletions(-)
 create mode 100644 swh/objstorage/backends/seaweedfs/__init__.py
 create mode 100644 swh/objstorage/backends/seaweedfs/http.py
 rename swh/objstorage/backends/{seaweed.py => seaweedfs/objstorage.py} (59%)
Changes applied before test
commit 9c57a61d016e865a1ea8a83908626c9a22fb2f53
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Oct 21 09:49:54 2021 +0200

    Reorganise the seaweedfs backend in a subpackage
    
    and rename classes for better consistency:
    
    - move WeedFiler in b/seaweedfs/http.py and rename as HttpFiler
    - move WeedObjStorage in b/seaweedfs/objstorage.py and rename as
      SeaweedFilerObjStorage.

commit 82d9714b0ae5a3687da331c2198010b8d62c8c0b
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Oct 21 09:58:06 2021 +0200

    Use get_objstorage in seaweedfs tests instead of direct class
    instanciation

commit 38c02dcfae2baa141c7149d5556123fe7341b54b
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Oct 21 09:55:50 2021 +0200

    Add support for deprecation of objstorage cls in factory
    
    and deprecate "weed" in favor of "seaweedfs".

See https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/60/ for more details.

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/objstorage/backends/seaweedfs/http.py
15

wouldn't this override any configured level if it's imported after the CLI sets it?

99–101
This revision is now accepted and ready to land.Oct 21 2021, 1:18 PM
swh/objstorage/backends/seaweedfs/http.py
15

yes sure, ardumont mentioned this yesterday, I need to fix it, thx

99–101

indeed, thx

remove hardcoded log levels

Build has FAILED

Patch application report for D6526 (id=23728)

Could not rebase; Attempt merge onto 6269067ca7...

Updating 6269067..0f51945
Fast-forward
 swh/objstorage/backends/seaweedfs/__init__.py      |   1 +
 swh/objstorage/backends/seaweedfs/http.py          | 101 ++++++++++++++++++++
 .../{seaweed.py => seaweedfs/objstorage.py}        | 105 ++-------------------
 swh/objstorage/factory.py                          |  13 ++-
 swh/objstorage/tests/test_objstorage_seaweedfs.py  |   6 +-
 5 files changed, 122 insertions(+), 104 deletions(-)
 create mode 100644 swh/objstorage/backends/seaweedfs/__init__.py
 create mode 100644 swh/objstorage/backends/seaweedfs/http.py
 rename swh/objstorage/backends/{seaweed.py => seaweedfs/objstorage.py} (59%)
Changes applied before test
commit 0f51945d14c70d82b169f79efb8796c8a74489b5
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Oct 21 09:49:54 2021 +0200

    Reorganise the seaweedfs backend in a subpackage
    
    and rename classes for better consistency:
    
    - move WeedFiler in b/seaweedfs/http.py and rename as HttpFiler
    - move WeedObjStorage in b/seaweedfs/objstorage.py and rename as
      SeaweedFilerObjStorage.

commit 82d9714b0ae5a3687da331c2198010b8d62c8c0b
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Oct 21 09:58:06 2021 +0200

    Use get_objstorage in seaweedfs tests instead of direct class
    instanciation

commit 38c02dcfae2baa141c7149d5556123fe7341b54b
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Oct 21 09:55:50 2021 +0200

    Add support for deprecation of objstorage cls in factory
    
    and deprecate "weed" in favor of "seaweedfs".

Link to build: https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/61/
See console output for more information: https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/61/console

and fix the LOGGER.error usage

Build is green

Patch application report for D6526 (id=23729)

Could not rebase; Attempt merge onto 6269067ca7...

Updating 6269067..bcbbfd4
Fast-forward
 swh/objstorage/backends/seaweedfs/__init__.py      |   1 +
 swh/objstorage/backends/seaweedfs/http.py          | 101 ++++++++++++++++++++
 .../{seaweed.py => seaweedfs/objstorage.py}        | 105 ++-------------------
 swh/objstorage/factory.py                          |  13 ++-
 swh/objstorage/tests/test_objstorage_seaweedfs.py  |   6 +-
 5 files changed, 122 insertions(+), 104 deletions(-)
 create mode 100644 swh/objstorage/backends/seaweedfs/__init__.py
 create mode 100644 swh/objstorage/backends/seaweedfs/http.py
 rename swh/objstorage/backends/{seaweed.py => seaweedfs/objstorage.py} (59%)
Changes applied before test
commit bcbbfd466987179d2f130d7da637e5de11b0dfd2
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Oct 21 09:49:54 2021 +0200

    Reorganise the seaweedfs backend in a subpackage
    
    and rename classes for better consistency:
    
    - move WeedFiler in b/seaweedfs/http.py and rename as HttpFiler
    - move WeedObjStorage in b/seaweedfs/objstorage.py and rename as
      SeaweedFilerObjStorage.

commit 82d9714b0ae5a3687da331c2198010b8d62c8c0b
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Oct 21 09:58:06 2021 +0200

    Use get_objstorage in seaweedfs tests instead of direct class
    instanciation

commit 38c02dcfae2baa141c7149d5556123fe7341b54b
Author: David Douard <david.douard@sdfa3.org>
Date:   Thu Oct 21 09:55:50 2021 +0200

    Add support for deprecation of objstorage cls in factory
    
    and deprecate "weed" in favor of "seaweedfs".

See https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/62/ for more details.