Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tech debt pom versions #2335

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ jobs:
with:
name: code-coverage-report-dpc-api
path: ./jacoco-reports
- name: "Smoke Test"
run: |
make smoke
# - name: "Smoke Test"
# run: |
# make smoke

build-dpc-web:
name: "Build and Test DPC Web"
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ ops/config/decrypted/*
!ops/config/decrypted/README.md
.mvn/

/tmp/cache/*
/tmp/local_secret.txt
/tmp/letter_opener/admin/*
/tmp/letter_opener/web/*
/tmp
!/tmp/.keep

# Ignore Go unit test results
dpc-go/dpc-api/results.json
Expand All @@ -65,3 +63,4 @@ dpc-go/dpc-attribution/src/attribution
#BFD Certs
dpc-go/dpc-attribution/shared_files/decrypted/*
!dpc-go/dpc-attribution/shared_files/decrypted/README.md
!/tmp/
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ services:
- export-volume:/tmp
- ./:/usr/src/mymaven
working_dir: /usr/src/mymaven
command: sh -c "mvn test -Pintegration-tests -am -ntp"
command: sh -c "mvn verify -Pintegration-tests -am -ntp -Djib.skip=true $${TEST_VERBOSITY+$( [ \"$$TEST_VERBOSITY\" = \"true\" ] && echo '-Dtest.verbosity=true' )}"
network_mode: host

volumes:
Expand Down
2 changes: 1 addition & 1 deletion dpc-admin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apk update && \

# Set the working directory
RUN mkdir -p /dpc-admin/vendor/api_client
Workdir /dpc-admin
WORKDIR /dpc-admin

# Copy over the files needed to fetch dependencies
COPY /engines/api_client/ /dpc-admin/vendor/api_client/
Expand Down
2 changes: 1 addition & 1 deletion dpc-admin/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ "$1" == "admin" ]; then
# Autogenerate fresh golden macaroons in local development
if [[ "$RAILS_ENV" != "production" ]] && [[ -z "$GOLDEN_MACAROON" ]]; then
echo "No golden macaroon found. Attempting to generate a new one..."
export GOLDEN_MACAROON=$(curl -X POST -w '\n' ${API_ADMIN_URL}/tasks/generate-token || echo '')
GOLDEN_MACAROON=$(wget -q --post-data '\n' "${API_ADMIN_URL}/tasks/generate-token" -O- || echo '')

if [ -n "$GOLDEN_MACAROON" ]; then
echo "Successfully generated new golden macaroon."
Expand Down
155 changes: 130 additions & 25 deletions dpc-aggregation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,23 @@
<properties>
<mainClass>gov.cms.dpc.aggregation.DPCAggregationService</mainClass>
<resilience4j.version>1.7.1</resilience4j.version>
<exec.skip>true</exec.skip>
<test.verbosity>false</test.verbosity>
<disable.console>true</disable.console>
</properties>

<dependencies>
<dependency>
<groupId>gov.cms.dpc</groupId>
<artifactId>dpc-common</artifactId>
<version>0.4.0-SNAPSHOT</version>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.inject</artifactId>
<version>0.9.0.M3</version>
</dependency>
<dependency>
<groupId>gov.cms.dpc</groupId>
<artifactId>dpc-testing</artifactId>
<version>0.4.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-migrations</artifactId>
Expand All @@ -47,12 +46,8 @@
</dependency>
<!--No longer shipped with Java 11, so we need to include it manually-->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>gov.cms.dpc</groupId>
Expand All @@ -75,14 +70,10 @@
<artifactId>hapi-fhir-structures-r4</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ru.vyarus</groupId>
<artifactId>dropwizard-guicey</artifactId>
</dependency>
<dependency>
<groupId>io.reactivex.rxjava2</groupId>
<artifactId>rxjava</artifactId>
Expand Down Expand Up @@ -113,7 +104,6 @@
<dependency>
<groupId>com.newrelic.agent.java</groupId>
<artifactId>newrelic-java</artifactId>
<version>${newrelic.agent.version}</version>
<type>${newrelic.agent.type}</type>
</dependency>
<dependency>
Expand All @@ -127,11 +117,6 @@
<scope>test</scope>
</dependency>
<!-- required by HAPI FHIR; specifying non-vulnerable version -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
Expand Down Expand Up @@ -172,6 +157,7 @@
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
Expand Down Expand Up @@ -238,6 +224,125 @@
</container>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<dependencies>
<dependency>
<groupId>me.fabriciorby</groupId>
<artifactId>maven-surefire-junit5-tree-reporter</artifactId>
<version>1.3.0</version>
</dependency>
</dependencies>
<configuration>
<reportFormat>plain</reportFormat>
<consoleOutputReporter>
<disable>${disable.console}</disable>
</consoleOutputReporter>
<statelessTestsetInfoReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporterUnicode">
<theme>UNICODE</theme>
<printStacktraceOnFailure>${test.verbosity}</printStacktraceOnFailure>
<printStdoutOnFailure>${test.verbosity}</printStdoutOnFailure>
<printStderrOnFailure>${test.verbosity}</printStderrOnFailure>
</statelessTestsetInfoReporter>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<dependencies>
<dependency>
<groupId>me.fabriciorby</groupId>
<artifactId>maven-surefire-junit5-tree-reporter</artifactId>
<version>1.3.0</version>
</dependency>
</dependencies>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<reportFormat>plain</reportFormat>
<consoleOutputReporter>
<disable>${disable.console}</disable>
</consoleOutputReporter>
<statelessTestsetInfoReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporterUnicode">
<theme>UNICODE</theme>
<printStacktraceOnFailure>${test.verbosity}</printStacktraceOnFailure>
<printStdoutOnFailure>${test.verbosity}</printStdoutOnFailure>
<printStderrOnFailure>${test.verbosity}</printStderrOnFailure>
</statelessTestsetInfoReporter>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>integration-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
<phase>integration-test</phase>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>unit-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>unit-test</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<id>project.local</id>
<name>project</name>
<url>file://${project.basedir}/../repo</url>
</repository>
</repositories>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.codahale.metrics.MetricRegistry;
import com.google.inject.Binder;
import com.google.inject.Provides;
import com.google.inject.name.Named;
import com.google.inject.Scopes;
import gov.cms.dpc.aggregation.engine.AggregationEngine;
import gov.cms.dpc.aggregation.engine.JobBatchProcessor;
import gov.cms.dpc.aggregation.engine.OperationsConfig;
Expand All @@ -20,9 +20,11 @@
import gov.cms.dpc.queue.models.JobQueueBatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.vyarus.dropwizard.guice.module.support.DropwizardAwareModule;

import javax.inject.Singleton;
import jakarta.inject.Singleton;
import com.hubspot.dropwizard.guicier.DropwizardAwareModule;
import gov.cms.dpc.fhir.parameters.ProvenanceResourceValueFactory;
import jakarta.inject.Named;

public class AggregationAppModule extends DropwizardAwareModule<DPCAggregationConfiguration> {

Expand All @@ -40,6 +42,7 @@ public void configure() {
binder.bind(AggregationManager.class).asEagerSingleton();
binder.bind(JobBatchProcessor.class);
binder.bind(AggregationEngineHealthCheck.class);
bind(ProvenanceResourceValueFactory.class).in(Scopes.SINGLETON);

// Healthchecks
// Additional health-checks can be added here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.inject.Inject;
import jakarta.inject.Inject;

public class AggregationManager implements Managed {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
import io.dropwizard.core.Configuration;
import io.dropwizard.db.DataSourceFactory;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.time.YearMonth;
import java.time.ZoneId;
import java.util.List;
Expand Down Expand Up @@ -147,5 +147,6 @@ public void setLookBackExemptOrgs(List<String> lookBackExemptOrgs) {
this.lookBackExemptOrgs = lookBackExemptOrgs;
}

@Override
public DPCAwsQueueConfiguration getDpcAwsQueueConfiguration() { return this.dpcAwsQueueConfiguration; }
}
Loading
Loading