Page MenuHomeSoftware Heritage

Fix a release browsing issue in snapshot context views
ClosedPublic

Authored by anlambert on Nov 27 2019, 2:46 PM.

Details

Summary

Sometimes, when one tries to browse objects releated to a specific release contained
in a snapshot, a 404 error is raised while the release exists.

The issue was due to the associated snapshot content being truncated to 1000 branches
when the webapp retrieves it.

Error handling when ones tries to browse an invalid release has also been improved.

Related to T2108

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

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/web/browse/views/utils/snapshot_context.py
86

snapshot_size is a dict of sizes, so it should be plural (snapshot_sizes)

swh/web/tests/browse/views/test_origin.py
513

this line should be in a finally: clause, to not break other tests if this one crashes.

This revision is now accepted and ready to land.Nov 27 2019, 3:12 PM
swh/web/browse/views/utils/snapshot_context.py
86

Ack will add a new commit in the diff for global renaming

swh/web/tests/browse/views/test_origin.py
513

ack