Page MenuHomeSoftware Heritage

model: Deduplicate calls to hashlib.
AbandonedPublicDraft

Authored by vlorentz on Dec 8 2021, 5:21 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

It's just simpler this way

Diff Detail

Event Timeline

Build has FAILED

Patch application report for D6800 (id=24649)

Could not rebase; Attempt merge onto c32290481c...

Updating c322904..1c4d0bb
Fast-forward
 swh/model/model.py            | 43 ++++++++++++++++++++++++++++++-------------
 swh/model/tests/test_model.py | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 13 deletions(-)
Changes applied before test
commit 1c4d0bb0fae359ce506db5e678386a0c8bb6ded8
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Dec 8 16:20:38 2021 +0100

    model: Deduplicate calls to hashlib.
    
    It's just simpler this way

commit 59ed64b08cd42c5af988b402f5948b077a5cb296
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Dec 8 16:24:38 2021 +0100

    model: Add a check() method to model objects
    
    It calls attr.validate() (which calls the validators), and recomputes
    the hash of HashableObject instances.
    
    A future commit will also make it check the raw_manifest attribute
    when relevant

commit 5eb65393af220b3e52f83f34bd27af9d0047cbf2
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Dec 8 16:20:38 2021 +0100

    model: Deduplicate calls to hashlib.
    
    It's just simpler this way

commit 2d0105b8413064db60aaa0802a45b0fad8b12d25
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Dec 8 16:17:40 2021 +0100

    model: Add support for None to the type checker
    
    For the sake of completeness (a future commit may depend on it).

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

Harbormaster returned this revision to the author for changes because remote builds failed.Dec 8 2021, 5:22 PM
Harbormaster failed remote builds in B25507: Diff 24649!