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
Branch
arcpatch-D3737_1
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14434
Build 22195: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 22194: arc lint + arc unit

Unit TestsFailed

TimeTest
0 msJenkins > "before all" hook for "Should display properly entries"::Tests / Cypress tests / Run cypress tests / Test admin deposit page "before all" hook for "Should display properly entries"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
0 msJenkins > "before all" hook for "should be hidden when on top"::Tests / Cypress tests / Run cypress tests / Back-to-top button tests "before all" hook for "should be hidden when on top"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
0 msJenkins > "before all" hook for "should display accepted message when accepted"::Tests / Cypress tests / Run cypress tests / Origin Save Tests "before all" hook for "should display accepted message when accepted"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
0 msJenkins > "before all" hook for "should display all files and directories"::Tests / Cypress tests / Run cypress tests / Directory Tests "before all" hook for "should display all files and directories"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
0 msJenkins > "before all" hook for "should display correct file name"::Tests / Cypress tests / Run cypress tests / Test File Rendering "before all" hook for "should display correct file name"
Error: Request failed with status code 500 Because this error occurred during a `before all` hook we are skipping all of the remaining tests.
View Full Test Results (64 Failed · 375 Passed · 7 Skipped)

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
1055

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
1054

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.