Skip to content

fix: remove deprecated JVM-script Eval and FileTransform tasks - #458

Closed
MUKUL-PRASAD-SIGH wants to merge 1 commit into
kestra-io:mainfrom
MUKUL-PRASAD-SIGH:fix/remove-deprecated-jvm-scripts
Closed

MUKUL-PRASAD-SIGH wants to merge 1 commit into
kestra-io:mainfrom
MUKUL-PRASAD-SIGH:fix/remove-deprecated-jvm-scripts

Conversation

@MUKUL-PRASAD-SIGH

Copy link
Copy Markdown

Summary

Removes the 6 deprecated JVM-script tasks that have been marked @deprecated and already point users to GraalVM alternatives.

Deleted source files:

  • io.kestra.plugin.scripts.groovy.Eval
  • io.kestra.plugin.scripts.groovy.FileTransform
  • io.kestra.plugin.scripts.nashorn.Eval
  • io.kestra.plugin.scripts.nashorn.FileTransform
  • io.kestra.plugin.scripts.jython.Eval
  • io.kestra.plugin.scripts.jython.FileTransform

Also cleaned up:

  • Removed corresponding test files (EvalTest, FileTransformTest) from all 3 submodules
  • Updated doc markdown files to remove references to the deleted classes

Testing

Compiled all 3 affected submodules after deletion — \BUILD SUCCESSFUL.

Closes #361

@kestrabot kestrabot Bot added this to Pull Requests Oct 2, 2026
@MilosPaunovic MilosPaunovic added the area/plugin Plugin-related issue or feature request label Oct 5, 2026
@MilosPaunovic
MilosPaunovic requested review from a team and Malaydewangan09 October 5, 2026 08:01
@MilosPaunovic MilosPaunovic added the kind/external Pull requests raised by community contributors label Oct 5, 2026

@jymaire jymaire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for picking this up, @MUKUL-PRASAD-SIGH! The deletion itself is clean, but a few things need to be sorted out before this can be merged.

[HIGH] Timing: the maintainers want this to wait for the 2.0 compatibility bump. In #361, the maintainers agreed to do this removal only once kestraVersion is bumped to 2.0.0, which will happen when 1.3 is no longer an LTS (see the 2026-09-16 comments; the issue is now a sub-issue of the 2.0 compatibility EPIC). At this head, gradle.properties still has kestraVersion=1.3.39 (version=1.13.1-SNAPSHOT, and main is now on the 1.14.x line). Merging now would break, in a 1.x minor release, every existing flow that still uses one of these six types. Those flows would be rejected with Invalid type: io.kestra.plugin.scripts.<engine>.Eval. Could you keep this PR in draft until a maintainer confirms the target release?

[MEDIUM] PR title / changelog. This is a breaking change, but the title uses fix:, so it would be listed as a bug fix. Please mark it as breaking, e.g. feat!: remove deprecated JVM-script Eval and FileTransform tasks, and add a BREAKING CHANGE: note with migration guidance in the description. For example: nashorn/jython Eval/FileTransform → io.kestra.plugin.graalvm.js|python.Eval/FileTransform (there is also a ruby variant), and Groovy Eval → io.kestra.plugin.scripts.groovy.Script. The tasks have been @Deprecated since 0.24.0, so the deprecation window itself is fine.

[MEDIUM] Orphaned base classes in plugin-script. With the six subclasses gone, nothing uses plugin-script/src/main/java/io/kestra/plugin/scripts/jvm/ any more (Eval, FileTransform, AbstractJvmScript, ScriptEngineService), nor the abstract test bases plugin-script/src/test/java/io/kestra/plugin/scripts/jvm/EvalTest.java and FileTransformTest.java. I grepped the whole repository and found no other references. Since the goal of #361 is to stop shipping this code, please remove these too.

[LOW] Remaining references. AGENTS.md still lists the six removed tasks (lines 65-66, 80-81, 90-91). The first line of plugin-script-groovy/src/main/resources/doc/io.kestra.plugin.scripts.groovy.md still says "Execute Groovy code in the Kestra JVM, …", but both remaining Groovy tasks run on a task runner.

The CI failure is covered in an inline comment below.

@@ -2,8 +2,4 @@

Execute JavaScript in the Kestra JVM using the Nashorn engine — no container required, with direct access to Java classes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] CI is red: the Nashorn sanity check still uses the deleted tasks. I'm leaving this comment here because the affected files are outside the diff. plugin-script-nashorn/src/test/resources/sanity-checks/all_nashorn.yaml still declares io.kestra.plugin.scripts.nashorn.Eval and ...nashorn.FileTransform, and plugin-script-nashorn/src/test/java/io/kestra/plugin/scripts/nashorn/RunnerTest.java runs it. The check / main job fails with:

RunnerTest > all_nashorn(Execution) ... ConstraintViolationException: Invalid type: io.kestra.plugin.scripts.nashorn.Eval
> Task :plugin-script-nashorn:test FAILED

Both files need to be removed (or the whole module, see the Jython comment). Running ./gradlew check, and not only compiling the modules, would catch this.

@@ -2,8 +2,4 @@

Execute Python 2.7 code on the JVM with direct access to Java classes — no container required.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] plugin-script-jython and plugin-script-nashorn no longer contain any task. After this change, each module only has a package-info.java, icons, metadata/index.yaml and this doc page. They are still in settings.gradle, though, so they would still be built and published as plugins with nothing in them. They would also still bundle jython-standalone:2.7.4 and nashorn-core:15.7 (see their build.gradle), which goes against the performance and security reason for #361. This page would also keep advertising "Execute Python 2.7 code on the JVM … no container required".

I'd suggest removing both modules entirely: the include lines in settings.gradle, the module directories, and the Jython/Nashorn links in README.md (lines 62 and 64). Please confirm this with the maintainers in #361 first, as it also affects how these plugins are listed and published.

@fdelbrayelle

Copy link
Copy Markdown
Member

Sorry it 's an internal topic so closing the issue.

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: Done

Development

Successfully merging this pull request may close these issues.

[2.0] Remove old deprecated JVM-scripts

4 participants