Page MenuHomeSoftware Heritage

Add field 'max_matching_nodes' to TraversalRequest
ClosedPublic

Authored by vlorentz on Fri, Sep 9, 3:41 PM.

Details

Summary

This allows limiting the number returned by a leaves traversal
request.

Resolves T4522.

Depends on D8547.

Diff Detail

Repository
rDGRPH Compressed graph representation
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 D8438 (id=30417)

Rebasing onto 071271daa4...

Current branch diff-target is up to date.
Changes applied before test
commit f5605780f717c7de4291a972250dc5c5519762e1
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 9 15:40:39 2022 +0200

    Add field 'max_matching_nodes' to TraversalRequest
    
    This allows limiting the number returned by a leaves traversal
    request.

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

remove changes not meant to be committed yet

Build was aborted

Patch application report for D8438 (id=30419)

Rebasing onto 071271daa4...

Current branch diff-target is up to date.
Changes applied before test
commit 44f2b1fd38c55139ca59809d51f70e9c488b24b8
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 9 15:53:12 2022 +0200

    Add field 'max_matching_nodes' to TraversalRequest
    
    This allows limiting the number returned by a leaves traversal
    request.

Link to build: https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/229/
See console output for more information: https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/229/console

douardda added a subscriber: douardda.

lgtm but would it make sense to test cases with usage of this new option combined with other limiting params ({min,max}_depth and max_edges)?

This revision is now accepted and ready to land.Mon, Sep 12, 10:28 AM

It's really hard to test, because results are non-deterministic :/

Build is green

Patch application report for D8438 (id=30461)

Rebasing onto 7049b584c2...

Current branch diff-target is up to date.
Changes applied before test
commit b54abaddd950b89c66f97177659868397d0bcc68
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 9 15:53:12 2022 +0200

    Add field 'max_matching_nodes' to TraversalRequest
    
    This allows limiting the number returned by a leaves traversal
    request.

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

Build has FAILED

Patch application report for D8438 (id=30813)

Rebasing onto a426c1d038...

Current branch diff-target is up to date.
Changes applied before test
commit c9585be99ef981c3c3b0784a88ecd7d4f4a9d614
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 9 15:53:12 2022 +0200

    Add field 'max_matching_nodes' to TraversalRequest
    
    This allows limiting the number returned by a leaves traversal
    request.

Link to build: https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/242/
See console output for more information: https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/242/console

Build has FAILED

Patch application report for D8438 (id=30816)

Could not rebase; Attempt merge onto a426c1d038...

Updating a426c1d..3372699
Fast-forward
 java/pom.xml                                       |   6 +
 .../org/softwareheritage/graph/rpc/Traversal.java  |  34 +-
 .../java/org/softwareheritage/graph/GraphTest.java |  29 ++
 .../softwareheritage/graph/rpc/CountEdgesTest.java |  25 ++
 .../softwareheritage/graph/rpc/CountNodesTest.java |  23 +
 .../graph/rpc/TraverseLeavesTest.java              |  43 +-
 proto/swhgraph.proto                               |   3 +
 requirements.txt                                   |   1 +
 swh/graph/grpc/swhgraph_pb2.py                     |  68 +--
 swh/graph/grpc/swhgraph_pb2.pyi                    | 481 +++++++++++----------
 10 files changed, 432 insertions(+), 281 deletions(-)
Changes applied before test
commit 337269942b12c1f8203e1a7e46538436dcd85f5b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 9 15:53:12 2022 +0200

    Add field 'max_matching_nodes' to TraversalRequest
    
    This allows limiting the number returned by a leaves traversal
    request.

commit 76b9820a75aba519c3667765bfa1bc145c55a342
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 27 13:50:34 2022 +0200

    Exclude protobuf 4.21.*
    
    It crashes when swhgraph_pb2.py is discovered by pytest.

Link to build: https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/245/
See console output for more information: https://jenkins.softwareheritage.org/job/DGRPH/job/tests-on-diff/245/console

Build is green

Patch application report for D8438 (id=30816)

Could not rebase; Attempt merge onto a426c1d038...

Updating a426c1d..3372699
Fast-forward
 java/pom.xml                                       |   6 +
 .../org/softwareheritage/graph/rpc/Traversal.java  |  34 +-
 .../java/org/softwareheritage/graph/GraphTest.java |  29 ++
 .../softwareheritage/graph/rpc/CountEdgesTest.java |  25 ++
 .../softwareheritage/graph/rpc/CountNodesTest.java |  23 +
 .../graph/rpc/TraverseLeavesTest.java              |  43 +-
 proto/swhgraph.proto                               |   3 +
 requirements.txt                                   |   1 +
 swh/graph/grpc/swhgraph_pb2.py                     |  68 +--
 swh/graph/grpc/swhgraph_pb2.pyi                    | 481 +++++++++++----------
 10 files changed, 432 insertions(+), 281 deletions(-)
Changes applied before test
commit 337269942b12c1f8203e1a7e46538436dcd85f5b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Sep 9 15:53:12 2022 +0200

    Add field 'max_matching_nodes' to TraversalRequest
    
    This allows limiting the number returned by a leaves traversal
    request.

commit 76b9820a75aba519c3667765bfa1bc145c55a342
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 27 13:50:34 2022 +0200

    Exclude protobuf 4.21.*
    
    It crashes when swhgraph_pb2.py is discovered by pytest.

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