Deploy on modified nodes does not get triggered [bug?]

Simple example

When moving either node, the deploy button becomes available, but the inject is not triggered when deploying.

I noticed this when creating a flow with lots of link in/out nodes, where no triggering happened on the inject nodes. ie, keep the flow and add link nodes and deploy, no trigger

NR v2.0.6
njs v14.17.6
npm 6.14.15

Could be wrong, I haven't looked at that part of the core but I'm pretty sure node x/y movement does not recreate the node so the inject doesn't become reinitialised and therefore does not trigger.

I imagine this is a deliberate under the hood feature as it is only a visual/layout change.

Ps, I assume you are using "node deploy" method (not full or flow deploy)

I use modified flows. adding link nodes are modifications I would think ?

Screenshot 2021-09-18 at 13.26.11

Ah ok, so that is different. I don't know what the design/expectation is in this instance. One for Nick or Dave me thinks.

In my flow i use 2 subflows that are attached to eachother, it only triggers the ones that are attached to eachother, other nodes/subflows don't get triggered, very strange.

The use of the word 'flows' is slightly misleading.

In this context it means any nodes that are wired to anything that has changed (not simply moved).

It does not mean any nodes in the same tab (which, yes, we also refer to as a flow).

I don't think the code takes into account the 'virtual' connection between link nodes when identifying the connected nodes.

This sounds like "modified nodes" option.

To give a practical example, i need to collect data from all the nodes on the flow, when adding a new node, (re)join them all into a single array/object upon deploy. Is this possble ?

If all the nodes are wired together (without link nodes), then Modified flows will do it as long as one of the connected nodes has been changed (not just moved).

If they are not connected, or use link nodes, then you'll need to do a Full Deploy to ensure everything is restarted.

If all the nodes are wired together (without link nodes)

This also means adjacent nodes that are connected to link nodes ?
I am mainly working with subflows and link nodes on this flow. When removing a subflow node, the rest are not triggered either.

Is it a design choice to make link nodes behave differently ? They virtually connect nodes together, should it not validate as a flow modification?

Subflows seem to follow the same pattern as the link nodes.

Example subflow; inject node -> output and have itself inject once.
Add it to a flow, connect a debug node, deploy modified flows.
Copy the nodes and deploy again, only the last one emits msg.payload

I think it was simply overlooked when the link nodes were added. We should take a proper look at it.

That is odd. Any changes to the internals of a subflow should mark all instances as changed and the usual logic applies to identifying what flows have been modified. If you have a simple recreate for it, please raise an issue with details.

I did some testing in clean lxc containers and I can reproduce it on both 1.3.7 and 2.0.6, created issue 3147