Page MenuHomeSoftware Heritage

mapping: pass ExtendedSWHID instead of str
ClosedPublic

Authored by vlorentz on Mar 5 2021, 9:29 AM.

Details

Summary

It's better to use a structured type than 'raw' strings.

Diff Detail

Unit TestsFailed

TimeTest
54 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.clearlydefined.tests.test_mapping_utils::test_map_row_for_clearlydefined
ValueError: <ObjectType.CONTENT: 'cnt'> is not a valid ExtendedObjectType During handling of the above exception, another exception occurred:
48 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.clearlydefined.tests.test_mapping_utils::test_map_row_for_clearlydefined_true_mapping_status
ValueError: <ObjectType.CONTENT: 'cnt'> is not a valid ExtendedObjectType During handling of the above exception, another exception occurred:
59 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.clearlydefined.tests.test_mapping_utils::test_map_row_for_definitions_with_gitsha1
ValueError: <ObjectType.REVISION: 'rev'> is not a valid ExtendedObjectType During handling of the above exception, another exception occurred:
48 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.clearlydefined.tests.test_mapping_utils::test_map_row_for_licensee
ValueError: <ObjectType.CONTENT: 'cnt'> is not a valid ExtendedObjectType During handling of the above exception, another exception occurred:
57 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.clearlydefined.tests.test_mapping_utils::test_map_row_for_licensee_true_mapping_status
ValueError: <ObjectType.CONTENT: 'cnt'> is not a valid ExtendedObjectType During handling of the above exception, another exception occurred:
View Full Test Results (9 Failed · 15 Passed)

Event Timeline

Build has FAILED

Patch application report for D5200 (id=18619)

Could not rebase; Attempt merge onto b8711b1417...

Updating b8711b1..a122801
Fast-forward
 requirements-swh.txt                           |  2 +-
 swh/clearlydefined/mapping_utils.py            | 30 ++++++++++----------------
 swh/clearlydefined/tests/test_mapping_utils.py | 30 +++++++++-----------------
 3 files changed, 22 insertions(+), 40 deletions(-)
Changes applied before test
commit a122801166a762bc643a1685d451597519875ad6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 5 09:27:16 2021 +0100

    mapping: pass ExtendedSWHID instead of str
    
    It's better to use a structured type than 'raw' strings.

commit 38adc4748af23fef57aedcb1f05ec15c667f915a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 5 09:22:49 2021 +0100

    mapping: Update swh-model version to 1.0.0
    
    The old SWHID class is deprecated/removed, and RawExtrinsicMetadata no longer
    takes a 'type' argument.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Mar 5 2021, 9:29 AM
Harbormaster failed remote builds in B19711: Diff 18619!

Build has FAILED

Patch application report for D5200 (id=18620)

Could not rebase; Attempt merge onto b8711b1417...

Updating b8711b1..561a622
Fast-forward
 requirements-swh.txt                           |  2 +-
 swh/clearlydefined/mapping_utils.py            | 32 +++++++++++---------------
 swh/clearlydefined/tests/test_mapping_utils.py | 30 ++++++++----------------
 3 files changed, 24 insertions(+), 40 deletions(-)
Changes applied before test
commit 561a622c9eec93dcaf04586c83d9a6692fda24fe
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 5 09:27:16 2021 +0100

    mapping: pass ExtendedSWHID instead of str
    
    It's better to use a structured type than 'raw' strings.

commit 38adc4748af23fef57aedcb1f05ec15c667f915a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 5 09:22:49 2021 +0100

    mapping: Update swh-model version to 1.0.0
    
    The old SWHID class is deprecated/removed, and RawExtrinsicMetadata no longer
    takes a 'type' argument.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Mar 5 2021, 9:35 AM
Harbormaster failed remote builds in B19712: Diff 18620!

Build has FAILED

Patch application report for D5200 (id=18622)

Could not rebase; Attempt merge onto b8711b1417...

Updating b8711b1..eeb111b
Fast-forward
 requirements-swh.txt                           |  2 +-
 swh/clearlydefined/mapping_utils.py            | 32 ++++++++++--------------
 swh/clearlydefined/tests/test_mapping_utils.py | 34 +++++++++-----------------
 3 files changed, 26 insertions(+), 42 deletions(-)
Changes applied before test
commit eeb111b2cf23cefd85533195035b86f739f022c3
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 5 09:27:16 2021 +0100

    mapping: pass ExtendedSWHID instead of str
    
    It's better to use a structured type than 'raw' strings.

commit 38adc4748af23fef57aedcb1f05ec15c667f915a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 5 09:22:49 2021 +0100

    mapping: Update swh-model version to 1.0.0
    
    The old SWHID class is deprecated/removed, and RawExtrinsicMetadata no longer
    takes a 'type' argument.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Mar 5 2021, 9:52 AM
Harbormaster failed remote builds in B19713: Diff 18622!

Build is green

Patch application report for D5200 (id=18623)

Could not rebase; Attempt merge onto b8711b1417...

Updating b8711b1..0a49066
Fast-forward
 requirements-swh.txt                           |  2 +-
 swh/clearlydefined/mapping_utils.py            | 34 ++++++++++++--------------
 swh/clearlydefined/tests/test_mapping_utils.py | 34 +++++++++-----------------
 3 files changed, 28 insertions(+), 42 deletions(-)
Changes applied before test
commit 0a4906684f9710b7761c8d008742afc02a258206
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 5 09:27:16 2021 +0100

    mapping: pass ExtendedSWHID instead of str
    
    It's better to use a structured type than 'raw' strings.

commit 38adc4748af23fef57aedcb1f05ec15c667f915a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Mar 5 09:22:49 2021 +0100

    mapping: Update swh-model version to 1.0.0
    
    The old SWHID class is deprecated/removed, and RawExtrinsicMetadata no longer
    takes a 'type' argument.

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

This revision is now accepted and ready to land.Mar 5 2021, 10:26 AM