Skip to content

swh.deposit.parsers: Ensure SWHIDs with context are strictly valid

If not, those errors are caught early enough so the deposit users are notified and can fix those wrong inputs.

This further checks the SWHIDs with qualifiers entries. Typically, ensuring the "anchor" and "visit" SWHIDs if provided are valid according to the documentation

  • [1]

  • "visit" is a snapshot core swhid (if any)

  • "anchor" is a core swhid of leaf node (either directory, a revision, a release or a snapshot)

I did not push this in swh.model.identifiers.parse_swhid but it should ideally go there. As people already mentioned it was slow already, i thought of keeping it here first.

Related to #2537 (closed)

Test Plan

tox


Migrated from D4490 (view on Phabricator)

Merge request reports