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

Ensure topological sort before deletion #2169

Merged
merged 2 commits into from
Mar 6, 2025

Conversation

glopesdev
Copy link
Member

@glopesdev glopesdev commented Mar 6, 2025

The semantics of the node deletion action allow preserving connected paths whenever possible. Still, when a node receives multiple input arguments, it becomes ambiguous to decide which path should be continued.

However, this problem becomes again decidable if we also delete all the multiple input arguments in the same operation. To leverage this, we need to ensure the set of deleted nodes is topologically sorted, such that we delete all upstream nodes before downstream merge nodes.

Fixes #1523

To increase the likelihood of preserving connected paths, it is always
preferable to delete upstream nodes first before deleting merge nodes.
@glopesdev glopesdev added the fix Pull request that fixes an issue label Mar 6, 2025
@glopesdev glopesdev added this to the 2.9 milestone Mar 6, 2025
@glopesdev glopesdev requested a review from a team March 6, 2025 15:44
@glopesdev glopesdev merged commit d8e3bad into bonsai-rx:main Mar 6, 2025
10 checks passed
@glopesdev glopesdev deleted the issue-1523 branch March 6, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull request that fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting node sub-graph breaks bridge connection unexpectedly
1 participant