Skip to content
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

feat(ui): allow removing parentNodes of Glossary Nodes and Glossary Terms #7135

Merged
merged 3 commits into from
Jan 26, 2023

Conversation

ngamanda
Copy link
Contributor

image

  • Update UpdateParentNodeInput to use optional parentNode field
  • Update UpdateParentNodeResolver to accept empty parentNode field
  • UI Changes: remove checks for disabling forms when there's no parentNode and postfix (Optional) text to the field

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Jan 25, 2023
Copy link
Collaborator

@chriscollins3456 chriscollins3456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! thanks so much Amanda :)

I have one quick graphql doc edit and then I think this PR is ready to roll

@@ -77,7 +82,12 @@ private Boolean updateGlossaryTermParentNode(
// If there is no info aspect for the term already, then we should throw since the model also requires a name.
throw new IllegalArgumentException("Info for this Glossary Term does not yet exist!");
}
glossaryTermInfo.setParentNode(parentNodeUrn);

if (parentNodeUrn != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@@ -7254,9 +7254,9 @@ Input for updating the parent node of a resource. Currently only GlossaryNodes a
"""
input UpdateParentNodeInput {
"""
The new parent node urn
The new parent node urn. If parentNode is null, this will remove the parent from this entity
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

return CompletableFuture.supplyAsync(() -> {
Urn currentParentUrn = GlossaryUtils.getParentUrn(targetUrn, context, _entityClient);
// need to be able to manage current parent node and new parent node
if (GlossaryUtils.canManageChildrenEntities(context, currentParentUrn, _entityClient)
&& GlossaryUtils.canManageChildrenEntities(context, parentNodeUrn, _entityClient)) {
&& GlossaryUtils.canManageChildrenEntities(context, finalParentNodeUrn, _entityClient)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it okay that final Parent Node is null going into this method?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the case is covered!

Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.- Thank you!!!

@jjoyce0510
Copy link
Collaborator

Will merge once CI is all green :)

@jjoyce0510 jjoyce0510 merged commit 7ded442 into datahub-project:master Jan 26, 2023
ericyomi pushed a commit to ericyomi/datahub that referenced this pull request Feb 8, 2023
oleg-ruban pushed a commit to RChygir/datahub that referenced this pull request Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants