-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gh-3018: Migrate GraphConfig code out of Graph #3050
Gh-3018: Migrate GraphConfig code out of Graph #3050
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there are a few bits of logic which have changed, could that be explained? It's difficult to tell because of how GitHub has formatted the diff.
...v/gchq/gaffer/operation/export/resultcache/handler/ExportToGafferResultCacheHandlerTest.java
Show resolved
Hide resolved
core/graph/src/main/java/uk/gov/gchq/gaffer/graph/GraphConfig.java
Outdated
Show resolved
Hide resolved
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #3050 +/- ##
=============================================
+ Coverage 65.36% 65.39% +0.03%
+ Complexity 2646 2643 -3
=============================================
Files 907 909 +2
Lines 28981 28993 +12
Branches 3249 3235 -14
=============================================
+ Hits 18942 18960 +18
+ Misses 8581 8579 -2
+ Partials 1458 1454 -4
☔ View full report in Codecov by Sentry. |
core/graph/src/main/java/uk/gov/gchq/gaffer/graph/GraphConfig.java
Outdated
Show resolved
Hide resolved
core/graph/src/main/java/uk/gov/gchq/gaffer/graph/GraphConfig.java
Outdated
Show resolved
Hide resolved
@tb06904 Really nice changes and refactoring! A lot easier to follow what is happening now and the logging is improved |
…java Co-authored-by: t92549 <[email protected]>
…aphconfig-code-out-of-graph
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So In the past I've lightly tried to sort out Graph.Builder() but it wasn't a good choice while also adding extra functionality so I revert it out I think twice. This seems like a good refactor. The logic which I care about seems to be retained and function equivelently. I just have a couple points I'd like you to answer.
...ted-store/src/test/java/uk/gov/gchq/gaffer/federatedstore/FederatedStoreCacheSuffixTest.java
Show resolved
Hide resolved
core/graph/src/test/java/uk/gov/gchq/gaffer/graph/hook/UpdateGraphHookTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to these files appear to be out of scope of the original issue:
GraphFactoryTest.java
ElementUtil.java
ExportToGafferResultCacheHandlerTest.java
GetGafferResultCacheExportHandlerTest.java
Fair bit of refactoring to the Graph and GraphConfig classes this lead to some tweaks to testing as it highlighted some bugs.
As an overview the following methods have been altered:
Graph.java
updateSchema()
-> broken intoapplyParentSchemas()
andloadSchemaFromJson()
and refactored.updateStore()
-> broken intoapplyParentStoreProperties()
andinitStore()
and refactored.updateView()
-> migrated toGraphConfig.java
and renamedinitView()
.validateAndUpdateGetFromCacheHook()
-> migrated toGraphConfig.java
and heavily refactored. During refactoring a slight oddity was found that I couldn't get to the bottom of where graph hook seems to always have to be added to index 0 of the list of hooks else tests fail. See line 229 inGraphConfig.java
.GraphConfig.java
Other
Related issue