Page MenuHomeSoftware Heritage

browse: Add snapshot related query parameters in numerous object views
Needs ReviewPublic

Authored by anlambert on Fri, May 15, 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 12404
Build 18818: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 18817: arc lint + arc unit

Event Timeline

anlambert created this revision.Fri, May 15, 4:51 PM
anlambert updated this revision to Diff 11216.Fri, May 15, 4:54 PM

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–337

jenkins reports this is missing some coverage

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

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