diff --git a/archive/build.gradle b/archive/build.gradle index 1d7631f..f63b8f2 100644 --- a/archive/build.gradle +++ b/archive/build.gradle @@ -1,8 +1,8 @@ dependencies { - implementation "com.netflix.conductor:conductor-common:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-core:${versions.revConductor}" - implementation ("com.netflix.conductor:conductor-postgres-persistence:${versions.revConductor}") + implementation "org.conductoross:conductor-common:${versions.revConductor}" + implementation "org.conductoross:conductor-core:${versions.revConductor}" + implementation ("org.conductoross:conductor-postgres-persistence:${versions.revConductor}") implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.springframework.boot:spring-boot-starter-data-jdbc' diff --git a/archive/src/main/java/io/orkes/conductor/dao/postgres/archive/PostgresArchiveDAOConfiguration.java b/archive/src/main/java/io/orkes/conductor/dao/postgres/archive/PostgresArchiveDAOConfiguration.java index e6ba455..67623e6 100644 --- a/archive/src/main/java/io/orkes/conductor/dao/postgres/archive/PostgresArchiveDAOConfiguration.java +++ b/archive/src/main/java/io/orkes/conductor/dao/postgres/archive/PostgresArchiveDAOConfiguration.java @@ -12,7 +12,6 @@ */ package io.orkes.conductor.dao.postgres.archive; -import javax.annotation.PostConstruct; import javax.sql.DataSource; import org.apache.logging.log4j.util.Strings; @@ -36,6 +35,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; +import jakarta.annotation.PostConstruct; import lombok.extern.slf4j.Slf4j; @Slf4j diff --git a/build.gradle b/build.gradle index 0ca8296..0c3e828 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,12 @@ buildscript { dependencies { - classpath "org.springframework.boot:spring-boot-gradle-plugin:2.5.15" + classpath 'org.springframework.boot:spring-boot-gradle-plugin:3.1.4' classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.+' } } plugins { - id 'io.spring.dependency-management' version '1.0.11.RELEASE' + id 'io.spring.dependency-management' version '1.0.13.RELEASE' } ext { @@ -15,7 +15,7 @@ ext { springBootVersion = '2.7.6' versions = [ - revConductor : '3.15.0', + revConductor : '3.16.0', revTestContainer : '1.17.2', revGuava : '32.0.0-jre', revLog4j : '2.17.1', @@ -75,28 +75,30 @@ subprojects { } } - dependencies { + + dependencies { implementation('net.minidev:json-smart') { version { strictly '2.4.10' } } - implementation 'com.amazonaws:aws-java-sdk-s3:1.12.548' - implementation "redis.clients:jedis:${versions.revJedis}" - - implementation "org.apache.logging.log4j:log4j-core:${versions.revLog4j}!!" - implementation "org.apache.logging.log4j:log4j-api:${versions.revLog4j}!!" - implementation "org.apache.logging.log4j:log4j-slf4j-impl:${versions.revLog4j}!!" - implementation "org.apache.logging.log4j:log4j-jul:${versions.revLog4j}!!" - implementation "org.apache.logging.log4j:log4j-web:${versions.revLog4j}!!" - implementation "org.apache.logging.log4j:log4j-to-slf4j:${versions.revLog4j}!!" - + implementation('org.apache.logging.log4j:log4j-core') + implementation('org.apache.logging.log4j:log4j-api') + implementation('org.apache.logging.log4j:log4j-slf4j-impl') + implementation('org.apache.logging.log4j:log4j-jul') + implementation('org.apache.logging.log4j:log4j-web') + annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' compileOnly "org.projectlombok:lombok:${versions.revLombok}" annotationProcessor "org.projectlombok:lombok:${versions.revLombok}" - testAnnotationProcessor "org.projectlombok:lombok:${versions.revLombok}" implementation "org.apache.commons:commons-lang3:${versions.revCommonsLang}" + + testImplementation('org.springframework.boot:spring-boot-starter-test') + testImplementation('org.springframework.boot:spring-boot-starter-log4j2') + testAnnotationProcessor "org.projectlombok:lombok:${versions.revLombok}" + testImplementation 'junit:junit' + testImplementation "org.junit.vintage:junit-vintage-engine" } allprojects { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5925064..42ee1f5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302 -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionSha256Sum=a01b6587e15fe7ed120a0ee299c25982a1eee045abd6a9dd5e216b2f628ef9ac +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/persistence/build.gradle b/persistence/build.gradle index 0961126..0b82f27 100644 --- a/persistence/build.gradle +++ b/persistence/build.gradle @@ -2,8 +2,8 @@ dependencies { - implementation "com.netflix.conductor:conductor-common:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-core:${versions.revConductor}" + implementation "org.conductoross:conductor-common:${versions.revConductor}" + implementation "org.conductoross:conductor-core:${versions.revConductor}" compileOnly 'org.springframework.boot:spring-boot-starter' implementation "redis.clients:jedis:${versions.revJedis}" diff --git a/run_tests.sh b/run_tests.sh index 72ad715..862ec5d 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -3,7 +3,7 @@ docker build -f docker/DockerfileStandalone . -t conductor_test_container docker run -dit --name conductor_test_container -p 8899:8080 -p 4535:5000 -t conductor_test_container COUNTER=0 MAX_TIME=120 -while ! curl -s http://localhost:8899/api/metadata/workflow -o /dev/null +while ! curl -s http://localhost:8080/api/metadata/workflow -o /dev/null do echo "$(date) - still trying - since $COUNTER second, will wait for $MAX_TIME" sleep 1 diff --git a/server/build.gradle b/server/build.gradle index 53f3984..86cf102 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -6,21 +6,21 @@ jar { } dependencies { - implementation "com.netflix.conductor:conductor-common:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-core:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-redis-lock:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-grpc:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-rest:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-redis-concurrency-limit:${versions.revConductor}" - - implementation "com.netflix.conductor:conductor-http-task:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-awss3-storage:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-awssqs-event-queue:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-json-jq-task:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-amqp:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-nats:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-kafka:${versions.revConductor}" - implementation "com.netflix.conductor:conductor-metrics:${versions.revConductor}" + implementation "org.conductoross:conductor-common:${versions.revConductor}" + implementation "org.conductoross:conductor-core:${versions.revConductor}" + implementation "org.conductoross:conductor-redis-lock:${versions.revConductor}" + implementation "org.conductoross:conductor-grpc:${versions.revConductor}" + implementation "org.conductoross:conductor-rest:${versions.revConductor}" + implementation "org.conductoross:conductor-redis-concurrency-limit:${versions.revConductor}" + + implementation "org.conductoross:conductor-http-task:${versions.revConductor}" + implementation "org.conductoross:conductor-awss3-storage:${versions.revConductor}" + implementation "org.conductoross:conductor-awssqs-event-queue:${versions.revConductor}" + implementation "org.conductoross:conductor-json-jq-task:${versions.revConductor}" + implementation "org.conductoross:conductor-amqp:${versions.revConductor}" + implementation "org.conductoross:conductor-nats:${versions.revConductor}" + implementation "org.conductoross:conductor-kafka:${versions.revConductor}" + implementation "org.conductoross:conductor-metrics:${versions.revConductor}" implementation "io.orkes.queues:orkes-conductor-queues:${versions.revOrkesQueues}" implementation project(":orkes-conductor-archive") @@ -35,6 +35,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation 'org.springframework.boot:spring-boot-actuator-autoconfigure' implementation 'org.springframework.boot:spring-boot-starter-data-jdbc' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-security' @@ -48,9 +49,20 @@ dependencies { runtimeOnly 'com.netflix.spectator:spectator-reg-micrometer' implementation "io.micrometer:micrometer-registry-prometheus:1.7.5" - implementation "io.micrometer:micrometer-core:1.8.0" + implementation "io.micrometer:micrometer-core:1.11.4" + + + +// implementation "com.netflix.spectator:spectator-reg-metrics3:${revSpectator}" +// implementation "com.netflix.spectator:spectator-reg-micrometer:${revSpectator}" +// implementation "io.prometheus:simpleclient:${revPrometheus}" +// implementation "io.micrometer:micrometer-registry-prometheus:${revMicrometer}" + + + implementation "com.jayway.jsonpath:json-path:${versions.revJsonPath}" + implementation "redis.clients:jedis:${versions.revJedis}" testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' diff --git a/server/src/main/java/io/orkes/conductor/OrkesConductorApplication.java b/server/src/main/java/io/orkes/conductor/OrkesConductorApplication.java index dfe77c2..a216a2f 100644 --- a/server/src/main/java/io/orkes/conductor/OrkesConductorApplication.java +++ b/server/src/main/java/io/orkes/conductor/OrkesConductorApplication.java @@ -19,8 +19,6 @@ import java.util.List; import java.util.Properties; -import javax.annotation.PostConstruct; - import org.apache.commons.lang3.StringUtils; import org.springdoc.core.customizers.OpenApiCustomiser; import org.springframework.beans.factory.annotation.Autowired; @@ -46,6 +44,7 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.servers.Server; +import jakarta.annotation.PostConstruct; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/server/src/main/java/io/orkes/conductor/config/SecurityDisabledConfig.java b/server/src/main/java/io/orkes/conductor/config/SecurityDisabledConfig.java deleted file mode 100644 index 4384f1e..0000000 --- a/server/src/main/java/io/orkes/conductor/config/SecurityDisabledConfig.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2022 Orkes, Inc. - *
- * Licensed under the Orkes Community License (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - *
- * https://github.com/orkes-io/licenses/blob/main/community/LICENSE.txt - *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
- */
-package io.orkes.conductor.config;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-@Configuration
-public class SecurityDisabledConfig extends WebSecurityConfigurerAdapter {
-
- public SecurityDisabledConfig() {
- super(true); // Disable defaults
- }
-
- @Override
- protected void configure(HttpSecurity http) throws Exception {}
-}
diff --git a/server/src/main/java/io/orkes/conductor/rest/WorkflowResourceSync.java b/server/src/main/java/io/orkes/conductor/rest/WorkflowResourceSync.java
index be86452..1a5086e 100644
--- a/server/src/main/java/io/orkes/conductor/rest/WorkflowResourceSync.java
+++ b/server/src/main/java/io/orkes/conductor/rest/WorkflowResourceSync.java
@@ -15,8 +15,6 @@
import java.util.ArrayList;
import java.util.concurrent.*;
-import javax.annotation.PostConstruct;
-
import org.springframework.web.bind.annotation.*;
import com.netflix.conductor.common.metadata.workflow.StartWorkflowRequest;
@@ -27,6 +25,7 @@
import com.google.common.util.concurrent.Uninterruptibles;
import io.swagger.v3.oas.annotations.Operation;
+import jakarta.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
diff --git a/server/src/main/resources/application.properties b/server/src/main/resources/application.properties
index ba5e3ec..f273525 100644
--- a/server/src/main/resources/application.properties
+++ b/server/src/main/resources/application.properties
@@ -66,6 +66,7 @@ conductor.app.taskOutputPayloadSizeThreshold=102400
conductor.app.taskInputPayloadSizeThreshold=102400
# Additional modules for metrics collection exposed to Datadog (optional)
+management.datadog.metrics.export.enabled=false
management.metrics.export.datadog.enabled=${conductor.metrics-datadog.enabled:false}
management.metrics.export.datadog.api-key=${conductor.metrics-datadog.api-key:}
diff --git a/server/src/main/resources/banner.txt b/server/src/main/resources/banner.txt
index 8587db1..4375537 100644
--- a/server/src/main/resources/banner.txt
+++ b/server/src/main/resources/banner.txt
@@ -1,11 +1,4 @@
- ______ .______ __ ___ _______ _______.
- / __ \ | _ \ | |/ / | ____| / |
-| | | | | |_) | | ' / | |__ | (----`
-| | | | | / | < | __| \ \
-| `--' | | |\ \----.| . \ | |____.----) |
- \______/ | _| `._____||__|\__\ |_______|_______/
-
______ ______ .__ __. _______ __ __ ______ .___________. ______ .______
/ | / __ \ | \ | | | \ | | | | / || | / __ \ | _ \
| ,----'| | | | | \| | | .--. || | | | | ,----'`---| |----`| | | | | |_) |
@@ -13,4 +6,3 @@
| `----.| `--' | | |\ | | '--' || `--' | | `----. | | | `--' | | |\ \----.
\______| \______/ |__| \__| |_______/ \______/ \______| |__| \______/ | _| `._____|
-Licensed under Orkes Conductor Community License
diff --git a/server/src/main/resources/logback-spring.xml b/server/src/main/resources/logback-spring.xml
index 667d859..8c7f890 100644
--- a/server/src/main/resources/logback-spring.xml
+++ b/server/src/main/resources/logback-spring.xml
@@ -5,7 +5,7 @@
class="ch.qos.logback.core.ConsoleAppender">
+ * Licensed under the Orkes Community License (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + *
+ * https://github.com/orkes-io/licenses/blob/main/community/LICENSE.txt + *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ package io.orkes.conductor.client.e2e; -import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.List; + +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.testcontainers.containers.GenericContainer; + import com.netflix.conductor.common.config.ObjectMapperProvider; import com.netflix.conductor.common.metadata.workflow.WorkflowDef; import com.netflix.conductor.sdk.workflow.executor.WorkflowExecutor; + import io.orkes.conductor.client.ApiClient; import io.orkes.conductor.client.http.OrkesMetadataClient; import io.orkes.conductor.client.http.OrkesTaskClient; import io.orkes.conductor.client.http.OrkesWorkflowClient; + +import com.fasterxml.jackson.databind.ObjectMapper; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; -import org.testcontainers.containers.GenericContainer; - -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.List; @Slf4j public abstract class AbstractConductorTest { @@ -31,7 +46,10 @@ public abstract class AbstractConductorTest { protected static io.orkes.conductor.client.MetadataClient metadataClient; protected static WorkflowExecutor executor; - protected static final String[] workflows = new String[]{"/metadata/rerun.json", "/metadata/popminmax.json", "/metadata/fail.json"}; + protected static final String[] workflows = + new String[] { + "/metadata/rerun.json", "/metadata/popminmax.json", "/metadata/fail.json" + }; @SneakyThrows @BeforeAll @@ -46,7 +64,8 @@ public static final void setup() { for (String workflow : workflows) { InputStream resource = AbstractConductorTest.class.getResourceAsStream(workflow); - WorkflowDef workflowDef = objectMapper.readValue(new InputStreamReader(resource), WorkflowDef.class); + WorkflowDef workflowDef = + objectMapper.readValue(new InputStreamReader(resource), WorkflowDef.class); metadataClient.updateWorkflowDefs(List.of(workflowDef), true); } } @@ -55,10 +74,4 @@ public static final void setup() { public static void cleanup() { executor.shutdown(); } - - - - - } - diff --git a/test-harness/src/test/java/io/orkes/conductor/client/e2e/ConductorStartupTest.java b/test-harness/src/test/java/io/orkes/conductor/client/e2e/ConductorStartupTest.java index 5cc34cb..3bef638 100644 --- a/test-harness/src/test/java/io/orkes/conductor/client/e2e/ConductorStartupTest.java +++ b/test-harness/src/test/java/io/orkes/conductor/client/e2e/ConductorStartupTest.java @@ -1,12 +1,21 @@ +/* + * Copyright 2024 Orkes, Inc. + *
+ * Licensed under the Orkes Community License (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + *
+ * https://github.com/orkes-io/licenses/blob/main/community/LICENSE.txt + *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
package io.orkes.conductor.client.e2e;
import org.junit.jupiter.api.Test;
public class ConductorStartupTest extends AbstractConductorTest {
-
@Test
- public void test() {
-
- }
+ public void test() {}
}
diff --git a/test-harness/src/test/java/io/orkes/conductor/client/e2e/DynamicForkOptionalTests.java b/test-harness/src/test/java/io/orkes/conductor/client/e2e/DynamicForkOptionalTests.java
index 7b2f085..ed51e11 100644
--- a/test-harness/src/test/java/io/orkes/conductor/client/e2e/DynamicForkOptionalTests.java
+++ b/test-harness/src/test/java/io/orkes/conductor/client/e2e/DynamicForkOptionalTests.java
@@ -27,9 +27,6 @@
import com.netflix.conductor.common.run.Workflow;
import io.orkes.conductor.client.*;
-import io.orkes.conductor.client.http.OrkesMetadataClient;
-import io.orkes.conductor.client.http.OrkesTaskClient;
-import io.orkes.conductor.client.http.OrkesWorkflowClient;
import io.orkes.conductor.client.model.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -71,12 +68,8 @@ public void testTaskDynamicForkOptional() {
fanoutTasks.add(workflowTask);
input.put("xdt" + i, Map.of("k1", "v1"));
-
}
-
-
-
Map> WORKFLOW_DEF_LIST = new TypeReference
>() {};
+ private static TypeReference
> WORKFLOW_DEF_LIST =
+ new TypeReference
>() {};
private static final String WORKFLOW_NAME = "integration_test_wf_with_sub_wf";
diff --git a/test-harness/src/test/java/io/orkes/conductor/client/e2e/SubWorkflowVersionTests.java b/test-harness/src/test/java/io/orkes/conductor/client/e2e/SubWorkflowVersionTests.java
index 3c51c17..12d27ea 100644
--- a/test-harness/src/test/java/io/orkes/conductor/client/e2e/SubWorkflowVersionTests.java
+++ b/test-harness/src/test/java/io/orkes/conductor/client/e2e/SubWorkflowVersionTests.java
@@ -32,8 +32,8 @@
import com.netflix.conductor.common.run.Workflow;
import io.orkes.conductor.client.*;
-import io.orkes.conductor.client.model.*;
import io.orkes.conductor.client.e2e.util.RegistrationUtil;
+import io.orkes.conductor.client.model.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
diff --git a/test-harness/src/test/java/io/orkes/conductor/client/e2e/WaitTaskTest.java b/test-harness/src/test/java/io/orkes/conductor/client/e2e/WaitTaskTest.java
index 6575b51..b0c002f 100644
--- a/test-harness/src/test/java/io/orkes/conductor/client/e2e/WaitTaskTest.java
+++ b/test-harness/src/test/java/io/orkes/conductor/client/e2e/WaitTaskTest.java
@@ -31,10 +31,9 @@
public class WaitTaskTest extends AbstractConductorTest {
-
-
@Test
- public void testWaitTimeout() throws ExecutionException, InterruptedException, TimeoutException {
+ public void testWaitTimeout()
+ throws ExecutionException, InterruptedException, TimeoutException {
ConductorWorkflow