Open yuri1969 opened 6 months ago
I guess it's the same issue as https://github.com/kestra-io/kestra/issues/2364 See https://kestra-io.slack.com/archives/C04HTFM3VL6/p1709724906043089 but there is 2 issues to tackle:
TLDR: It's a hard subject with some major reworks which won't be tackled this release
The issue is indeed tricky: task properties having a default value (like runner
or pullPolicy
using @Builder.Default
in the Java code) cannot be set in a flow if there is a taskDefaults defined in the Kestra configuration file with a different value that the initial property.
It's also the case with taskDefaults defined at the flow level, for ex:
id: hello-world-from-docker
namespace: company.team
taskDefaults:
- type: io.kestra.plugin.scripts.shell.Commands
values:
runner: PROCESS
tasks:
- id: use-docker
type: io.kestra.plugin.scripts.shell.Commands
runner: DOCKER # Use the Docker runner
commands:
- echo "Hello from Docker!"
We will soon switch to serialization including NON_NULL but it's only the beginning of the story, it will not fully fix the issue.
Same root cause as https://github.com/kestra-io/kestra/issues/2260
Explain the bug
As the docs state, a non-forced task defaults should be applied only when the task itself does not define such property.
This doesn't seem to apply on the
io.kestra.plugin.scripts.shell.Commands
'srunner
property.Snippet of config file which defaults the runner type to
PROCESS
for the eachshell.Commands
task:Flow overriding the cluster default runner type to
DOCKER
:Executing such flow still results in a local call - not using Docker.
It seems this issue might be related to #2364.
Environment Information