Skip to content

Commit

Permalink
chore(*): remove reliance on servo library (spinnaker#2906)
Browse files Browse the repository at this point in the history
  • Loading branch information
marchello2000 authored May 9, 2019
1 parent 1420750 commit f7842b2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion orca-front50/orca-front50.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies {
implementation(project(":orca-core"))
implementation(project(":orca-retrofit"))
implementation(project(":orca-extensionpoint"))
implementation("com.netflix.servo:servo-core:0.12.21")
implementation("com.netflix.spinnaker.fiat:fiat-api:$fiatVersion")
implementation("com.netflix.spinnaker.fiat:fiat-core:$fiatVersion")
implementation("org.springframework.security:spring-security-config")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.netflix.spinnaker.orca.front50.pipeline;

import com.netflix.servo.util.Strings;
import com.google.common.base.Strings;
import com.netflix.spinnaker.kork.core.RetrySupport;
import com.netflix.spinnaker.orca.front50.Front50Service;
import com.netflix.spinnaker.orca.pipeline.expressions.ExpressionFunctionProvider;
Expand Down
1 change: 0 additions & 1 deletion orca-pipelinetemplate/orca-pipelinetemplate.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ dependencies {
implementation("com.netflix.spinnaker.kork:kork-exceptions")
implementation("com.squareup.okhttp3:okhttp")
implementation("javax.validation:validation-api")
implementation("com.netflix.servo:servo-core:0.12.21")

compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
*/
package com.netflix.spinnaker.orca.pipelinetemplate.tasks;

import com.netflix.servo.util.Strings;
import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.model.PipelineTemplate;

import com.netflix.spinnaker.orca.pipelinetemplate.v1schema.model.PipelineTemplate.Variable;
import org.apache.logging.log4j.util.Strings;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
Expand All @@ -42,7 +43,7 @@ default void validate(PipelineTemplate template) {
}

if (!missingFields.isEmpty()) {
throw new IllegalArgumentException("Missing required fields: " + Strings.join(",", missingFields.iterator()));
throw new IllegalArgumentException("Missing required fields: " + String.join(",", missingFields));
}

if (template.getVariables() != null) {
Expand All @@ -54,7 +55,7 @@ default void validate(PipelineTemplate template) {

if (!invalidVariableNames.isEmpty()) {
throw new IllegalArgumentException("Variable names cannot include dashes (-)."
+ " Invalid variable names: " + Strings.join(", ", invalidVariableNames.iterator()));
+ " Invalid variable names: " + String.join(", ", invalidVariableNames));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.netflix.spinnaker.orca.pipelinetemplate.tasks.v2;

import com.netflix.servo.util.Strings;
import com.google.common.base.Strings;
import com.netflix.spinnaker.orca.pipelinetemplate.v2schema.model.V2PipelineTemplate;

import java.util.ArrayList;
Expand Down Expand Up @@ -49,7 +49,7 @@ default void validate(V2PipelineTemplate template) {
}

if (!missingFields.isEmpty()) {
throw new IllegalArgumentException("Missing required fields: " + Strings.join(",", missingFields.iterator()));
throw new IllegalArgumentException("Missing required fields: " + String.join(",", missingFields));
}

if (!template.getSchema().equals(V2PipelineTemplate.V2_SCHEMA_VERSION)) {
Expand All @@ -72,7 +72,7 @@ default void validate(V2PipelineTemplate template) {
if (!invalidVariableNames.isEmpty()) {
throw new IllegalArgumentException(
String.format("Illegal variable names: %s. Variable names must match the regex: %s",
Strings.join(", ", invalidVariableNames.iterator()),
String.join(", ", invalidVariableNames),
TEMPLATE_VALID_VARIABLE_NAME_REGEX));
}
}
Expand Down

0 comments on commit f7842b2

Please sign in to comment.