From df24a68c63fa41e765ded45ee2151bd1c4b93f4a Mon Sep 17 00:00:00 2001 From: Malay Dewangan Date: Fri, 10 Apr 2026 15:02:58 +0530 Subject: [PATCH 1/4] fix: v2 compatibility --- .github/workflows/main.yml | 1 + build.gradle | 2 +- gradle.properties | 2 +- src/test/resources/application.yml | 6 ++++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 621fb56a..26ec7f97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,4 +44,5 @@ jobs: with: skip-test: ${{ github.event.inputs.skip-test == 'true' }} kestra-version: ${{ github.event.inputs.kestra-version }} + java-version: '25' secrets: inherit diff --git a/build.gradle b/build.gradle index 5fdcf52b..c795e566 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ repositories { } } -final targetJavaVersion = JavaVersion.VERSION_21 +final targetJavaVersion = JavaVersion.VERSION_25 java { sourceCompatibility = targetJavaVersion diff --git a/gradle.properties b/gradle.properties index 60c246ab..f201de5a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ version=1.0.0-SNAPSHOT -kestraVersion=1.2.5 +kestraVersion=2.0.0-SNAPSHOT diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml index 636ef672..919190e4 100644 --- a/src/test/resources/application.yml +++ b/src/test/resources/application.yml @@ -7,3 +7,9 @@ kestra: type: local local: base-path: /tmp/unittest + worker: + controllers: + type: STATIC + static: + endpoints: + - host: localhost From 816601057ac7bd7c4a9070690ba8343f5d6d63bc Mon Sep 17 00:00:00 2001 From: Malay Dewangan Date: Fri, 10 Apr 2026 16:04:08 +0530 Subject: [PATCH 2/4] fix: v2 compatibility --- build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index c795e566..a441c109 100644 --- a/build.gradle +++ b/build.gradle @@ -91,6 +91,8 @@ dependencies { testImplementation group: "io.kestra", name: "repository-memory", version: kestraVersion testImplementation group: "io.kestra", name: "runner-memory", version: kestraVersion testImplementation group: "io.kestra", name: "storage-local", version: kestraVersion + testImplementation group: "io.kestra", name: "worker", version: kestraVersion + testImplementation group: "io.kestra", name: "indexer", version: kestraVersion // test testImplementation "org.junit.jupiter:junit-jupiter-engine" From abfa6aecfb9fd45463509cd682fd452bc7376cd4 Mon Sep 17 00:00:00 2001 From: Malay Dewangan Date: Fri, 10 Apr 2026 16:26:45 +0530 Subject: [PATCH 3/4] fix: v2 compatibility --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index a441c109..425807ea 100644 --- a/build.gradle +++ b/build.gradle @@ -91,7 +91,6 @@ dependencies { testImplementation group: "io.kestra", name: "repository-memory", version: kestraVersion testImplementation group: "io.kestra", name: "runner-memory", version: kestraVersion testImplementation group: "io.kestra", name: "storage-local", version: kestraVersion - testImplementation group: "io.kestra", name: "worker", version: kestraVersion testImplementation group: "io.kestra", name: "indexer", version: kestraVersion // test From 1c9e89c69253c492f60473e0c82e413f3e72bdcf Mon Sep 17 00:00:00 2001 From: Malay Dewangan Date: Sat, 11 Apr 2026 02:14:39 +0530 Subject: [PATCH 4/4] fix: v2 compatibility --- .../io/kestra/plugin/templates/ExampleRunnerTest.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/test/java/io/kestra/plugin/templates/ExampleRunnerTest.java b/src/test/java/io/kestra/plugin/templates/ExampleRunnerTest.java index e3e6cfa1..f6d2eb15 100644 --- a/src/test/java/io/kestra/plugin/templates/ExampleRunnerTest.java +++ b/src/test/java/io/kestra/plugin/templates/ExampleRunnerTest.java @@ -1,7 +1,11 @@ package io.kestra.plugin.templates; +import io.kestra.core.exceptions.InternalException; import io.kestra.core.junit.annotations.ExecuteFlow; import io.kestra.core.junit.annotations.KestraTest; +import io.kestra.core.runners.RunContextFactory; +import io.kestra.core.services.TaskOutputService; +import jakarta.inject.Inject; import org.junit.jupiter.api.Test; import io.kestra.core.models.executions.Execution; @@ -17,10 +21,13 @@ */ @KestraTest(startRunner = true) // This annotation starts an embedded Kestra for tests class ExampleRunnerTest { + @Inject + private TaskOutputService taskOutputService; + @Test @ExecuteFlow("flows/example.yaml") - void flow(Execution execution) { + void flow(Execution execution) throws InternalException { assertThat(execution.getTaskRunList(), hasSize(3)); - assertThat(((Map)execution.getTaskRunList().get(2).getOutputs().get("child")).get("value"), is("task-id")); + assertThat(((Map) taskOutputService.getOutputs(execution.getTaskRunList().get(2)).get("child")).get("value"), is("task-id")); } }