Page MenuHomeSoftware Heritage

storage*: Drop deprecated content_get_range endpoint
ClosedPublic

Authored by ardumont on Aug 5 2020, 3:18 PM.

Details

Summary

Impacts swh-indexer which will get updated to use
storage*.content_get_partition instead:

$ grep -r "content_get_range(" $SWH_ENVIRONMENT_HOME/**/swh/* | grep -v swh-storage
/home/tony/work/inria/repo/swh/swh-environment/swh-indexer/swh/indexer/indexer.py:            result = self.storage.content_get_range(start, end)
/home/tony/work/inria/repo/swh/swh-environment/swh-indexer/swh/indexer/storage/interface.py:    def _content_get_range(
/home/tony/work/inria/repo/swh/swh-environment/swh-indexer/swh/indexer/storage/__init__.py:    def _content_get_range(
/home/tony/work/inria/repo/swh/swh-environment/swh-indexer/swh/indexer/storage/__init__.py:            db.content_get_range(
/home/tony/work/inria/repo/swh/swh-environment/swh-indexer/swh/indexer/storage/__init__.py:        return self._content_get_range(
/home/tony/work/inria/repo/swh/swh-environment/swh-indexer/swh/indexer/storage/__init__.py:        return self._content_get_range(
/home/tony/work/inria/repo/swh/swh-environment/swh-indexer/swh/indexer/storage/db.py:    def content_get_range(

Related to T645

Test Plan

tox

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Drop extra content_get_range test

Build has FAILED

Patch application report for D3712 (id=13083)

Could not rebase; Attempt merge onto 334a016e44...

Updating 334a016e..45309ee1
Fast-forward
 swh/storage/cassandra/storage.py    |  4 +-
 swh/storage/in_memory.py            |  4 +-
 swh/storage/interface.py            | 31 +--------------
 swh/storage/storage.py              |  6 ++-
 swh/storage/tests/test_cassandra.py | 24 ------------
 swh/storage/tests/test_storage.py   | 76 -------------------------------------
 6 files changed, 10 insertions(+), 135 deletions(-)
Changes applied before test
commit 45309ee152a4a09c0df8976c1c9a260926392b0a
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Aug 5 15:15:01 2020 +0200

    storage*: Drop deprecated content_get_range endpoint
    
    Related to T645

commit 472266327843b873d0541e0aa9b948d907521965
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Aug 5 12:56:51 2020 +0200

    storage*: object_find_by_sha1_git: Type remaining existing endpoints
    
    Related to T2517

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

Build is green

Patch application report for D3712 (id=13084)

Could not rebase; Attempt merge onto 334a016e44...

Updating 334a016e..b48d8349
Fast-forward
 swh/storage/cassandra/storage.py    |  4 +-
 swh/storage/in_memory.py            |  4 +-
 swh/storage/interface.py            | 31 +-----------
 swh/storage/storage.py              |  6 ++-
 swh/storage/tests/test_cassandra.py | 24 ----------
 swh/storage/tests/test_storage.py   | 94 -------------------------------------
 6 files changed, 10 insertions(+), 153 deletions(-)
Changes applied before test
commit b48d834984f776d63225e254e21d9e0619db48e1
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Aug 5 15:15:01 2020 +0200

    storage*: Drop deprecated content_get_range endpoint
    
    Related to T645

commit 472266327843b873d0541e0aa9b948d907521965
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Aug 5 12:56:51 2020 +0200

    storage*: object_find_by_sha1_git: Type remaining existing endpoints
    
    Related to T2517

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

This revision is now accepted and ready to land.Aug 5 2020, 3:32 PM