Skip to content

Commit

Permalink
clean up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Sep 25, 2022
1 parent 2d0eeb7 commit fc043a8
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 297 deletions.
87 changes: 39 additions & 48 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,60 +15,54 @@ plugins {
id 'application'
id 'maven-publish'
id 'signing'
id 'groovy'
id 'java-library'
id "com.diffplug.spotless" version "5.0.0"
id 'jacoco'
}

ext {
versions = [
awaitility : '4.2.0',
commonsLang: '3.12.0',
conductor : '3.8.1',
eureka : '1.10.17',
groovy : '3.0.12',
jackson : '2.11.4!!',
jersey : '1.19.4',
junit : '5.9.0',
slf4j : '1.7.36',
spectator : '1.3.7',
spock : '2.2-groovy-2.5',
wiremock : '2.33.2',
awsSsm : '1.12.300',
azureSsm : '4.2.3',
azureIdentity: '1.3.7',
awaitility : '4.2.0',
commonsLang : '3.12.0',
conductor : '3.9.0-orkes-g',
jackson : '2.11.4!!',
jersey : '1.19.4',
junit : '5.9.0',
slf4j : '1.7.36',
spectator : '1.3.7',
awsSsm : '1.12.300',
azureSsm : '4.2.3',
azureIdentity : '1.3.7',
eureka : '1.10.17',
wiremock : '2.33.2',
]
}

group = 'io.orkes.conductor'

