Page MenuHomeSoftware Heritage

storage*: origin_visit_get_by -> Optional[OriginVisit]
ClosedPublic

Authored by ardumont on Jul 27 2020, 2:19 PM.

Details

Summary

Impacts:

  • swh-web
$ grep -r 'origin_visit_get_by' */swh/** | grep -v "swh-storage"
swh-web/swh/web/common/service.py:    visit = storage.origin_visit_get_by(origin_url, visit_id)
swh-web/swh/web/tests/api/views/test_origin.py:        expected_visit = archive_data.origin_visit_get_by(new_origin.url, visit_id)
swh-web/swh/web/tests/api/views/test_origin.py:    expected_visit = archive_data.origin_visit_get_by(new_origin.url, visit_ids[1])
swh-web/swh/web/tests/common/test_origin_visits.py:    expected_visit = archive_data.origin_visit_get_by(new_origin.url, visits[1])
swh-web/swh/web/tests/common/test_origin_visits.py:    expected_visit = archive_data.origin_visit_get_by(new_origin.url, visits[2])
swh-web/swh/web/tests/common/test_origin_visits.py:    expected_visit = archive_data.origin_visit_get_by(new_origin.url, visits[-1])
swh-web/swh/web/tests/common/test_service.py:    expected_visit = dict(archive_data.origin_visit_get_by(new_origin.url, visit))
swh-web/swh/web/tests/conftest.py:    def origin_visit_get_by(self, origin_url, visit_id):
swh-web/swh/web/tests/conftest.py:        visit = self.storage.origin_visit_get_by(origin_url, visit_id)

Related to T645

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13988
Build 21465: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 21464: arc lint + arc unit

Unit TestsFailed

TimeTest
174 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_api_client.TestStorage::test_snapshot_add_get
self = <swh.storage.tests.test_api_client.TestStorage object at 0x7fb5f839d128> swh_storage = <RemoteStorage url=mock://example.com/> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb5f83b48d0>
693 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_cassandra.TestCassandraStorage::test_snapshot_add_get
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7fb5145c4470> swh_storage = <swh.storage.cassandra.storage.CassandraStorage object at 0x7fb461435748> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb461410eb8>
749 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_cassandra.TestCassandraStorage::test_snapshot_add_get_complete
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7fb534081198> swh_storage = <swh.storage.cassandra.storage.CassandraStorage object at 0x7fb514638a58> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb5340be7f0>
736 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_cassandra.TestCassandraStorage::test_snapshot_add_get_empty
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7fb4f41dc7f0> swh_storage = <swh.storage.cassandra.storage.CassandraStorage object at 0x7fb4f4139c18> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb4f4101240>
675 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_cassandra.TestCassandraStorage::test_snapshot_add_twice__by_origin_visit
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7fb45faf1860> swh_storage = <swh.storage.cassandra.storage.CassandraStorage object at 0x7fb45faf4d30> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb45e6de470>
View Full Test Results (7 Failed · 749 Passed · 17 Skipped)

Event Timeline

This revision is now accepted and ready to land.Jul 27 2020, 2:26 PM

Build has FAILED

Patch application report for D3625 (id=12757)

Rebasing onto 2d51be955b...

First, rewinding head to replay your work on top of it...
Applying: storage*: origin_visit_get_by -> Optional[OriginVisit]
Changes applied before test
commit ba10edb3c77d09632de1625c020b7eb3d10a1e18
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 27 14:18:32 2020 +0200

    storage*: origin_visit_get_by -> Optional[OriginVisit]
    
    Related to T645

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

Build has FAILED

Patch application report for D3625 (id=12758)

Rebasing onto 2d51be955b...

Current branch diff-target is up to date.
Changes applied before test
commit 5043f9056638d7d8490880687804c0cbbd9ec25c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 27 14:18:32 2020 +0200

    storage*: origin_visit_get_by -> Optional[OriginVisit]
    
    Related to T645

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

Fix missing part (I forgot to run on the storage entirely, snapshot tests were unhappy)

Build is green

Patch application report for D3625 (id=12759)

Rebasing onto 2d51be955b...

Current branch diff-target is up to date.
Changes applied before test
commit 119d01e41620f5e8a86e9a3e62c55bc0c8c3f9bd
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jul 27 14:18:32 2020 +0200

    storage*: origin_visit_get_by -> Optional[OriginVisit]
    
    Related to T645

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