Page MenuHomeSoftware Heritage

templates/show-metadata: Fix rendering error when a SWHID is missing
AbandonedPublic

Authored by anlambert on Sep 9 2021, 3:04 PM.

Details

Reviewers
vlorentz
Group Reviewers
Reviewers
Summary

It exists some cases (nix and guix origins for instance) when a snapshot
branch targets a revision that is missing in the archive.

In that case, SWHID for currently browsed directory is missing as such
object does not exist.

So ensure to check SWHID validity when rendering show-metadata template.

See https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://guix.gnu.org/sources.json
while being logged as staff.

Diff Detail

Repository
rDWAPPS Web applications
Branch
show-metadata-fix
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23476
Build 36628: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 36627: arc lint + arc unit

Event Timeline

vlorentz published this revision for review.Sep 9 2021, 3:19 PM
vlorentz accepted this revision.
This revision is now accepted and ready to land.Sep 9 2021, 3:19 PM

Build is green

Patch application report for D6225 (id=22530)

Rebasing onto 45583024a8...

Current branch diff-target is up to date.
Changes applied before test
commit 82b569627de7f01b65305bbcf4b9221da52e4824
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu Sep 9 15:01:52 2021 +0200

    templates/show-metadata: Fix rendering error when a SWHID is missing
    
    It exists some cases (nix and guix origins for instance) when a snapshot
    branch targets a revision that is missing in the archive.
    
    In that case, SWHID for currently browsed directory is missing as such
    object does not exist.
    
    So ensure to check SWHID validity when rendering show-metadata template.

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

Abandonned in favor of a better fix in D6230