This repository was archived by the owner on Jun 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 361
This repository was archived by the owner on Jun 6, 2025. It is now read-only.
GetWalks does not work with FederatedOperations #3054
Copy link
Copy link
Closed
Description
Describe the bug
Since 2.0.0, we prefer users to use a FederatedOperation rather than the deprecated graphIds option. However, this does not work as an operation within GetWalks. This is problematic as it is undocumented and relies on users using a deprecated option.
To Reproduce
Steps to reproduce the behaviour:
GetWalks(input=1, operations=[FederatedOperation(operation=GetElements(), graphIds=[A])])
- This operation will not build
Expected behaviour
It should work fine with both the graphIds option and a FederatedOperation.
Stack trace and errors
ConnectionError: HTTP error 500 : {"statusCode":500,"status":"Internal Server Error","simpleMessage":"Operation chain is invalid. Validation errors: \nNo hops were provided. A hop is a GetElements operation that selects at least 1 edge group."}
Additional context
Looking at the stack trace, this seems related to this check inside the GetWalks validation:
Gaffer/core/operation/src/main/java/uk/gov/gchq/gaffer/operation/impl/GetWalks.java
Lines 163 to 174 in dde023f
if (op instanceof While) { | |
hops += (((While) op).getMaxRepeats() * getNumberOfGetEdgeOperations(((While) op).getOperation())); | |
} else if (op instanceof Operations) { | |
hops += getNumberOfGetEdgeOperations(((Operations<?>) op).getOperations()); | |
} else if (op instanceof GetElements) { | |
final GetElements getElements = (GetElements) op; | |
if (null != getElements.getView() && getElements.getView().hasEdges()) { | |
hops += 1; | |
} | |
} | |
return hops; | |
} |
Platform
- Gaffer Version: [e.g. 2.0.0]
GCHQDev404
Metadata
Metadata
Labels
bugConfirmed or suspected bugConfirmed or suspected bug