Handle lineage graph cycles on the client#2506
Merged
phixMe merged 18 commits intoJun 9, 2023
Merged
Conversation
jlukenoff
commented
Jun 8, 2023
| getSelectedPaths = () => { | ||
| const paths = [] as Array<[string, string]> | ||
|
|
||
| // Sets used to detect cycles and break out of the recursive loop |
Contributor
Author
There was a problem hiding this comment.
TBD: How would this work if we had a really large cycle with many nodes/paths involved? Perhaps we still run the risk of blowing the stack with this as well.
Codecov Report
@@ Coverage Diff @@
## main #2506 +/- ##
=========================================
Coverage 83.80% 83.80%
Complexity 1233 1233
=========================================
Files 235 235
Lines 5625 5625
Branches 270 270
=========================================
Hits 4714 4714
Misses 767 767
Partials 144 144 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Contributor
Author
36e0f75 to
2898c28
Compare
Contributor
Author
jlukenoff
commented
Jun 8, 2023
phixMe
reviewed
Jun 8, 2023
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
89d811a to
cf129c3
Compare
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
jlukenoff
commented
Jun 8, 2023
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
Contributor
Author
|
Updated the tests and validated that they fail if I remove my recursive base case. @phixMe lmk if you have any other tests you think we should add to this. |
Xavier-Cliquennois
pushed a commit
to Xavier-Cliquennois/marquez
that referenced
this pull request
Jul 26, 2023
* init Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * repro Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * remove log lines Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * formatting Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * cleanup Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Create a smaller cycle Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * remove stub metadata Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Test draft Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * try stubbing some methods Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Test rendering component Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * test without mounting Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Formatting Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Remove unnecessary types Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Revert new module installations Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * oops Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Add a test for success Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * dont use ternary Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * improve path checking Signed-off-by: John Lukenoff <johnlukenoff@asana.com> --------- Signed-off-by: John Lukenoff <johnlukenoff@asana.com> Signed-off-by: Xavier-Cliquennois <xavier.cliquennois@wearegraphite.io>
jonathanpmoraes
referenced
this pull request
in nubank/NuMarquez
Feb 6, 2025
* init Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * repro Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * remove log lines Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * formatting Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * cleanup Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Create a smaller cycle Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * remove stub metadata Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Test draft Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * try stubbing some methods Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Test rendering component Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * test without mounting Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Formatting Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Remove unnecessary types Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Revert new module installations Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * oops Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * Add a test for success Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * dont use ternary Signed-off-by: John Lukenoff <johnlukenoff@asana.com> * improve path checking Signed-off-by: John Lukenoff <johnlukenoff@asana.com> --------- Signed-off-by: John Lukenoff <johnlukenoff@asana.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Problem
Currently we blow the stack if there is a cycle in the lineage graph.
Closes: #2410
Solution
Memoize the nodes that have been visited so far and only call the recursive function if the node has not yet been visited.
One-line summary:
Checklist
CHANGELOG.md(Depending on the change, this may not be necessary)..sqldatabase schema migration according to Flyway's naming convention (if relevant)