Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

GetWalks does not work with FederatedOperations #3054

@t92549

Description

@t92549

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:

  1. GetWalks(input=1, operations=[FederatedOperation(operation=GetElements(), graphIds=[A])])
  2. 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:

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]

Metadata

Metadata

Labels

bugConfirmed or suspected bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions