Page MenuHomeSoftware Heritage

Improve snapshot browsing when error occurs
Open, NormalPublic

Description

When browsing a snapshot, errors while trying to get archived objects in it can occur, for instance:

  • a directory or content can end up not found when changing the current branch
  • a branch contained in a snapshot points to a null revision

The current behavior of the web application is to display a generic error page when such cases occur.

In order to keep the snapshot context (with links to branches and releases), the error message should
be displayed at the center of the snapshot UI in place of previously browsed object.

Event Timeline

anlambert triaged this task as Normal priority.Apr 9 2020, 11:56 AM
anlambert created this task.
ardumont added a comment.EditedApr 21 2020, 4:40 PM

Yes, thanks, now i have a better message. That is it finds the snapshot now
\m/.

NotFoundExc: Branch evaluation associated to visit with timestamp 2020-04-17T17:25:13Z for origin with url https://nix-community.github.io/nixpkgs-swh/sources-unstable.json not found!

It's still displayed as a generic message. So no snapshot context yet. That's
what i initially tried to fix, so it's still on ;)

That's because the "evaluation" targetting the nixpkgs repository is not
resolvable [2]. Specifically in the case of the staging infra, it's because we
never ingested it. [3]

Nonetheless, we cannot assume we ingested an up-to-date version of nixpkgs
anyway. For example, in production right now, the nixpkgs repository's last
visit dates back from 12nd march 2019 iirc [4]. So we may end up with this
situation in production anyway. I.e. nixguix loading is done. Its last snapshot
referencing the "evaluation" branch with an up-to-date nixpkgs we did not
ingest yet.

What i can say for sure is that the other branches for the nixguix snapshot are
resolvable. It's just too bad we elected the only one unresolvable. I recall an
irc discussion explaining branch names are lexicographically sorted so
"evaluation" is the first one (before the other ones starting with "https://"
;)

[1] https://webapp.internal.staging.swh.network/browse/origin/https://nix-community.github.io/nixpkgs-swh/sources-unstable.json/directory/

[2] https://github.com/NixOS/nixpkgs

[3] i tried to but that failed to finish with memory errors :/. That's another
issue though.

[4] https://archive.softwareheritage.org/browse/origin/https://github.com/NixOS/nixpkgs/directory/

I see where the issue is, diff incoming ;-)

Apparently, the changes I introduced in D3041 makes the above issue disappear ... I need to dig further on this.

Nevertheless, as you said the issue could still appear in production.

Displaying the error message in the center of the snapshot browsing interface while keeping navigation links
still seems the best way to go here.

anlambert added a comment.EditedApr 21 2020, 5:58 PM

Apparently, the changes I introduced in D3041 makes the above issue disappear ... I need to dig further on this.

Ok got it, branches with a non resolvable revision are filtered out by my changes in D3041, lol. I will revert to previous behavior.
I am lucky that you got that case in the same time I was working on this ;-)

I have updated D3041 to restore previous behavior and look what I got now:

seems better ;-)

Nevertheless, the displayed message is not correct and should indicate that the revision is missing.
I will improve that in a new diff.

Thanks a lot! ;)

D3042 handles the branch with non resolvable revision case.

I keep that task open to handle missing directory or content when switching branches
(a similar message should be displayed instead of a plain 404 error page).