Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ jobs:
with:
skip-test: ${{ github.event.inputs.skip-test == 'true' }}
kestra-version: ${{ github.event.inputs.kestra-version }}
java-version: '25'
secrets: inherit
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tasks.withType(JavaCompile) {
options.compilerArgs.add("-parameters")
}

final targetJavaVersion = JavaVersion.VERSION_21
final targetJavaVersion = JavaVersion.VERSION_25

group "io.kestra.plugin"

Expand Down Expand Up @@ -295,3 +295,4 @@ idea {
downloadSources = true
}
}

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=1.14.1-SNAPSHOT
kestraVersion=1.3.13
kestraVersion=2.0.0-SNAPSHOT
org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@

tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ json(taskrun.value) }}"
format: "{{ fromJson(item.value) }}"

triggers:
- id: watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

@KestraTest
@KestraTest(startRunner = true, startScheduler = true)
@Disabled("no server for unit test")
class ActianVectorTriggerTest extends AbstractJdbcTriggerTest {
@Value("jdbc:ingres://url:port/db")
Expand Down
22 changes: 22 additions & 0 deletions plugin-jdbc-actianvector/src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kestra:
repository:
type: memory
queue:
type: memory
storage:
type: local
local:
base-path: /tmp/unittest
controller:
port: ${random.port}
worker:
controllers:
type: STATIC
static:
endpoints:
- host: localhost
port: ${kestra.controller.port}

grpc:
server:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ json(taskrun.value) }}"
format: "{{ fromJson(item.value) }}"

triggers:
- id: watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ json(taskrun.value) }}"
format: "{{ fromJson(item.value) }}"

triggers:
- id: watch
Expand Down
22 changes: 22 additions & 0 deletions plugin-jdbc-as400/src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kestra:
repository:
type: memory
queue:
type: memory
storage:
type: local
local:
base-path: /tmp/unittest
controller:
port: ${random.port}
worker:
controllers:
type: STATIC
static:
endpoints:
- host: localhost
port: ${kestra.controller.port}

grpc:
server:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ json(taskrun.value) }}"
format: "{{ fromJson(item.value) }}"

triggers:
- id: watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

@KestraTest
@KestraTest(startRunner = true, startScheduler = true)
class ClickHouseTriggerTest extends AbstractJdbcTriggerTest {

@Test
Expand Down
15 changes: 13 additions & 2 deletions plugin-jdbc-clickhouse/src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
kestra:
encryption:
secret-key: test
repository:
type: memory
queue:
Expand All @@ -9,3 +7,16 @@ kestra:
type: local
local:
base-path: /tmp/unittest
controller:
port: ${random.port}
worker:
controllers:
type: STATIC
static:
endpoints:
- host: localhost
port: ${kestra.controller.port}

grpc:
server:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tasks:
retry:
type: constant
interval: PT5S
maxAttempt: 60
maxAttempts: 60

- id: create_table
type: io.kestra.plugin.jdbc.clickhouse.Queries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@

tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ json(taskrun.value) }}"
format: "{{ fromJson(item.value) }}"

triggers:
- id: watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

@KestraTest
@KestraTest(startRunner = true, startScheduler = true)
@Disabled("Disabled for CI")
class Db2TriggerTest extends AbstractJdbcTriggerTest {

Expand Down
22 changes: 22 additions & 0 deletions plugin-jdbc-db2/src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kestra:
repository:
type: memory
queue:
type: memory
storage:
type: local
local:
base-path: /tmp/unittest
controller:
port: ${random.port}
worker:
controllers:
type: STATIC
static:
endpoints:
- host: localhost
port: ${kestra.controller.port}

grpc:
server:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ tasks:
retry:
type: constant
interval: PT10S
maxAttempt: 90
maxAttempts: 90

- id: create_schema_and_table
type: io.kestra.plugin.jdbc.db2.Queries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ json(taskrun.value) }}"
format: "{{ fromJson(item.value) }}"

triggers:
- id: watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ json(taskrun.value) }}"
format: "{{ fromJson(item.value) }}"

triggers:
- id: watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.kestra.plugin.jdbc.AbstractJdbcQueries;
import jakarta.inject.Inject;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.time.Duration;
import java.util.Map;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;

final class DruidTestHelper {
private static final ObjectMapper MAPPER = JacksonMapper.ofJson();
Expand All @@ -22,15 +23,23 @@ final class DruidTestHelper {
private static final String INDEXER = "http://localhost:8888/druid/indexer/v1";
private static final String BROKER = "http://localhost:11082";

// Guarded so each test JVM runs the heavy ingestion+wait cycle only once,
// not once per test class @BeforeAll.
private static final AtomicBoolean INITIALIZED = new AtomicBoolean(false);

private DruidTestHelper() {}

static void initServer() throws IOException, InterruptedException, TimeoutException {
static synchronized void initServer() throws IOException, InterruptedException, TimeoutException {
if (INITIALIZED.get()) {
return;
}
waitForRouter();
waitForCoordinator();
waitForBroker();
cleanupRunningTasks();
runInlineIngestion();
waitForDatasource("products");
INITIALIZED.set(true);
}

private static void waitForRouter() throws TimeoutException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import static org.hamcrest.Matchers.is;

@Disabled("Druid cluster takes too long to start in CI")
@KestraTest
@KestraTest(startRunner = true, startScheduler = true)
class DruidTriggerTest extends AbstractJdbcTriggerTest {

@BeforeAll
Expand Down
22 changes: 22 additions & 0 deletions plugin-jdbc-druid/src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
kestra:
repository:
type: memory
queue:
type: memory
storage:
type: local
local:
base-path: /tmp/unittest
controller:
port: ${random.port}
worker:
controllers:
type: STATIC
static:
endpoints:
- host: localhost
port: ${kestra.controller.port}

grpc:
server:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@

tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
type: io.kestra.plugin.core.flow.Loop
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ json(taskrun.value) }}"
format: "{{ fromJson(item.value) }}"

triggers:
- id: watch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

@KestraTest
@KestraTest(startRunner = true, startScheduler = true)
class DuckDBTriggerTest extends AbstractJdbcTriggerTest {
@Test
void run() throws Exception {
Expand Down
15 changes: 13 additions & 2 deletions plugin-jdbc-duckdb/src/test/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
kestra:
encryption:
secret-key: test
repository:
type: memory
queue:
Expand All @@ -9,3 +7,16 @@ kestra:
type: local
local:
base-path: /tmp/unittest
controller:
port: ${random.port}
worker:
controllers:
type: STATIC
static:
endpoints:
- host: localhost
port: ${kestra.controller.port}

grpc:
server:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

@KestraTest
@KestraTest(startRunner = true, startScheduler = true)
class TriggerTest extends AbstractJdbcTriggerTest {

@Test
Expand Down
Loading
Loading