Page MenuHomeSoftware Heritage

Add a fixer for ExtrinsicRawMetadata
ClosedPublic

Authored by douardda on Apr 28 2021, 12:12 PM.

Details

Summary

the 'type' attribute has been removed in swh.model v1.0.0 in favor of
ExtendedSWHID.

This is needed to be able to replay current journal in staging.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D5634 (id=20082)

Rebasing onto 615d719cfc...

Current branch diff-target is up to date.
Changes applied before test
commit 3c3bf8b7fa3ca8ae2344adcb3765af176aeb755d
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Apr 28 12:06:19 2021 +0200

    Add a fixer for ExtrinsicRawMetadata
    
    the 'type' attribute has been removed in swh.model v1.0.0 in favor of
    ExtendedSWHID.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Apr 28 2021, 12:20 PM
Harbormaster failed remote builds in B21075: Diff 20082!

Build is green

Patch application report for D5634 (id=20089)

Rebasing onto 615d719cfc...

Current branch diff-target is up to date.
Changes applied before test
commit 10debd0884484fd270e6225b17c9ebf1337f19e9
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Apr 28 12:06:19 2021 +0200

    Add a fixer for ExtrinsicRawMetadata
    
    the 'type' attribute has been removed in swh.model v1.0.0 in favor of
    ExtendedSWHID.

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

This revision is now accepted and ready to land.Apr 28 2021, 12:47 PM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/storage/fixer.py
296–306

works too

310–311

I'm not a huge fan of mutating o in the conditional, but it's not a big deal

swh/storage/fixer.py
296–306

I've just replicated what is done in other _fix_xxx functions, but yes, right

310–311

what exactly is the purpose of this comment? what is the problem with this implementation? what other solution would you propose/prefer?

remove the pprint from the doctest

swh/storage/fixer.py
310–311

read too fast, nvm

Build is green

Patch application report for D5634 (id=20109)

Rebasing onto 615d719cfc...

Current branch diff-target is up to date.
Changes applied before test
commit 98804f9e1262a74555fac964255cad244db42094
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed Apr 28 12:06:19 2021 +0200

    Add a fixer for ExtrinsicRawMetadata
    
    the 'type' attribute has been removed in swh.model v1.0.0 in favor of
    an ExtendedSWHID 'target'.

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

This revision was automatically updated to reflect the committed changes.