-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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(Switch Node): Maintain output connections #11162
fix(Switch Node): Maintain output connections #11162
Conversation
…switch-node-adding-routing-rule-reconnects-fallback-route
…switch-node-adding-routing-rule-reconnects-fallback-route
…switch-node-adding-routing-rule-reconnects-fallback-route
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.
I tested locally and on test instance, the only issue is when you add a new rule and create a new connection then reorder the new output doesn't maintain its connection
on test instance it works once I save the workflow
locally I had to save and refresh the page to get it to work
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.
Found a bug when the workflow is not saved.
In general I think it's an OK solution for the Switch node, but it would be great if connections were saved by ID instead of by index to avoid all this complexity. But not clear to me how to do it without a breaking change.
I think you could have similar bugs in other nodes with dynamic outputs such as the Webhook node.
…switch-node-adding-routing-rule-reconnects-fallback-route
…switch-node-adding-routing-rule-reconnects-fallback-route
|
n8n Run #7843
Run Properties:
|
Project |
n8n
|
Branch Review |
node-1669-switch-node-adding-routing-rule-reconnects-fallback-route
|
Run status |
Passed #7843
|
Run duration | 04m 28s |
Commit |
8fc77cc794: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 michael-radency 🗃️ e2e/*
|
Committer | Michael Kret |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
2
|
Pending |
0
|
Skipped |
0
|
Passing |
470
|
View all changes introduced in this branch ↗︎ |
|
…switch-node-adding-routing-rule-reconnects-fallback-route
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
…switch-node-adding-routing-rule-reconnects-fallback-route
✅ All Cypress E2E specs passed |
Got released with |
Summary
maintain connection on re-order
remove connection if rule for this connection was removed
if fallback set to extra preserve connected node and do not attach it to added rule output
if using expression for setting number of outputs trim connections if their number was reduced
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-1669/switch-node-adding-routing-rule-reconnects-fallback-route
fixes #11587