Page MenuHomeSoftware Heritage

Add an endpoint to list metadata authorities for a given SWHID
ClosedPublic

Authored by vlorentz on Jun 28 2021, 4:06 PM.

Details

Summary

It allows easier discovery for humans, as clients need to know the authority
type/url to list metadata on a given SWHID.

Test Plan

Tests will fail because they depend on D5934.

Diff Detail

Repository
rDWAPPS Web applications
Branch
remd-list-authorities
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22467
Build 34995: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 34994: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D5936 (id=21313)

Rebasing onto e18341dd82...

Current branch diff-target is up to date.
Changes applied before test
commit 6a11cd545f0e5509cda7f8eb7cc95d13500c1577
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Jun 28 16:05:55 2021 +0200

    Add an endpoint to list metadata authorities for a given SWHID
    
    It allows easier discovery for humans, as clients need to know the authority
    type/url to list metadata on a given SWHID.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/911/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/911/console

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 28 2021, 4:20 PM
Harbormaster failed remote builds in B22294: Diff 21313!
olasd added a subscriber: olasd.

After clarification of the rationale on IRC, LGTM (with some marginal changes), thanks.

Has storage been tagged with this new endpoint?

swh/web/api/views/metadata.py
204

s/objects/object/ or s/objects/target/

210

s/metadata/metadata-providing authorities/?

225

Needs a trailing slash?

244–246

*rolls eyes* Thanks black.

This revision is now accepted and ready to land.Jul 5 2021, 4:39 PM

Has storage been tagged with this new endpoint?

Not yet, I was waiting for the green light on this design.

rebase + apply comments + trigger rebuild

Build is green

Patch application report for D5936 (id=21488)

Rebasing onto 3c06b0331d...

Current branch diff-target is up to date.
Changes applied before test
commit 7759503780d7a82e348e3209ef6b3257b7b66992
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Jun 28 16:05:55 2021 +0200

    Add an endpoint to list metadata authorities for a given SWHID
    
    It allows easier discovery for humans, as clients need to know the authority
    type/url to list metadata on a given SWHID.

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