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

fix(ui) Fix lineage graph rendering with duplicate nodes #6480

Conversation

chriscollins3456
Copy link
Collaborator

@chriscollins3456 chriscollins3456 commented Nov 17, 2022

We were seeing an issue where users would drag a node on the lineage viz graph and arrows would be replicated and it looked real bad. This was happening when siblings would have the same lineage as each other, so we would render duplicate nodes causing the viz to get all wacky. This filters out duplicates when combining sibling lineage.

Also adds a safety measure on the frontend as well to ensure all edges have unique keys just in case someone wants duplicate edges on their lineage graph (saw this in OSS slack once). The arrows were bugging out because the keys were not all unique.

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 Nov 17, 2022
@github-actions
Copy link

github-actions bot commented Nov 17, 2022

Unit Test Results (build & test)

621 tests   - 1   617 ✔️  - 1   15m 49s ⏱️ -24s
157 suites ±0       4 💤 ±0 
157 files   ±0       0 ±0 

Results for commit 91327f7. ± Comparison against base commit d35e327.

This pull request removes 7 and adds 6 tests. Note that renamed tests count towards both.
com.datahub.authorization.RoleServiceTest ‑ testAssignRoleToActorDoesNotExist
com.datahub.authorization.RoleServiceTest ‑ testAssignRoleToActorExists
com.datahub.authorization.RoleServiceTest ‑ testRoleDoesNotExist
com.datahub.authorization.RoleServiceTest ‑ testRoleExists
com.linkedin.datahub.graphql.resolvers.role.BatchAssignRoleResolverTest ‑ testAllActorsExist
com.linkedin.datahub.graphql.resolvers.role.BatchAssignRoleResolverTest ‑ testRoleDoesNotExistFails
com.linkedin.datahub.graphql.resolvers.role.BatchAssignRoleResolverTest ‑ testSomeActorsExist
com.datahub.authorization.RoleServiceTest ‑ testAssignNullRoleToActorAllActorsExist
com.datahub.authorization.RoleServiceTest ‑ testBatchAssignRoleAllActorsExist
com.datahub.authorization.RoleServiceTest ‑ testBatchAssignRoleNoActorExists
com.datahub.authorization.RoleServiceTest ‑ testBatchAssignRoleSomeActorExists
com.linkedin.datahub.graphql.resolvers.role.BatchAssignRoleResolverTest ‑ testNotNullRole
com.linkedin.datahub.graphql.resolvers.role.BatchAssignRoleResolverTest ‑ testNullRole

♻️ This comment has been updated with latest results.

existingResult != null ? existingResult.getRelationships().stream() : ImmutableList.<LineageRelationship>of().stream())
.collect(Collectors.toSet()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Confused about why this was even here to begin with

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added this earlier thinking it would help remove duplicates but dummy me it obviously does not with objects. it only worked when I manually duplicated objects that I passed into this fxn.

basically I was a bone-head and reverted this change to what it always was

Copy link
Collaborator

Choose a reason for hiding this comment

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

ohh ! got it

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! Thanks Chris

@chriscollins3456 chriscollins3456 merged commit 970e9f0 into datahub-project:master Nov 18, 2022
cccs-Dustin pushed a commit to CybercentreCanada/datahub that referenced this pull request Feb 1, 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.

None yet

2 participants