Page MenuHomeSoftware Heritage

Add a test exerting the branch filtering feature of the git loader
ClosedPublic

Authored by olasd on May 27 2020, 5:23 PM.

Details

Summary

Depends on D3183.

Test Plan

new tox test added

Diff Detail

Event Timeline

Build is green

Patch application report for D3184 (id=11318)

Could not rebase; Attempt merge onto b96849a6a2...

Updating b96849a..dfd5be7
Fast-forward
 swh/loader/git/loader.py               | 394 +++++++++++++++------------------
 swh/loader/git/tests/test_from_disk.py |  90 +++++---
 swh/loader/git/tests/test_loader.py    |  49 +++-
 3 files changed, 287 insertions(+), 246 deletions(-)
Changes applied before test
commit dfd5be7b14c06bd7899d5417cd9906c443ddb621
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Wed May 27 17:03:45 2020 +0200

    Add a test exerting the branch filtering feature of the git loader

commit 8e35f633df6590296b87e75c4cb2b990d9dc1658
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Wed May 27 17:03:02 2020 +0200

    Use dulwich instead of shelling out to git in the basic git loader tests

commit 966f98c38fc223e64f357ef30ec5a3d325ec12d7
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Wed May 27 15:15:24 2020 +0200

    Add type annotations to swh.loader.git.loader

commit 6605ee3f047796c4b3f4b418348229fbd6beac9c
Author: Nicolas Dandrimont <nicolas@dandrimont.eu>
Date:   Wed May 27 14:58:15 2020 +0200

    Only use the previous (base) snapshot as reference for incremental loads
    
    The old behavior would find any object with a matching sha1_git from the archive
    to use as a reference point in the generated snapshot. While there's no known
    sha1_git collisions in the wild, this behavior is inconsistent with other
    loaders.
    
    This removes the only reason to keep the `object_find_by_sha1_git` api in storage.

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

This revision is now accepted and ready to land.May 27 2020, 5:51 PM