Page MenuHomeSoftware Heritage

[WIP] Add support for SWHID on Origin
AbandonedPublic

Authored by douardda on Feb 1 2021, 5:03 PM.

Details

Summary

Note: This is a "RFC", as support for discussion, not a "diff to review", per se.

  • extract SWHID model type definition in a dedicated module,
  • add support for SWHID on Origin objects using the hexlified url as id,
  • refactor RawExtrinsicMetadata to use only SWHID as target and origin fields,
  • use a newly defined SWHIDObjectType enum type as SWHID.type field,
  • adapt the rest of the code accordingly.

Diff Detail

Event Timeline

Build has FAILED

Patch application report for D4985 (id=17784)

Rebasing onto cad940dc8c...

Current branch diff-target is up to date.
Changes applied before test
commit 5e2103d018d3e1fad532d7081f6b91ae7cd21227
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Jan 26 14:53:23 2021 +0100

    Add support for SWHID on Origin
    
    - extract SWHID model type definition in a dedicated module,
    - add support for SWHID on Origin objects using the hexlified url as id,
    - refactor RawExtrinsicMetadata to use only SWHID as `target` and
      `origin` fields,
    - use a newly defined SWHIDObjectType enum type as `SWHID.type` field,
    - adapt the rest of the code accordingly.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 1 2021, 5:04 PM
Harbormaster failed remote builds in B18925: Diff 17784!

mostly black formattig (I think)

Build is green

Patch application report for D4985 (id=17891)

Rebasing onto 0c16581283...

Current branch diff-target is up to date.
Changes applied before test
commit 447b1ecb38f4091060dcac2891af6884332b3adf
Author: David Douard <david.douard@sdfa3.org>
Date:   Tue Jan 26 14:53:23 2021 +0100

    Add support for SWHID on Origin
    
    - extract SWHID model type definition in a dedicated module,
    - add support for SWHID on Origin objects using the hexlified url as id,
    - refactor RawExtrinsicMetadata to use only SWHID as `target` and
      `origin` fields,
    - use a newly defined SWHIDObjectType enum type as `SWHID.type` field,
    - adapt the rest of the code accordingly.

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

zack requested changes to this revision.Feb 4 2021, 4:02 PM
zack added a subscriber: zack.

I'm requesting changes as the idea of hexlifying URLs behind the "swh:1:ori:" prefix is still being discussed (on the swh-devel list) and, for now, I'm against that specific part of the proposal.

(The rest looks good.)

This revision now requires changes to proceed.Feb 4 2021, 4:02 PM

superseeded by new SWHID classes