-
Notifications
You must be signed in to change notification settings - Fork 358
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
MergeSchema is ignoring SchemaExceptions #3045
Comments
If the concatenate merge function is used for a schema instead, then I assume this bug will not be seen? |
@GCHQDeveloper314 Correct, but it will not merge the schemas. Pre-2.0, the schemas were merged. Forcing concatenation of the schemas is untested behaviour, it may effect how the other merge functions work when performing a GetElements for example |
GCHQDev404
added a commit
that referenced
this issue
Oct 27, 2023
GCHQDev404
added a commit
that referenced
this issue
Oct 27, 2023
…ceptions' into gh-3045-PR-changes
GCHQDev404
added a commit
that referenced
this issue
Nov 6, 2023
* tidy up and test * TypeDefinition Exception message improvements * Schema Exception message improvements * MergeSchema function context improvements. * MergeSchema error handling improvements. * MergeSchema error handling test changes. * checkstyle * PR requests * PR requests * PR requests * PR requests with issues (#3051) * PR requests with issues * PR requests * typo * findBugs changes. * spotless changes. * typo * PR request
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When the
MergeSchema
class applies theSchema.BaseBuilder.merge
function, it catchesSchemaException
s. This is because it will retry while ignoring vertex serialisers if the error is to do with vertex serialisers:Gaffer/store-implementation/federated-store/src/main/java/uk/gov/gchq/gaffer/federatedstore/util/MergeSchema.java
Lines 56 to 65 in e90fba0
However, if the
SchemaException
is unrelated to vertex serialisers, I would expect the exception to still be thrown:This is not the case.
Additional context
If you simply add this else block in, tests will start to fail. These tests are FederatedStoreVisibilityTest (issue: #1834) and FederatedStoreSchemaOverlapTest (issue: #2767). These tests were added as part of Gaffer 2 development to codify the new FederatedStore behaviour, however, we did not realise this behaviour was happening as a result of a bug.
Suggested fix
MergeSchema
should be fixed and extended to manage all types of SchemaException.When a SchemaException happens due to conflicting visibility property names, this can probably be intentionally ignored with a warning message.
When a SchemaException happens due to conflicting types for the same property in the same group across two subgraphs, things are more complicated. Perhaps, if the type definitions are the same the error can be ignored, and if not they can be de-duplicated.
This will likely need work on
Schema.BaseBuilder.validateSharedGroupsAreCompatible
The text was updated successfully, but these errors were encountered: