Page MenuHomeSoftware Heritage

RawExtrinsicMetadata: Use CoreSWHID instead of SWHID for contexts
ClosedPublic

Authored by vlorentz on Feb 26 2021, 3:02 PM.

Details

Reviewers
anlambert
Group Reviewers
Reviewers
Summary

SWHID is deprecated; and CoreSWHID does not support qualifiers at all,
so RawExtrinsicMetadata no longer needs to check there are no qualifiers.

Note: this will break all packages handling values of RawExtrinsicMetadata.

Diff Detail

Event Timeline

Build is green

Patch application report for D5159 (id=18447)

Could not rebase; Attempt merge onto 24b653e4c0...

Updating 24b653e..690b58d
Fast-forward
 swh/model/model.py                  | 175 +++++++++++---------
 swh/model/tests/swh_model_data.py   |  13 +-
 swh/model/tests/test_identifiers.py |  35 ++--
 swh/model/tests/test_model.py       | 311 ++++++++++++------------------------
 4 files changed, 218 insertions(+), 316 deletions(-)
Changes applied before test
commit 690b58d543edcf62e9c6bade2a1c2cf9a6aa016f
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Feb 26 11:41:03 2021 +0100

    RawExtrinsicMetadata: Use CoreSWHID instead of SWHID for contexts
    
    SWHID is deprecated; and CoreSWHID does not support qualifiers at all,
    so RawExtrinsicMetadata no longer needs to check there are no qualifiers.

commit 0fbefec7d7e833cda24b46c641116af8cc028340
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Feb 26 11:34:38 2021 +0100

    RawExtrinsicMetadata: Use ExtendedSWHID as target and remove type
    
    ExtendedSWHID can identify either a software artifact or an origin,
    so we no longer need Union[SWHID, str].
    
    Therefore, we no longer need the 'type' attribute, as it was only
    used to tell when the target is a SWHID and when it's an origin URL.

commit a934fd55318e9b70c4091780081796bc551566c6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Feb 26 10:49:10 2021 +0100

    Add a swhid() method to all hashable objects.
    
    It can be handy as a shortcut to build SWHID objects.

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

Build is green

Patch application report for D5159 (id=18451)

Could not rebase; Attempt merge onto 24b653e4c0...

Updating 24b653e..690b58d
Fast-forward
 swh/model/model.py                  | 175 +++++++++++---------
 swh/model/tests/swh_model_data.py   |  13 +-
 swh/model/tests/test_identifiers.py |  35 ++--
 swh/model/tests/test_model.py       | 311 ++++++++++++------------------------
 4 files changed, 218 insertions(+), 316 deletions(-)
Changes applied before test
commit 690b58d543edcf62e9c6bade2a1c2cf9a6aa016f
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Feb 26 11:41:03 2021 +0100

    RawExtrinsicMetadata: Use CoreSWHID instead of SWHID for contexts
    
    SWHID is deprecated; and CoreSWHID does not support qualifiers at all,
    so RawExtrinsicMetadata no longer needs to check there are no qualifiers.

commit 0fbefec7d7e833cda24b46c641116af8cc028340
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Feb 26 11:34:38 2021 +0100

    RawExtrinsicMetadata: Use ExtendedSWHID as target and remove type
    
    ExtendedSWHID can identify either a software artifact or an origin,
    so we no longer need Union[SWHID, str].
    
    Therefore, we no longer need the 'type' attribute, as it was only
    used to tell when the target is a SWHID and when it's an origin URL.

commit a934fd55318e9b70c4091780081796bc551566c6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Feb 26 10:49:10 2021 +0100

    Add a swhid() method to all hashable objects.
    
    It can be handy as a shortcut to build SWHID objects.

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

Build is green

Patch application report for D5159 (id=18449)

Rebasing onto f3ef6e6a5a...

Current branch diff-target is up to date.
Changes applied before test
commit 23887483a8d40512163d53098f8c3ee514d8e4e5
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Feb 4 13:59:09 2021 +0100

    storage_tests: recompute ids when evolving RawExtrinsicMetadata objects.
    
    For now this does nothing as RawExtrinsicMetadata has no 'id' field,
    but the equality assertions will become errors when the next version
    of swh.model is released.

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

anlambert added a subscriber: anlambert.

Looks good to me.

This revision is now accepted and ready to land.Mar 1 2021, 4:10 PM

Landed as 31a8a0f2a76830d76ed62bd8c23bfa37b8053360