Skip to content

fix(groovy): preserve the configured Script task runner - #451

Open
kimsanhaa wants to merge 1 commit into
kestra-io:mainfrom
kimsanhaa:fix/groovy-script-task-runner
Open

kimsanhaa wants to merge 1 commit into
kestra-io:mainfrom
kimsanhaa:fix/groovy-script-task-runner

Conversation

@kimsanhaa

Copy link
Copy Markdown

What changes are being made and why?

Groovy Script replaces the configured task runner with a new Docker runner, discarding settings such as a custom Podman socket and an explicit container user.

Keep the selected runner and its options. For Docker, default to root only when no user is configured, matching Groovy Commands. Also preserve an explicit user in the deprecated docker options.

Closes #333.

How the changes have been QAed?

./gradlew :plugin-script-groovy:test: 15 tests passed, including Docker execution and the Groovy flow test. The new runner regression tests fail in four cases against the original implementation and all pass with the fix.

./gradlew :plugin-script-groovy:spotlessCheck reports existing formatting violations in the unchanged CommandsTest.java; neither changed file has a formatting violation.

Example for a worker using a rootless Podman socket (adjust the socket path):

id: groovy_custom_runner
namespace: company.team

tasks:
  - id: hello
    type: io.kestra.plugin.scripts.groovy.Script
    taskRunner:
      type: io.kestra.plugin.scripts.runner.docker.Docker
      host: unix:///run/user/1000/podman/podman.sock
    script: |
      println "Hello from Groovy!"

The custom socket is covered by the runner configuration test. A live Podman instance and the Kestra UI were not used for local QA.

Contributor Checklist

@MilosPaunovic MilosPaunovic added the area/plugin Plugin-related issue or feature request label Sep 25, 2026
@MilosPaunovic
MilosPaunovic requested review from a team and Malaydewangan09 September 25, 2026 06:34
@MilosPaunovic MilosPaunovic added the kind/external Pull requests raised by community contributors label Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/plugin Plugin-related issue or feature request kind/external Pull requests raised by community contributors

Projects

Status: To review

Development

Successfully merging this pull request may close these issues.

Plugin "io.kestra.plugin.scripts.groovy.Script" does not support setting taskRunner property

2 participants