Skip to content

Commit

Permalink
Remove dependency on Netflix Servo (#2503)
Browse files Browse the repository at this point in the history
Netflix Servo is a deprecated library. Conductor's dependency on Servo can
be simply removed due to code related to Servo Stopwatch is not used anywhere.

Also need to explicitly add Guava after removing servo dependency.

Build and test pass except cassandraDaoTest during test teardown for cleanupData.

Will investigate more on explicitly adding guava dependency causing test
failure.

Update dependencis lock
Force downgrade guava version on cassandra persistence dependencies due
to incompatible with cassandra test.

Signed-off-by: Tao Jiang <[email protected]>
  • Loading branch information
Tao Jiang authored Oct 18, 2021
1 parent d857a98 commit 74e0037
Show file tree
Hide file tree
Showing 19 changed files with 148 additions and 208 deletions.
24 changes: 12 additions & 12 deletions azureblob-storage/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
],
"locked": "1.0.0"
},
"com.google.guava:guava": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-common",
Expand All @@ -79,12 +85,6 @@
"com.netflix.conductor:conductor-core": {
"project": true
},
"com.netflix.servo:servo-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
Expand Down Expand Up @@ -192,6 +192,12 @@
],
"locked": "1.0.0"
},
"com.google.guava:guava": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-common",
Expand All @@ -214,12 +220,6 @@
"com.netflix.conductor:conductor-core": {
"project": true
},
"com.netflix.servo:servo-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
Expand Down
8 changes: 7 additions & 1 deletion cassandra-persistence/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,19 @@ dependencies {

implementation "com.datastax.cassandra:cassandra-driver-core:${revCassandra}"
implementation "org.apache.commons:commons-lang3"

implementation 'org.apache.logging.log4j:log4j-web'

testImplementation("org.cassandraunit:cassandra-unit:${revCassandraUnit}") {
exclude group: "com.datastax.cassandra", module: "cassandra-driver-core"
}

// Using higher guava version than the following causes test failure.
testImplementation ('com.google.guava:guava') {
version {
strictly '23.6.1-jre'
}
}

testImplementation project(':conductor-core').sourceSets.test.output
testImplementation project(':conductor-common').sourceSets.test.output
}
27 changes: 15 additions & 12 deletions cassandra-persistence/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
],
"locked": "1.0.0"
},
"com.google.guava:guava": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-common",
Expand All @@ -82,12 +88,6 @@
"com.netflix.conductor:conductor-core": {
"project": true
},
"com.netflix.servo:servo-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
Expand Down Expand Up @@ -146,6 +146,9 @@
"com.datastax.cassandra:cassandra-driver-core": {
"locked": "3.10.2"
},
"com.google.guava:guava": {
"locked": "23.6.1-jre"
},
"com.netflix.conductor:conductor-common": {
"project": true
},
Expand Down Expand Up @@ -204,6 +207,12 @@
],
"locked": "1.0.0"
},
"com.google.guava:guava": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "23.6.1-jre"
},
"com.google.protobuf:protobuf-java": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-common",
Expand All @@ -226,12 +235,6 @@
"com.netflix.conductor:conductor-core": {
"project": true
},
"com.netflix.servo:servo-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
Expand Down
18 changes: 6 additions & 12 deletions contribs/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@
"locked": "1.0.0"
},
"com.google.guava:guava": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
Expand All @@ -124,12 +127,6 @@
"com.netflix.conductor:conductor-core": {
"project": true
},
"com.netflix.servo:servo-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
Expand Down Expand Up @@ -313,6 +310,9 @@
"locked": "1.0.0"
},
"com.google.guava:guava": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
Expand All @@ -337,12 +337,6 @@
"com.netflix.conductor:conductor-core": {
"project": true
},
"com.netflix.servo:servo-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
Expand Down
3 changes: 2 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ dependencies {

implementation "io.reactivex:rxjava:${revRxJava}"

implementation "com.netflix.servo:servo-core:${revServo}"
implementation "com.google.guava:guava:${revGuava}"

implementation "com.netflix.spectator:spectator-api:${revSpectator}"

implementation "org.apache.bval:bval-jsr:${revBval}"
Expand Down
24 changes: 12 additions & 12 deletions core/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"com.fasterxml.jackson.core:jackson-databind": {
"locked": "2.11.4"
},
"com.google.guava:guava": {
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
"locked": "3.13.0"
},
Expand All @@ -23,9 +26,6 @@
"com.netflix.conductor:conductor-common": {
"project": true
},
"com.netflix.servo:servo-core": {
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"locked": "0.122.0"
},
Expand Down Expand Up @@ -85,6 +85,9 @@
],
"locked": "1.0.0"
},
"com.google.guava:guava": {
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-common"
Expand All @@ -97,9 +100,6 @@
"com.netflix.conductor:conductor-common": {
"project": true
},
"com.netflix.servo:servo-core": {
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"locked": "0.122.0"
},
Expand Down Expand Up @@ -141,6 +141,9 @@
"com.fasterxml.jackson.core:jackson-databind": {
"locked": "2.11.4"
},
"com.google.guava:guava": {
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
"locked": "3.13.0"
},
Expand All @@ -150,9 +153,6 @@
"com.netflix.conductor:conductor-common": {
"project": true
},
"com.netflix.servo:servo-core": {
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"locked": "0.122.0"
},
Expand Down Expand Up @@ -227,6 +227,9 @@
],
"locked": "1.0.0"
},
"com.google.guava:guava": {
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-common"
Expand All @@ -239,9 +242,6 @@
"com.netflix.conductor:conductor-common": {
"project": true
},
"com.netflix.servo:servo-core": {
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"locked": "0.122.0"
},
Expand Down
31 changes: 6 additions & 25 deletions core/src/main/java/com/netflix/conductor/metrics/Monitors.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import com.netflix.conductor.common.metadata.tasks.Task;
import com.netflix.conductor.common.metadata.tasks.Task.Status;
import com.netflix.conductor.common.run.Workflow.WorkflowStatus;
import com.netflix.servo.monitor.BasicStopwatch;
import com.netflix.servo.monitor.Stopwatch;
import com.netflix.spectator.api.Counter;
import com.netflix.spectator.api.DistributionSummary;
import com.netflix.spectator.api.Gauge;
Expand Down Expand Up @@ -49,18 +47,6 @@ public class Monitors {
private Monitors() {
}

/**
* @param className Name of the class
* @param methodName Method name
*/
public static void error(String className, String methodName) {
getCounter(className, "workflow_server_error", "methodName", methodName).increment();
}

public static Stopwatch start(String className, String name, String... additionalTags) {
return start(getTimer(className, name, additionalTags));
}

/**
* Increment a counter that is used to measure the rate at which some event is occurring. Consider a simple queue,
* counters would be used to measure things like the rate at which items are being inserted and removed.
Expand Down Expand Up @@ -148,18 +134,13 @@ private static Map<String, String> toMap(String className, String... additionalT
return tags;
}

private static Stopwatch start(Timer sm) {

Stopwatch sw = new BasicStopwatch() {
@Override
public void stop() {
super.stop();
long duration = getDuration(TimeUnit.MILLISECONDS);
sm.record(duration, TimeUnit.MILLISECONDS);
}
};
sw.start();
return sw;
/**
* @param className Name of the class
* @param methodName Method name
*/
public static void error(String className, String methodName) {
getCounter(className, "workflow_server_error", "methodName", methodName).increment();
}

public static void recordGauge(String name, long count, String... tags) {
Expand Down
1 change: 0 additions & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ ext {
revRarefiedRedis = '0.0.17'
revRedisson = '3.13.3'
revRxJava = '1.2.2'
revServo = '0.13.0'
revSpectator = '0.122.0'
revSpock = '1.3-groovy-2.5'
revSpotifyCompletableFutures = '0.3.3'
Expand Down
18 changes: 6 additions & 12 deletions es6-persistence/dependencies.lock
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
"locked": "1.0.0"
},
"com.google.guava:guava": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
Expand All @@ -91,12 +94,6 @@
"com.netflix.conductor:conductor-core": {
"project": true
},
"com.netflix.servo:servo-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
Expand Down Expand Up @@ -229,6 +226,9 @@
"locked": "1.0.0"
},
"com.google.guava:guava": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "30.0-jre"
},
"com.google.protobuf:protobuf-java": {
Expand All @@ -253,12 +253,6 @@
"com.netflix.conductor:conductor-core": {
"project": true
},
"com.netflix.servo:servo-core": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
],
"locked": "0.13.0"
},
"com.netflix.spectator:spectator-api": {
"firstLevelTransitive": [
"com.netflix.conductor:conductor-core"
Expand Down
Loading

0 comments on commit 74e0037

Please sign in to comment.