dependencies {
implementation "com.netflix.conductor:conductor-common:${versions.conductor}"
implementation("com.netflix.conductor:conductor-client:${versions.conductor}") {
exclude group: "com.netflix.eureka", module: "eureka-client"
}

api "com.sun.jersey:jersey-client:${versions.jersey}"

api ("io.orkes.conductor:conductor-client:${versions.conductor}")
api ("io.orkes.conductor:conductor-common:${versions.conductor}")
implementation "com.sun.jersey:jersey-client:${versions.jersey}"

implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:${versions.jackson}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${versions.jackson}"

implementation "org.slf4j:slf4j-api:${versions.slf4j}"

implementation "com.netflix.spectator:spectator-api:${versions.spectator}"
implementation("com.netflix.eureka:eureka-client:${versions.eureka}") {
exclude group: "javax.servlet", module: "servlet-api"
}

implementation 'com.squareup.okhttp:okhttp:2.7.5'
implementation 'com.squareup.okhttp:logging-interceptor:2.7.5'

implementation 'com.google.code.gson:gson:2.9.0'
implementation 'io.gsonfire:gson-fire:1.8.5'

implementation 'io.swagger.core.v3:swagger-annotations:2.2.2'

implementation "org.apache.commons:commons-lang3:${versions.commonsLang}"

implementation 'org.threeten:threetenbp:1.6.1'
Expand All @@ -81,13 +75,6 @@ dependencies {
// test dependencies
testImplementation "org.junit.jupiter:junit-jupiter-api:${versions.junit}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${versions.junit}"
testImplementation "org.codehaus.groovy:groovy:${versions.groovy}"
testImplementation "org.codehaus.groovy:groovy-json:${versions.groovy}"
testImplementation "org.spockframework:spock-core:${versions.spock}"
testImplementation "org.awaitility:awaitility-groovy:${versions.awaitility}"
testImplementation("com.github.tomakehurst:wiremock-jre8:${versions.wiremock}") {
exclude group: 'com.fasterxml.jackson'
}
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'org.testcontainers:localstack:1.17.1'
testImplementation 'org.testcontainers:testcontainers:1.17.1'
Expand All @@ -96,12 +83,6 @@ dependencies {

repositories {
mavenCentral()
mavenLocal() {
content {
includeGroup "com.netflix.conductor"
includeGroup "io.orkes.conductor"
}
}
}

java {
Expand Down Expand Up @@ -173,6 +154,11 @@ compileJava {
targetCompatibility = 11
}

configurations.implementation {
exclude(group : "com.netflix.conductor")
}


spotless {
java {
googleJavaFormat().aosp()
Expand All @@ -185,12 +171,17 @@ build.dependsOn(spotlessApply)

signing {
def signingKeyId = findProperty('signingKeyId')
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
if (signingKeyId && signingKey && signingPassword) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}
if(signingKeyId) {
println 'Signing the artifact with keys'
signing {
def signingKey = findProperty('signingKey')
def signingPassword = findProperty('signingPassword')
if (signingKeyId && signingKey && signingPassword) {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}

sign publishing.publications
sign publishing.publications
}
}
}
sourceSets.main.java.srcDirs += ['example/java', 'example/resources']
76 changes: 0 additions & 76 deletions deploy.gradle

This file was deleted.

54 changes: 0 additions & 54 deletions src/main/java/io/orkes/conductor/client/OrkesClients.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
*/
package io.orkes.conductor.client;

import com.netflix.conductor.client.config.DefaultConductorClientConfiguration;

import io.orkes.conductor.client.http.*;
import io.orkes.conductor.client.http.auth.AuthorizationClientFilter;

import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;
Expand Down Expand Up @@ -56,57 +53,6 @@ public TaskClient getTaskClient() {
return new OrkesTaskClient(apiClient);
}

public com.netflix.conductor.client.http.WorkflowClient getWorkflowClientLegacy() {
return getWorkflowClientLegacy(10);
}

public com.netflix.conductor.client.http.WorkflowClient getWorkflowClientLegacy(
int threadPoolSize) {
AuthorizationClientFilter authorizationClientFilter =
new AuthorizationClientFilter(apiClient);
com.netflix.conductor.client.http.WorkflowClient workflowClient =
new com.netflix.conductor.client.http.WorkflowClient(
conductorClientConfig(
apiClient.getReadTimeout(),
apiClient.getConnectTimeout(),
threadPoolSize),
new DefaultConductorClientConfiguration(),
null,
authorizationClientFilter);
String basePath = apiClient.getBasePath();
if (!basePath.endsWith("/")) {
basePath = basePath + "/";
}
workflowClient.setRootURI(basePath);

return workflowClient;
}

public com.netflix.conductor.client.http.TaskClient getTaskClientLegacy() {
return getTaskClientLegacy(10);
}

public com.netflix.conductor.client.http.TaskClient getTaskClientLegacy(int threadPoolSize) {
AuthorizationClientFilter authorizationClientFilter =
new AuthorizationClientFilter(apiClient);
com.netflix.conductor.client.http.TaskClient taskClient =
new com.netflix.conductor.client.http.TaskClient(
conductorClientConfig(
apiClient.getReadTimeout(),
apiClient.getConnectTimeout(),
threadPoolSize),
new DefaultConductorClientConfiguration(),
null,
authorizationClientFilter);
String basePath = apiClient.getBasePath();
if (!basePath.endsWith("/")) {
basePath = basePath + "/";
}
taskClient.setRootURI(basePath);

return taskClient;
}

private ClientConfig conductorClientConfig(
int readTimeout, int connectionTimeout, int threadPoolSize) {
var clientConfig = new DefaultClientConfig();
Expand Down
18 changes: 2 additions & 16 deletions src/main/java/io/orkes/conductor/client/automator/TaskRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import io.orkes.conductor.client.http.ApiException;

import com.google.common.base.Stopwatch;
import com.sun.jersey.api.client.config.DefaultClientConfig;

class TaskRunner {
private static final Logger LOGGER = LoggerFactory.getLogger(TaskRunner.class);
Expand All @@ -59,9 +58,6 @@ class TaskRunner {
private static final String OVERRIDE_DISCOVERY = "pollOutOfDiscovery";
private static final String ALL_WORKERS = "all";

// used or managing external payload
private com.netflix.conductor.client.http.TaskClient taskClientForExternalPayload;

TaskRunner(
EurekaClient eurekaClient,
TaskClient taskClient,
Expand All @@ -77,9 +73,6 @@ class TaskRunner {
this.taskToDomain = taskToDomain;
this.threadCount = threadCount;
this.taskPollTimeout = taskPollTimeout;
this.taskClientForExternalPayload =
new com.netflix.conductor.client.http.TaskClient(
new DefaultClientConfig(), conductorClientConfiguration, null);
this.executorService =
(ThreadPoolExecutor)
Executors.newFixedThreadPool(
Expand Down Expand Up @@ -296,15 +289,8 @@ private void updateTaskResult(int count, Task task, TaskResult result, Worker wo
}

private Optional<String> upload(TaskResult result, String taskType) {
try {
return taskClientForExternalPayload.evaluateAndUploadLargePayload(
result.getOutputData(), taskType);
} catch (IllegalArgumentException iae) {
result.setReasonForIncompletion(iae.getMessage());
result.setOutputData(null);
result.setStatus(TaskResult.Status.FAILED_WITH_TERMINAL_ERROR);
return Optional.empty();
}
// do nothing
return Optional.empty();
}

private <T, R> R retryOperation(Function<T, R> operation, int count, T input, String opName) {
Expand Down
6 changes: 1 addition & 5 deletions src/main/java/io/orkes/conductor/client/http/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@
import org.threeten.bp.OffsetDateTime;
import org.threeten.bp.format.DateTimeFormatter;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapter;
import com.google.gson.*;
import com.google.gson.internal.bind.util.ISO8601Utils;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import io.orkes.conductor.client.ApiClient;
import io.orkes.conductor.client.SecretClient;
import io.orkes.conductor.client.http.api.*;
import io.orkes.conductor.client.http.api.SecretResourceApi;

public class OrkesSecretClient extends OrkesClient implements SecretClient {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@

import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.RequestBody;
import okio.Buffer;
import okio.BufferedSink;
import okio.ForwardingSink;
import okio.Okio;
import okio.Sink;
import okio.*;

public class ProgressRequestBody extends RequestBody {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@

import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.ResponseBody;
import okio.Buffer;
import okio.BufferedSource;
import okio.ForwardingSource;
import okio.Okio;
import okio.Source;
import okio.*;

public class ProgressResponseBody extends ResponseBody {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import io.orkes.conductor.client.ApiClient;
import io.orkes.conductor.client.http.*;
import io.orkes.conductor.client.http.Configuration;
import io.orkes.conductor.client.model.AuthorizationRequest;
import io.orkes.conductor.client.model.Subject;

Expand Down
Loading

0 comments on commit fc043a8

Please sign in to comment.