Page MenuHomeSoftware Heritage

algos: Improve origin visit get latest visit status algorithm
ClosedPublic

Authored by ardumont on Mon, Jun 22, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Mon, Jun 22, 1:36 PM
ardumont edited the summary of this revision. (Show Details)Mon, Jun 22, 1:37 PM

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.

ardumont updated this revision to Diff 11795.Mon, Jun 22, 2:39 PM
  • Clarify docstring (hopefully)
  • Drop unneeded comment
ardumont edited the summary of this revision. (Show Details)Mon, Jun 22, 2:43 PM

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.

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