Page MenuHomeSoftware Heritage

Move date calculation for invalidated frontiers to the revision processing module
ClosedPublic

Authored by aeviso on Dec 20 2021, 12:24 PM.

Details

Summary

Up to now, when a frontier was invalidated, the isochrone graph building function
was updating its associated max date to match that of the revision being processed.
This is now done in the revision processing module, where it is clearer when and
why the update is required.

Depends on D6846.

Diff Detail

Repository
rDPROV Provenance database
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D6864 (id=24874)

Could not rebase; Attempt merge onto bef0ab385d...

Updating bef0ab3..a2b7570
Fast-forward
 swh/provenance/graph.py                            | 29 +++-----------------
 swh/provenance/revision.py                         |  4 +--
 .../tests/data/graphs_cmdbts2_lower_1.yaml         | 31 ----------------------
 .../tests/data/graphs_cmdbts2_lower_2.yaml         | 31 ----------------------
 .../tests/data/graphs_cmdbts2_upper_1.yaml         | 27 -------------------
 .../tests/data/graphs_cmdbts2_upper_2.yaml         | 26 ------------------
 .../tests/data/graphs_out-of-order_lower_1.yaml    | 19 +++----------
 swh/provenance/tests/test_isochrone_graph.py       |  1 -
 8 files changed, 10 insertions(+), 158 deletions(-)
Changes applied before test
commit a2b7570ed913261443a36dfda5ab54828981ad3c
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Mon Dec 20 12:19:19 2021 +0100

    Move date calculation for invalidated frontiers to the revision processing module
    
    Up to now, when a frontier was invalidated, the isochrone graph building function
    was updating its associated max date to match that of the revision being processed.
    This is now done in the revision processing module, where it is clearer when and
    why the update is required.

commit 1926b9d575fb7c406f02fea52f03cb9ab0ef5b70
Author: Andres Ezequiel Viso <aeviso@softwareheritage.org>
Date:   Wed Dec 15 16:43:02 2021 +0100

    Clean up code after frontier redefinition from previous commit
    
    The `known` flag from `IsochroneNode` is no longer being used, and
    `maxdate` calculation can thus be simplified. Isochrone graph related
    tests are updated as well to reflect the changes.

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

olasd added a subscriber: olasd.

Looks fine to me, thanks

This revision is now accepted and ready to land.Dec 21 2021, 3:50 PM