Skip to content
Snippets Groups Projects

test_resolve_revision_from_artifacts: Use the right type for PartialExtID.

We used a string instead of a tuple. It doesn't matter much because they are only compared with each other, but let's not intentionally use the wrong types when we don't need to.

Depends on !196 (closed)


Migrated from D5348 (view on Phabricator)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Build is green

    Patch application report for D5348 (id=19160)

    Could not rebase; Attempt merge onto 6d3545e4...

    Updating 6d3545e..9ad94dd
    Fast-forward
     swh/loader/package/debian/loader.py              |  4 +-
     swh/loader/package/debian/tests/test_debian.py   | 36 +++++++-----
     swh/loader/package/loader.py                     | 72 ++++++++++++------------
     swh/loader/package/nixguix/tests/test_nixguix.py |  6 +-
     swh/loader/package/tests/test_loader.py          | 37 ++++++------
     5 files changed, 85 insertions(+), 70 deletions(-)
    Changes applied before test
    commit 9ad94ddc3d99f9d702ae6411e0723c0080548c82
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Mar 25 16:19:45 2021 +0100
    
        test_resolve_revision_from_artifacts: Use the right type for PartialExtID.
        
        We used a string instead of a tuple. It doesn't matter much because they
        are only compared with each other, but let's not intentionally use
        the wrong types when we don't need to.
    
    commit 6e04a21df73e3d208b50159e78b52b1d6443ea83
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Mar 25 14:52:37 2021 +0100
    
        test_loader: Use a spec'ed mock, to follow the new style guide
    
    commit 2f9b8a8b1eecb578cdcbe9046262b6087a6c15de
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Mar 25 10:47:03 2021 +0100
    
        Rename resolve_revision_from with _artifacts suffix, and fix its documentation
        
        A future commit will introduce resolve_revision_from_extid, so this commit
        preemptively renames it to avoid any confusion.
    
    commit 78430078cd2647e09cc9a0c09a9e6179d4a0d8b1
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Tue Mar 23 16:14:42 2021 +0100
    
        package.loader: Unnest loops in PackageLoader.load()
        
        In a future commit, we will need to go through all the PackageInfo
        objects before running the loop, so we can get their ExtID and
        fetch them from the storage.
        
        So, we need to fetch them all before running the load loop,
        using this listcomp.

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

  • agreed with the rationale but i gather that needs rework if you drop the previous diff.

  • Author Maintainer

    rebase (drop !196 (closed))

  • Build is green

    Patch application report for D5348 (id=19167)

    Could not rebase; Attempt merge onto 6d3545e4...

    Updating 6d3545e..e590b42
    Fast-forward
     swh/loader/package/debian/loader.py              |  4 +-
     swh/loader/package/debian/tests/test_debian.py   | 36 +++++++-----
     swh/loader/package/loader.py                     | 72 ++++++++++++------------
     swh/loader/package/nixguix/tests/test_nixguix.py |  6 +-
     swh/loader/package/tests/test_loader.py          | 28 ++++-----
     5 files changed, 78 insertions(+), 68 deletions(-)
    Changes applied before test
    commit e590b4258262e78449d84724e25824af07b96c47
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Mar 25 16:19:45 2021 +0100
    
        test_resolve_revision_from_artifacts: Use the right type for PartialExtID.
        
        We used a string instead of a tuple. It doesn't matter much because they
        are only compared with each other, but let's not intentionally use
        the wrong types when we don't need to.
    
    commit 2f9b8a8b1eecb578cdcbe9046262b6087a6c15de
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Thu Mar 25 10:47:03 2021 +0100
    
        Rename resolve_revision_from with _artifacts suffix, and fix its documentation
        
        A future commit will introduce resolve_revision_from_extid, so this commit
        preemptively renames it to avoid any confusion.
    
    commit 78430078cd2647e09cc9a0c09a9e6179d4a0d8b1
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Tue Mar 23 16:14:42 2021 +0100
    
        package.loader: Unnest loops in PackageLoader.load()
        
        In a future commit, we will need to go through all the PackageInfo
        objects before running the loop, so we can get their ExtID and
        fetch them from the storage.
        
        So, we need to fetch them all before running the load loop,
        using this listcomp.

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

  • Antoine R. Dumont mentioned in merge request !198 (closed)

    mentioned in merge request !198 (closed)

  • Merge request was accepted

  • Antoine R. Dumont approved this merge request

    approved this merge request

  • Author Maintainer

    Merge request was merged

  • closed

Please register or sign in to reply
Loading