Skip to content

Commit

Permalink
Upgrade dropwizard to 2.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerwowen committed Feb 13, 2024
1 parent ff11ff8 commit e85e998
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 73 deletions.
2 changes: 1 addition & 1 deletion deploy-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<encoding>UTF-8</encoding>
<project.build_id.sourceEncoding>UTF-8</project.build_id.sourceEncoding>
<micrometer.version>1.11.3</micrometer.version>
<dropwizard.version>1.3.29</dropwizard.version>
<dropwizard.version>2.1.11</dropwizard.version>
<junit-jupiter.version>5.10.1</junit-jupiter.version>
</properties>

Expand Down
49 changes: 18 additions & 31 deletions deploy-service/teletraanservice/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>teletraan-service</artifactId>
Expand All @@ -19,45 +19,32 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.deploy.skip>true</maven.deploy.skip>
<dropwizard.health.version>1.7.3</dropwizard.health.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-dependencies</artifactId>
<version>${dropwizard.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-auth</artifactId>
<version>${dropwizard.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-json-logging</artifactId>
<version>${dropwizard.version}</version>
<artifactId>dropwizard-core</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-jackson</artifactId>
<version>${dropwizard.version}</version>
<artifactId>dropwizard-auth</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</exclusion>
</exclusions>
<version>${dropwizard.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard.modules</groupId>
<artifactId>dropwizard-health</artifactId>
<version>${dropwizard.health.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.4.1.Final</version>
<artifactId>dropwizard-json-logging</artifactId>
</dependency>
<dependency>
<groupId>com.pinterest.teletraan</groupId>
Expand Down Expand Up @@ -199,4 +186,4 @@
</build>
</profile>
</profiles>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* 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.
Expand All @@ -21,8 +21,6 @@
import io.dropwizard.setup.Environment;
import io.dropwizard.configuration.EnvironmentVariableSubstitutor;
import io.dropwizard.configuration.SubstitutingSourceProvider;
import io.dropwizard.health.conf.HealthConfiguration;
import io.dropwizard.health.core.HealthCheckBundle;
import io.dropwizard.setup.Bootstrap;

public class TeletraanAgentService extends Application<TeletraanServiceConfiguration> {
Expand All @@ -39,13 +37,7 @@ public void initialize(Bootstrap<TeletraanServiceConfiguration> bootstrap) {
new EnvironmentVariableSubstitutor(false)
)
);
bootstrap.addBundle(new HealthCheckBundle<TeletraanServiceConfiguration>() {
@Override
protected HealthConfiguration getHealthConfiguration(final TeletraanServiceConfiguration configuration) {
return configuration.getHealthConfiguration();
}
});
}
}

@Override
public void run(TeletraanServiceConfiguration configuration, Environment environment) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import io.dropwizard.Application;
import io.dropwizard.configuration.EnvironmentVariableSubstitutor;
import io.dropwizard.configuration.SubstitutingSourceProvider;
import io.dropwizard.health.conf.HealthConfiguration;
import io.dropwizard.health.core.HealthCheckBundle;
import io.dropwizard.jersey.jackson.JsonProcessingExceptionMapper;
import io.dropwizard.jersey.validation.JerseyViolationExceptionMapper;
import io.dropwizard.setup.Bootstrap;
Expand Down Expand Up @@ -55,12 +53,6 @@ public void initialize(Bootstrap<TeletraanServiceConfiguration> bootstrap) {
new EnvironmentVariableSubstitutor(false)
)
);
bootstrap.addBundle(new HealthCheckBundle<TeletraanServiceConfiguration>() {
@Override
protected HealthConfiguration getHealthConfiguration(final TeletraanServiceConfiguration configuration) {
return configuration.getHealthConfiguration();
}
});
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import com.pinterest.teletraan.config.WorkerConfig;

import io.dropwizard.Configuration;
import io.dropwizard.health.conf.HealthConfiguration;

public class TeletraanServiceConfiguration extends Configuration {
@Valid
Expand Down Expand Up @@ -117,9 +116,6 @@ public class TeletraanServiceConfiguration extends Configuration {
@JsonProperty("pingrequestvalidators")
private List<String> pingRequestValidators;

@JsonProperty("health")
private HealthConfiguration healthConfiguration = new HealthConfiguration();

@Valid
private MicrometerMetricsFactory metricsFactory = new MicrometerMetricsFactory();

Expand Down Expand Up @@ -290,14 +286,6 @@ public void setDefaultScmTypeName(String defaultScmTypeName) {
this.defaultScmTypeName = defaultScmTypeName;
}

public HealthConfiguration getHealthConfiguration() {
return healthConfiguration;
}

public void setHealthConfiguration(final HealthConfiguration healthConfiguration) {
this.healthConfiguration = healthConfiguration;
}

public AwsFactory getAwsFactory() {
return awsFactory;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* 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.
Expand All @@ -20,8 +20,6 @@
import io.dropwizard.setup.Environment;
import io.dropwizard.configuration.EnvironmentVariableSubstitutor;
import io.dropwizard.configuration.SubstitutingSourceProvider;
import io.dropwizard.health.conf.HealthConfiguration;
import io.dropwizard.health.core.HealthCheckBundle;
import io.dropwizard.setup.Bootstrap;

public class TeletraanWorker extends Application<TeletraanServiceConfiguration> {
Expand All @@ -38,12 +36,6 @@ public void initialize(Bootstrap<TeletraanServiceConfiguration> bootstrap) {
new EnvironmentVariableSubstitutor(false)
)
);
bootstrap.addBundle(new HealthCheckBundle<TeletraanServiceConfiguration>() {
@Override
protected HealthConfiguration getHealthConfiguration(final TeletraanServiceConfiguration configuration) {
return configuration.getHealthConfiguration();
}
});
}

@Override
Expand Down

0 comments on commit e85e998

Please sign in to comment.