Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -22,7 +22,7 @@ repositories {
}
}

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

java {
sourceCompatibility = targetJavaVersion
Expand Down Expand Up @@ -97,6 +97,7 @@ dependencies {
testImplementation group: "io.kestra", name: "core", version: kestraVersion
testImplementation group: "io.kestra", name: "tests", version: kestraVersion
testImplementation group: "io.kestra", name: "script", version: kestraVersion
testImplementation group: "io.kestra", name: "indexer", version: kestraVersion
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
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=1.5.1-SNAPSHOT
kestraVersion=1.3.3
kestraVersion=2.0.0-SNAPSHOT
2 changes: 1 addition & 1 deletion src/test/java/io/kestra/plugin/git/NamespaceSyncTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private void createFlowInKestra(String id, String namespace) {

tasks:
- id: say
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: hello
""".formatted(id, namespace);
GenericFlow f = GenericFlow.fromYaml(TENANT_ID, src);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/io/kestra/plugin/git/PushFlowsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -819,10 +819,10 @@ private FlowWithSource createFlow(String tenantId, String flowId, String namespa

tasks:
- id: my-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from my-task
- id: subflow
type: io.kestra.core.tasks.flows.Subflow
type: io.kestra.plugin.core.flow.Subflow
namespace:\s""" + namespace + """
.sub-namespace
flowId: another-flow
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kestra/plugin/git/PushTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ private FlowWithSource createFlow(String tenantId, String namespace) {

tasks:
- id: my-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from my-task""";
return flowRepositoryInterface.create(
GenericFlow.fromYaml(tenantId, flowSource)
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kestra/plugin/git/SyncFlowTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ void createNewFlow() throws Exception {
void updateExistingFlow() throws Exception {
RunContext runContext = runContext();

String initialSource = "id: second-flow\nnamespace: " + TARGET_NAMESPACE + "\ntasks:\n - id: log\n type: io.kestra.core.tasks.log.Log\n message: 'v1'";
String initialSource = "id: second-flow\nnamespace: " + TARGET_NAMESPACE + "\ntasks:\n - id: log\n type: io.kestra.plugin.core.log.Log\n message: 'v1'";
GenericFlow flow = GenericFlow.fromYaml(TENANT_ID, initialSource);

flowRepositoryInterface.create(
Expand Down
18 changes: 9 additions & 9 deletions src/test/java/io/kestra/plugin/git/SyncFlowsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void defaultCase_WithDelete() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
GenericFlow flow = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(flow);
Expand Down Expand Up @@ -105,7 +105,7 @@ void defaultCase_WithDelete() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
flow = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(flow);
Expand All @@ -118,7 +118,7 @@ void defaultCase_WithDelete() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
GenericFlow invalidFlow = GenericFlow.builder()
.id("validation-failed-flow")
Expand Down Expand Up @@ -202,7 +202,7 @@ void defaultCase_WithoutDelete() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
GenericFlow genericFlow = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(genericFlow);
Expand Down Expand Up @@ -235,7 +235,7 @@ void defaultCase_WithoutDelete() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
genericFlow = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(genericFlow);
Expand Down Expand Up @@ -281,7 +281,7 @@ void defaultCase_WithDeleteNoChildNs() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
GenericFlow genericFlow = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(genericFlow);
Expand Down Expand Up @@ -327,7 +327,7 @@ void defaultCase_WithDeleteNoChildNs() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
genericFlow = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(genericFlow);
Expand Down Expand Up @@ -389,7 +389,7 @@ void dryRun_WithDelete() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
GenericFlow genericFlow = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(genericFlow);
Expand Down Expand Up @@ -425,7 +425,7 @@ void dryRun_WithDelete() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
genericFlow = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(genericFlow);
Expand Down
17 changes: 6 additions & 11 deletions src/test/java/io/kestra/plugin/git/SyncTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
import io.kestra.core.models.flows.Flow;
import io.kestra.core.models.flows.GenericFlow;
import io.kestra.core.models.property.Property;
import io.kestra.core.queues.QueueFactoryInterface;
import io.kestra.core.queues.QueueInterface;
import io.kestra.core.queues.DispatchQueueInterface;
import io.kestra.core.repositories.FlowRepositoryInterface;
import io.kestra.core.runners.RunContext;
import io.kestra.core.runners.RunContextFactory;
Expand All @@ -34,8 +33,6 @@
import io.kestra.core.utils.TestsUtils;

import jakarta.inject.Inject;
import jakarta.inject.Named;
import reactor.core.publisher.Flux;

import static io.kestra.core.utils.Rethrow.throwFunction;
import static org.hamcrest.MatcherAssert.assertThat;
Expand All @@ -59,8 +56,7 @@ class SyncTest extends AbstractGitTest {
private StorageInterface storageInterface;

@Inject
@Named(QueueFactoryInterface.WORKERTASKLOG_NAMED)
private QueueInterface<LogEntry> logQueue;
private DispatchQueueInterface<LogEntry> logQueue;

@BeforeEach
void init() throws IOException {
Expand All @@ -79,7 +75,7 @@ void reconcileNsFilesAndFlows() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
GenericFlow genericFlow = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(genericFlow);
Expand Down Expand Up @@ -235,7 +231,7 @@ void reconcile_MinimumSetup() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";
GenericFlow flowToDelete = GenericFlow.fromYaml(TENANT_ID, flowSource);
flowRepositoryInterface.create(flowToDelete);
Expand Down Expand Up @@ -315,7 +311,7 @@ void reconcile_MinimumSetup() throws Exception {
@Test
void reconcile_DryRun_ShouldDoNothing() throws Exception {
List<LogEntry> logs = new CopyOnWriteArrayList<>();
Flux<LogEntry> receive = TestsUtils.receive(logQueue, l -> logs.add(l.getLeft()));
logQueue.addListener(logs::add);
String namespace = SyncTest.class.getName().toLowerCase();

String flowSource = """
Expand All @@ -324,7 +320,7 @@ void reconcile_DryRun_ShouldDoNothing() throws Exception {

tasks:
- id: old-task
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: Hello from old-task""";

GenericFlow genericFlow = GenericFlow.fromYaml(TENANT_ID, flowSource);
Expand Down Expand Up @@ -386,7 +382,6 @@ void reconcile_DryRun_ShouldDoNothing() throws Exception {
assertHasInfoLog(logs, "~ " + toUpdateFilePath);
assertHasInfoLog(logs, "- " + someFilePath);
assertHasInfoLog(logs, "+ /cloned.json");
receive.blockLast();
}

private static void assertHasInfoLog(List<LogEntry> logs, String expectedMessage) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kestra/plugin/git/TenantSyncTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void shouldFailOnInvalidTaskDefinitionFromKestraExport() throws Exception {

tasks:
- id: log
type: io.kestra.core.tasks.log.Log
type: io.kestra.plugin.core.log.Log
message: hello
""";
var exportedZip = zippedYaml("my.namespace/exported-flow.yaml", yaml);
Expand Down
8 changes: 7 additions & 1 deletion src/test/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ kestra:
type: memory
queue:
type: memory
worker:
controllers:
type: STATIC
static:
endpoints:
- host: localhost
storage:
type: local
local:
base-path: /tmp/unittest
base-path: /tmp/unittest
Loading