gchq / Gaffer

A large-scale entity and relation database supporting aggregation of properties
Apache License 2.0
1.77k stars 350 forks source link

Gh-3149 Add depth limit to NamedOperationResolver #3174

Closed tb06904 closed 6 months ago

tb06904 commented 6 months ago

Adds a configurable depth limit to the NamedOperatationResolver graph hook so that nested named operations are only resolved to a certain depth (set to 3 by default).

This also tidies and refactors the class to simplify the recursion and logic so all NamedOperations will be resolved to their respective OperationChains, with extended debug and logging for if recursion limit is hit so user is aware. If the limit is hit, the NamedOperation is simply left as its class in the chain.

Related issue

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 91.17647% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 66.72%. Comparing base (6213159) to head (abf689a).

Files Patch % Lines
...gchq/gaffer/graph/hook/NamedOperationResolver.java 91.17% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3174 +/- ## ========================================== Coverage 66.71% 66.72% Complexity 2557 2557 ========================================== Files 907 907 Lines 29063 29060 -3 Branches 3239 3243 +4 ========================================== Hits 19390 19390 + Misses 8239 8236 -3 Partials 1434 1434 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.