You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Introduce ScriptTrigger & CommandsTrigger for the Node plugin #320
Cannot invoke "java.util.Map.get(Object)" because "task" is null
at ScriptService.labels(...)
Reason
Triggers run before an execution exists, so RunContext has no task metadata.
Docker runner expects task labels; Process runner (used by Shell triggers) does not.
Question
Is it expected that Node triggers should also rely on Process.instance() (like Shell triggers), meaning Node must be available on the host?
Or is there a supported way to run Docker-based scripts from triggers in the current core?
Hi @idivanshu 👋 Did you try to simply remove .taskRunner(...)?
Else maybe we should (on plugin-script-shell too) add a taskRunner property like this also in ScriptTrigger and CommandsTrigger to let the user choose and override it at the call:
Hi @idivanshu 👋 Did you try to simply remove .taskRunner(...)?
Else maybe we should (on plugin-script-shell too) add a taskRunner property like this also in ScriptTrigger and CommandsTrigger to let the user choose and override it at the call:
@idivanshu, maybe lets use the Process runner, and add the docs that this Trigger required node to be available in the host path? cc @fdelbrayelle
I installed node in docker container manually and it worked actually. I will wrap up CommandTrigger and tests asap and then will raise the PR.
cc @MilosPaunovic
Tested on: 2026-03-10 Kestra version: EE standalone (develop) Plugin version:plugin-script-node-1.4.1-SNAPSHOT Build:./gradlew shadowJar — all submodule JARs deployed to ~/dev/plugins/
Summary
#
Flow ID
Type
Scenario
Result
1
node-script-trigger-exit0
node.ScriptTrigger
Script exits 0, condition exit 0
✅ PASS — trigger fires
2
node-script-trigger-vars
node.ScriptTrigger
Script outputs JSON, condition exit 0
✅ PASS — trigger fires
3
node-commands-trigger-exit0
node.CommandsTrigger
Single command, exit 0
✅ PASS — trigger fires
4
node-commands-trigger-multi
node.CommandsTrigger
Multiple commands in list
❌ BUG — deserialization error
5
node-script-trigger-nonmatch
node.ScriptTrigger
exit 0 but condition exit 1
✅ PASS — trigger correctly does NOT fire
6
node-script-task
node.Script (task)
Non-regression: script task
✅ PASS — SUCCESS
7
node-commands-task
node.Commands (task)
Non-regression: commands task
✅ PASS — SUCCESS
8
shell-script-trigger-exit0
shell.ScriptTrigger
Non-regression: shell trigger
✅ PASS — trigger fires
Result: 7/8 PASS, 1 BUG found
Bug Details — Flow 4: CommandsTrigger with multiple commands
Severity: Medium — affects multi-command usage of CommandsTrigger
When commands contains more than one item in the YAML list, the trigger fails with:
IllegalVariableEvaluationException: Cannot deserialize value of type java.lang.String
from Object value (token JsonToken.START_OBJECT)
at Property.deserialize() → Property.asList()
Root cause: The commands property is typed as Property<List<String>>. When the YAML list has multiple entries, Jackson wraps them in a way that Property.asList() cannot deserialize back to List<String>.
Single command works fine (Flow 3). The issue only manifests with 2+ commands.
Note: This same pattern works correctly in shell.CommandsTrigger, so the fix likely involves aligning the Node CommandsTrigger implementation with the Shell one.
Both io.kestra.plugin.scripts.node.ScriptTrigger and io.kestra.plugin.scripts.node.CommandsTrigger are broken.
In both cases the script or command runs and exits non-zero, but no execution is created. The scheduler immediately logs: No execution found, schedule is blocked since ...
The trigger never recovers. Every later poll repeats the same warning.
Activity
ScriptTrigger&CommandsTriggerfor each sub plugin #313idivanshu commentedon Jan 25, 2026
Can i take this up? Also here the node means node js or something else ?
fdelbrayelle commentedon Jan 26, 2026
Hi @idivanshu 👋 Yes it means Node JS, thanks!
idivanshu commentedon Jan 27, 2026
Hi @fdelbrayelle
While implementing Node ScriptTrigger / CommandsTrigger, I followed the Shell trigger reference from
#317
My code file - https://github.com/idivanshu/plugin-scripts/blob/main/plugin-script-node/src/main/java/io/kestra/plugin/scripts/node/ScriptTrigger.java
What works
Node tasks work fine with Docker when executed inside a flow:
What fails
Running the same logic from a trigger using Docker:
Results in:
Reason
Triggers run before an execution exists, so RunContext has no task metadata.
Docker runner expects task labels; Process runner (used by Shell triggers) does not.
Question
Is it expected that Node triggers should also rely on Process.instance() (like Shell triggers), meaning Node must be available on the host?
Or is there a supported way to run Docker-based scripts from triggers in the current core?
Thanks 🙏
MilosPaunovic commentedon Jan 29, 2026
Hey @idivanshu, are there any updates on this?
idivanshu commentedon Jan 29, 2026
fdelbrayelle commentedon Jan 29, 2026
Hi @idivanshu 👋 Did you try to simply remove
.taskRunner(...)?Else maybe we should (on plugin-script-shell too) add a taskRunner property like this also in
ScriptTriggerandCommandsTriggerto let the user choose and override it at the call:idivanshu commentedon Jan 29, 2026
Observations
Case 1: ScriptTrigger with explicit Docker taskRunner
Case 2: ScriptTrigger without .taskRunner(...)
Malaydewangan09 commentedon Jan 30, 2026
@idivanshu, could you try with
.taskRunner(Docker.instance())?3 remaining items
idivanshu commentedon Feb 2, 2026
I installed node in docker container manually and it worked actually. I will wrap up CommandTrigger and tests asap and then will raise the PR.
cc @MilosPaunovic
fdelbrayelle commentedon Mar 10, 2026
QA Report — Branch
idivanshu-node-triggersTested on: 2026-03-10
Kestra version: EE standalone (develop)
Plugin version:
plugin-script-node-1.4.1-SNAPSHOTBuild:
./gradlew shadowJar— all submodule JARs deployed to~/dev/plugins/Summary
node-script-trigger-exit0node.ScriptTriggerexit 0node-script-trigger-varsnode.ScriptTriggerexit 0node-commands-trigger-exit0node.CommandsTriggernode-commands-trigger-multinode.CommandsTriggernode-script-trigger-nonmatchnode.ScriptTriggerexit 1node-script-tasknode.Script(task)node-commands-tasknode.Commands(task)shell-script-trigger-exit0shell.ScriptTriggerResult: 7/8 PASS, 1 BUG found
Bug Details — Flow 4:
CommandsTriggerwith multiple commandsSeverity: Medium — affects multi-command usage of
CommandsTriggerWhen
commandscontains more than one item in the YAML list, the trigger fails with:Root cause: The
commandsproperty is typed asProperty<List<String>>. When the YAML list has multiple entries, Jackson wraps them in a way thatProperty.asList()cannot deserialize back toList<String>.Single command works fine (Flow 3). The issue only manifests with 2+ commands.
Reproduction flow:
Note: This same pattern works correctly in
shell.CommandsTrigger, so the fix likely involves aligning the NodeCommandsTriggerimplementation with the Shell one.Test Flows Used
Flow 1 — node-script-trigger-exit0
Flow 2 — node-script-trigger-vars
Flow 3 — node-commands-trigger-exit0
Flow 4 — node-commands-trigger-multi (BUG)
Flow 5 — node-script-trigger-nonmatch (negative test)
Flow 6 — node-script-task (non-regression)
Flow 7 — node-commands-task (non-regression)
Flow 8 — shell-script-trigger-exit0 (non-regression)
feat(node): add ScriptTrigger and CommandsTrigger with tests (#326)
feat(node): add ScriptTrigger and CommandsTrigger with tests (#326)
Pradumnasaraf commentedon May 26, 2026
Both
io.kestra.plugin.scripts.node.ScriptTriggerandio.kestra.plugin.scripts.node.CommandsTriggerare broken.In both cases the script or command runs and exits non-zero, but no execution is created. The scheduler immediately logs:
No execution found, schedule is blocked since ...The trigger never recovers. Every later poll repeats the same warning.
Repro flow: ScriptTrigger:
Repro flow: CommandsTrigger:
Re-opening this issue.
docs: script triggers
docs(release): create 2.0.0 release branch (#4566)