Page MenuHomeSoftware Heritage

Add support for sha1 identifiers for origins
ClosedPublic

Authored by aeviso on Jun 25 2021, 1:45 PM.

Details

Summary

Use Sha1Git type to explicitly state the kind of identifiers

Previous occurrences of bytes and Sha1 are not correctly using Sha1Git.
Also, some bytes conversion methods were replaced by their counterparts in
the swh.model.hashutil module.

Diff Detail

Repository
rDPROV Provenance database
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5924 (id=21265)

Rebasing onto d892b29e40...

Current branch diff-target is up to date.
Changes applied before test
commit c27beb2c29cca48435b02a3764c39efcfe04d6d4
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Wed Jun 23 20:00:40 2021 +0200

    Use `Sha1Git` type to explicitly state the kind of identifiers
    
    Previous occurrences of `bytes` and `Sha1` are not correctly using `Sha1Git`.
    Also, some bytes conversion methods were replaced by their counterparts in
    the swh.model.hashutil module.

commit 0271c1e41e9b01879e5fddf1b8103fe67451654d
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Wed Jun 23 19:12:06 2021 +0200

    Add support for sha1 identifiers for origins

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

Build is green

Patch application report for D5924 (id=21285)

Rebasing onto d892b29e40...

Current branch diff-target is up to date.
Changes applied before test
commit df69a9e57692ed9d4d870c295a21b3ac187d7b9c
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Wed Jun 23 20:00:40 2021 +0200

    Use `Sha1Git` type to explicitly state the kind of identifiers
    
    Previous occurrences of `bytes` and `Sha1` are not correctly using `Sha1Git`.
    Also, some bytes conversion methods were replaced by their counterparts in
    the swh.model.hashutil module.

commit fa22dc902781e30e46823030681f003983cc6d6e
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Wed Jun 23 19:12:06 2021 +0200

    Add support for sha1 identifiers for origins

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

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/provenance/postgresql/provenancedb_base.py
137–139

it's a reference.

swh/provenance/tests/conftest.py
139–152 ↗(On Diff #21285)

you can remove the types, there's TypedDict instead now

This revision is now accepted and ready to land.Jun 28 2021, 1:16 PM
swh/provenance/postgresql/provenancedb_base.py
137–139

thanks for clarifying! I've removed this in a newer version I'm about to submit as diff anyway

Build is green

Patch application report for D5924 (id=21391)

Rebasing onto d892b29e40...

Current branch diff-target is up to date.
Changes applied before test
commit 9e0c1aa099073887206c9334e17b49ee31bbef9a
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Wed Jun 23 20:00:40 2021 +0200

    Use `Sha1Git` type to explicitly state the kind of identifiers
    
    Previous occurrences of `bytes` and `Sha1` are now correctly using `Sha1Git`.
    Also, some bytes conversion methods were replaced by their counterparts in
    the swh.model.hashutil module.

commit a27ffff67b6b14bf37d153bb9b1d1c2ae63773fc
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Wed Jun 23 19:12:06 2021 +0200

    Add support for sha1 identifiers for origins

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