Page MenuHomeSoftware Heritage

Update for the new type of snapshot_get_branches in swh-storage > 0.13.0
ClosedPublic

Authored by vlorentz on Aug 7 2020, 2:26 PM.

Details

Summary

It will start returning SnapshotBranch objects instead of dicts.

Depends on D3737

Related: T645

Test Plan

tests will fail until D3740 is landed and released.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D3741 (id=13168)

Could not rebase; Attempt merge onto 8029d68735...

Updating 8029d687..7b1ef6e2
Fast-forward
 swh/web/common/service.py                  | 31 ++++++++++++++--------
 swh/web/tests/api/views/test_content.py    |  6 ++---
 swh/web/tests/browse/views/test_content.py |  9 +++----
 swh/web/tests/common/test_service.py       | 16 +++++++-----
 swh/web/tests/conftest.py                  | 32 ++++++++++++++++-------
 swh/web/tests/data.py                      | 41 +++++++++++++++++-------------
 swh/web/tests/strategies.py                |  4 +--
 7 files changed, 84 insertions(+), 55 deletions(-)
Changes applied before test
commit 7b1ef6e2457d49c010fa8e0c9b04456004247944
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 7 14:25:19 2020 +0200

    Update for the new type of snapshot_get_branches in swh-storage > 0.13.0
    
    It will start returning SnapshotBranch objects instead of dicts.

commit c7f9cbd09117249e47a7d68804384b1a84bb7956
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Aug 7 14:08:45 2020 +0200

    Adapt type and rename content_get_metadata calls to content_get
    
    Summary: Related to T645
    
    Test Plan:
    tox
    (failing until storage release > 0.12)
    
    Reviewers: #reviewers, vlorentz, anlambert
    
    Reviewed By: #reviewers, vlorentz, anlambert
    
    Subscribers: vlorentz
    
    Maniphest Tasks: T645
    
    Differential Revision: https://forge.softwareheritage.org/D3737

commit 78b041a4adf5b54faec9d9a849eae2b3b838a273
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Aug 7 14:08:42 2020 +0200

    Rename content_get calls to content_get_data
    
    Summary: According to the latest change in storage
    
    Test Plan:
    tox
    (failing until storage release > 0.12)
    
    Reviewers: #reviewers, vlorentz, anlambert
    
    Reviewed By: #reviewers, vlorentz, anlambert
    
    Subscribers: anlambert, vlorentz
    
    Differential Revision: https://forge.softwareheritage.org/D3732

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

anlambert added a subscriber: anlambert.
anlambert added inline comments.
swh/web/common/service.py
1052–1054

You should add a from_branches function in the converters module to avoid duplicating code.

This revision now requires changes to proceed.Aug 7 2020, 2:50 PM

add converters.from_partial_branches to deduplicate convertion

Missing a rebase on the latest adaptation from the storage diff D3740.
but otherwise, looks good ;)

ardumont added inline comments.
swh/web/common/service.py
1051–1052

f-string?

  • rebase
  • f-string
  • update type name
This revision is now accepted and ready to land.Aug 7 2020, 4:47 PM

Build has FAILED

Patch application report for D3741 (id=13180)

Rebasing onto 478a7acb46...

Current branch diff-target is up to date.
Changes applied before test
commit 7f34b3f48bb8aad713cd2fcfe447de08ace60bfb
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 7 14:25:19 2020 +0200

    Update for the new type of snapshot_get_branches in swh-storage > 0.13.0
    
    It will start returning SnapshotBranch objects instead of dicts.

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

This revision was landed with ongoing or failed builds.Aug 7 2020, 6:12 PM
This revision was automatically updated to reflect the committed changes.