node-red / node-red

Low-code programming for event-driven applications
http://nodered.org
Apache License 2.0
18.93k stars 3.31k forks source link

Include rewired nodes when calculating Modified Flows stop list #4754

Closed knolleary closed 2 weeks ago

knolleary commented 2 weeks ago

Fixes #4752

This adds 'rewired' nodes to the list that get stopped on Modified Flows type deploys.

When testing locally, I found some other odd behaviours caused by not including this list of nodes. For example:

Starting with:

[A] -> [B] -> [C]

then deleting the wire between B/C:

[A] -> [B]    [C]

Caused the runtime to restart nodes A and C, but not B (as B was considered 'rewired' whereas A and C were considered 'linked'). That's just wrong.

Makes sense to restart anything and everything that has been touched by a modification.

GogoVega commented 2 weeks ago

Another question from the author that also bothers me is why this mode doesn't restart all nodes in that flow? I mean that's the description of this mode. Because it's the same as Modified Nodes mode (not from a code point of view). Unless the description is not correct?

knolleary commented 2 weeks ago

Depends what you mean by 'flow'. Modified Flow means any nodes that have changed and any nodes that are connected to them. It does not mean Flow as in the entire tab in the editor.

GogoVega commented 2 weeks ago

Thanks, and for Modified Nodes? I'll have to find a more appropriate translation 🤔