Page MenuHomeSoftware Heritage

browse: Add snapshot related query parameters in numerous object views
ClosedPublic

Authored by anlambert on May 15 2020, 4:51 PM.

Details

Summary

It enables to browse archived objects scoped to a given origin visit, possibly
on a given branch, release or revision.

That diff ensures that all snapshot context browsing info (origin url, snapshot id,
branch name, release name, revision id) can be provided to all object views through
query parameters.

This is a prerequisite for the update of the SWHID resolver.

Closes T2359
Related to T2342

Diff Detail

Repository
rDWAPPS Web applications
Branch
add-snapshot-related-query-parameters
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12403
Build 18816: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 18815: arc lint + arc unit

Event Timeline

Update commit id for incoming stacked diff

Build is green

Patch application report for D3156 (id=11215)

Rebasing onto 3bbc62e227...

Current branch diff-target is up to date.
Changes applied before test
commit 5b9a0ea5b11e7a735934dd3e6b12bbd09876be6a
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Apr 3 19:40:04 2020 +0200

    browse: Add snapshot related query parameters in numerous object views
    
    It enables to browse archived objects scoped to a given origin visit, possibly
    on a given branch, release or revision.
    
    Closes T2359
    Related to T2342

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

Build is green

Patch application report for D3156 (id=11216)

Rebasing onto 3bbc62e227...

Current branch diff-target is up to date.
Changes applied before test
commit 88fde952d6f5cbe16766e3211654b65a723a850c
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Apr 3 19:40:04 2020 +0200

    browse: Add snapshot related query parameters in numerous object views
    
    It enables to browse archived objects scoped to a given origin visit, possibly
    on a given branch, release or revision.
    
    Closes T2359
    Related to T2342

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

vlorentz added inline comments.
swh/web/browse/utils.py
325–340

jenkins reports this is missing some coverage

swh/web/browse/views/content.py
204–230

none of this is covered

swh/web/browse/views/release.py
59

should rename this variable or move it in the if block

swh/web/browse/views/revision.py
338

same

Update:

  • increase coverage
  • address @vlorentz comments
  • add missing snapshot context in /browse/revision/log/ view

Build is green

Patch application report for D3156 (id=11432)

Rebasing onto 3f9f08482c...

Current branch diff-target is up to date.
Changes applied before test
commit 1d477dface8adc18ddf37ac48e370b7fdcd5426a
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Fri Apr 3 19:40:04 2020 +0200

    browse: Add snapshot related query parameters in numerous object views
    
    It enables to browse archived objects scoped to a given origin visit, possibly
    on a given branch, release or revision.
    
    Related to T2342
    Related to T2427
    
    Closes T2359

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

@vlorentz, there is still some code to cover but mostly in the links generation part only used for the display of objects metadata.
That diff is already quite large so I will continue to increase coverage later. Plus the updated SWHID features in swh-web are quite
urgent to deploy for @rdicosmo.

This revision is now accepted and ready to land.Jun 5 2020, 11:32 AM