-
Notifications
You must be signed in to change notification settings - Fork 120
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
Prevent duplicate permitted next nodes #2360
Conversation
It turns out there are a couple of duplicates in the existing flows - I'm going to add a couple of commits to this PR to remove them. |
I've now pushed the two extra commits to remove the duplicates and updated the PR description to explain the removal of the duplicates. |
As far as I can tell, the
Having said all that, it certainly does seems more correct for |
@chrisroos: Thanks. You're right that the |
Rebasing against master and force-pushing in preparation for merging. |
I think this makes the intent of the tests clearer. Also I'm planning on adding more tests for `permitted_next_nodes` in subsequent commits and I think this will be easier with these nested contexts in place.
* It's possible for a developer to accidentally include the same node key in the list of permitted next nodes multiple times. However, from a visualisation point-of-view, we don't want the same node to appear more than once. * Likewise, when auto-detecting permitted next nodes, it's legitimate for a `next_node` block to have multiple paths which return the same next node key. But we still don't want the same node to appear more than once in the visualisation.
3f394e2
to
b37118d
Compare
…xt-nodes Prevent duplicate permitted next nodes
Manually specified permitted next nodes
It's possible for a developer to accidentally include the same node key in the list of permitted next nodes multiple times. However, from a visualisation point-of-view, we don't want the same node to appear more than once. There were a couple of duplicates in the existing flows and so I've included commits to remove them.
Automatically detected permitted next nodes
Likewise, when auto-detecting permitted next nodes, it's legitimate for a
next_node
block to have multiple execution paths which return the same next node key. But we still don't want the same node to appear more than once in the visualisation. I've been working on converting all the existing flows to use the auto-detect mechanism and I know that (without this fix) some of them would indeed generate duplicates like this.Expected changes
None