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

**URL:** <https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200>\
**Category:** Core Development\
**Created:** [18 September 2021 11:19 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200 "2021-09-18T11:19:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [18 September 2021 11:19 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/1 "2021-09-18T11:19:40Z")

</div>

Simple example

 ![Screenshot 2021-09-18 at 13.16.47](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/7/9770bccb536e5f6d0764be93bce95087ee345ec0.jpeg)

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

 ![Screenshot 2021-09-18 at 13.18.57](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/2/325b48a903fa4dc49a0880bd487aa335274db235.jpeg)

NR v2.0.6  
njs v14.17.6  
npm 6.14.15

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 September 2021 11:23 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/2 "2021-09-18T11:23:29Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [18 September 2021 11:27 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/3 "2021-09-18T11:27:08Z")

</div>

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

![Screenshot 2021-09-18 at 13.26.11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/c/ccc0f9e0e7d67c84964dc703acdd2a4af330a350.jpeg)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 September 2021 11:28 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/4 "2021-09-18T11:28:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [18 September 2021 11:33 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/5 "2021-09-18T11:33:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [18 September 2021 12:01 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/6 "2021-09-18T12:01:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [18 September 2021 12:08 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/7 "2021-09-18T12:08:25Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [18 September 2021 12:13 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/8 "2021-09-18T12:13:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [18 September 2021 12:22 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/9 "2021-09-18T12:22:43Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [18 September 2021 12:38 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/10 "2021-09-18T12:38:32Z")

</div>

> [@bakman2](#):
>
> Is it a design choice to make link nodes behave differently ? They virtually connect nodes together, should it not validate as a flow modification?

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

> [@bakman2](#):
>
> 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

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.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [19 September 2021 07:09 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/11 "2021-09-19T07:09:02Z")

</div>

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](https://github.com/node-red/node-red/issues/3147)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 November 2021 07:09 UTC](https://discourse.nodered.org/t/deploy-on-modified-nodes-does-not-get-triggered-bug/51200/12 "2021-11-18T07:09:21Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
