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 a too much recursion error when column lineage is highlighted #8207

Conversation

Masterchen09
Copy link
Contributor

This PR fixes a "too much recursion" error (might be reported differently in different browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Too_much_recursion) which occurs when the lineage of a column is highlighted when hovering over or selecting a column in the lineage view. The error only occurs when there is a circle in the lineage of a field (i.e. a field depends directly or indirectly on itself).

Usually it makes no sense that a field depends on itself if you think of SQL views, but in relation with data pipelines this could happen and could also make sense then (in our case it's within the SAP BW, where I am currently working on a custom source).

The solution is simply to check whether we have seen an edge already in our list of edges and if this is the case to not proceed with this edge because we already have seen it and therefore we also already have seen the subsequent edges (otherwise we would not see the edge a second time when we check it).

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

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.

nice thank you for this!

@chriscollins3456 chriscollins3456 merged commit 64697eb into datahub-project:master Jul 10, 2023
34 checks passed
@Masterchen09 Masterchen09 deleted the fix-highlight-column-lineage-recursion branch July 10, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community 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

3 participants