-
Notifications
You must be signed in to change notification settings - Fork 350
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 bugs in circular reference detection #1080
Conversation
Thanks for making a pull request to Elyra! To try out this branch on binder, follow this link: |
@bourdakos1 while you are at it, does it make sense to start decoupling the validation code from the widget and start thinking how it would change its behavior when different runtimes are selected (see #870). And these are definitely different/new prs. |
@lresende I've already decoupled validation from the widget in my large PR so that will come eventually. The behavior in the large PR is that it always performs cycle checks no matter the runtime, but then all other checks come from the node schema. So for the most part the validation is decided by the node, not the runtime. However, the runtime plugin decides what nodes to serve and could modify the schema to have different checks. I think "running locally" is a special case and could be part of the node schema. for example instead of:
We could have something like:
|
// ▲ │ | ||
// ╰────l9────╯ | ||
{ | ||
it: 'should handle long forks', |
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.
for the algorithm, what is the difference between this scenario and the one described on the test below?
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.
When the algorithm gets to node C
it either traverses down l2
or l4
first depending on the order of the links, this just checks that it doesn't matter which it traverses first
Good catch! +1 on all of Luciano's comments (especially placement of spec file) but otherwise this is a good addition. (I'll approve when you finish up adding those changes) |
There were a few cases with the old cycle detection algorithm that would cause it to infinitely recurse. This PR instead uses a loop to make it easier to timeout on long checks or an unforeseen infinite loop. I also added some tests to check for some common cycle patterns and tests for where the previous algorithm was failing.
Developer's Certificate of Origin 1.1