-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(gms): Fixes delete references for single relationship aspects #7211
fix(gms): Fixes delete references for single relationship aspects #7211
Conversation
Closes #5992 |
if (!ingestProposalResult.isDidUpdate()) { | ||
log.error("Failed to ingest aspect with references removed. Before {}, after: null, please check MCP processor" | ||
RollbackResult rollbackResult = _entityService.deleteAspect(urn.toString(), aspectName, new HashMap<>(), true); | ||
assert rollbackResult != null; |
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.
Assert statement should get wrapped into below conditional and proposal is no longer used except for the error message which is invalid as it's not being used.
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.
Good catch, please take another look.
@@ -403,6 +396,7 @@ private enum DeleteEntityServiceErrorReason { | |||
ENTITY_SERVICE_ASPECT_NOT_FOUND, | |||
ENTITY_REGISTRY_SPEC_NOT_FOUND, | |||
MCP_PROCESSOR_FAILED, | |||
ASPECT_DELETE_FAILED, |
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.
Amazing!
import static org.testng.AssertJUnit.*; | ||
|
||
|
||
public class DeleteEntityServiceTest { |
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.
scary if we did not have a class test for this previously :o
…tahub-project#7211) Deleting Container references were broken. This PR fixes that. Root cause is datahub-project#5248 which changed the MCP change type to DELETE for cases where an aspect after getting the reference removed was no longer valid. We do not support DELETE operations for MCPs. The solution is then to execute EntityService#deleteAspect rather than emit a sync MCP. A regression test was made to prevent this from happening again. Co-authored-by: John Joyce <[email protected]>
…tahub-project#7211) Deleting Container references were broken. This PR fixes that. Root cause is datahub-project#5248 which changed the MCP change type to DELETE for cases where an aspect after getting the reference removed was no longer valid. We do not support DELETE operations for MCPs. The solution is then to execute EntityService#deleteAspect rather than emit a sync MCP. A regression test was made to prevent this from happening again. Co-authored-by: John Joyce <[email protected]>
Deleting Container references were broken. This PR fixes that.
Root cause is #5248 which changed the MCP change type to DELETE for cases where an aspect after getting the reference removed was no longer valid. We do not support DELETE operations for MCPs.
The solution is then to execute EntityService#deleteAspect rather than emit a sync MCP.
A regression test was made to prevent this from happening again.
Checklist