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

anlambert created this revision.Nov 27 2019, 2:46 PM
vlorentz accepted this revision.Nov 27 2019, 3:12 PM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/web/browse/views/utils/snapshot_context.py
87

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

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

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
anlambert added inline comments.Nov 27 2019, 3:39 PM
swh/web/browse/views/utils/snapshot_context.py
87

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

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

ack

anlambert updated this revision to Diff 8326.Nov 27 2019, 3:42 PM

Update: Address @vlorentz comments

This revision was landed with ongoing or failed builds.Nov 27 2019, 4:08 PM
This revision was automatically updated to reflect the committed changes.