Page MenuHomeSoftware Heritage

validate.snapshot_add: Make it able to deal directly with Snapshot
AbandonedPublic

Authored by ardumont on Jun 17 2020, 9:36 AM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

Preparatory work for another diff D3296

Also same motivation behind as D3277 (details there, tl; dr, long run, drop
validate proxy).

Related to D3277

Test Plan

tox

Diff Detail

Event Timeline

Build is green

Patch application report for D3298 (id=11685)

Rebasing onto d153a8096d...

Current branch diff-target is up to date.
Changes applied before test
commit 1c615f7d31ffeebb07a05ff78116950fb51ebaa5
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 17 09:33:21 2020 +0200

    validate.snapshot_add: Make it able to deal directly with Snapshot
    
    Related to D3277

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

So, during the review of this, I was wondering whether we could make this more generic, and I ended up with D3300 which just goes all the way at once...

swh/storage/validate.py
110

Looks like the implementation really accepts Iterable[Union[Dict, Snapshot]] but I'm not sure that would typecheck.

114

Dict -> dict. (not that it matters much)

Abandon in favor of D3300 which goes all the way ;)

swh/storage/validate.py
110

ah yes, but i did not intended it was used that way ;)

114

right.