Page MenuHomeSoftware Heritage

algos: Improve origin visit get latest visit status algorithm
ClosedPublic

Authored by ardumont on Jun 22 2020, 1:36 PM.

Details

Summary

Prior to this commit, this looked up only the latest visit information.

This now looks up across multiple visits up (from most recent visit to the
oldest) until one visit which match the criteria is elected.

Note: this also rename appropriately the tests defined in test_origin.py so we
can trigger them by name tagging.

This will also resolve appropriately the algos.snapshot.snapshot_get_latest
function (which uses this function underneath).

Test Plan

tox

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13003
Build 19817: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 19816: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D3330 (id=11791)

Rebasing onto 041543df09...

Current branch diff-target is up to date.
Changes applied before test
commit f406ce16a5fc4ab7d87081f41860efcc08bca60b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jun 22 13:13:35 2020 +0200

    test_origin: Rename appropriately tests
    
    So one can trigger tests separately by name tagging.

commit 1082c3960311e1849206cb7a62c14d34b80584bb
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jun 22 13:34:25 2020 +0200

    algos: Improve origin visit get latest visit status algorithm
    
    Prior to this commit, this looked up only the latest visit information.
    
    This now looks up across multiple visits up (from most recent visit to the
    oldest) until one visit which match the criteria is elected.

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

  • Clarify docstring (hopefully)
  • Drop unneeded comment

Build is green

Patch application report for D3330 (id=11795)

Rebasing onto 041543df09...

Current branch diff-target is up to date.
Changes applied before test
commit 2d497ff07cd4f9186a7c8404da93e984569fa6a1
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jun 22 13:13:35 2020 +0200

    test_origin: Rename appropriately tests
    
    So one can trigger tests separately by name tagging.

commit e9f455449c4958992fda2ea21095c03345786dbd
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Jun 22 13:34:25 2020 +0200

    algos: Improve origin visit get latest visit status algorithm
    
    Prior to this commit, this looked up only the latest visit information.
    
    This now looks up across multiple visits up (from most recent visit to the
    oldest) until one visit which match the criteria is elected.

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

This revision is now accepted and ready to land.Jun 22 2020, 3:37 PM