From a754df95f916e75328df8a6f2dc826b7117d2be2 Mon Sep 17 00:00:00 2001 From: Michael Disaro Date: Mon, 13 May 2024 19:09:08 +0200 Subject: [PATCH 1/4] chore: update app insights --- pom.xml | 844 +++++++++--------- .../MockDeserializerIntegrationTest.java | 8 +- 2 files changed, 436 insertions(+), 416 deletions(-) diff --git a/pom.xml b/pom.xml index 18cbe2a..1e93caa 100644 --- a/pom.xml +++ b/pom.xml @@ -1,433 +1,453 @@ - - 4.0.0 + + 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.6.6 - + + org.springframework.boot + spring-boot-starter-parent + 2.6.6 + - it.gov.pagopa - paymentupdater - 2.6.7 + it.gov.pagopa + paymentupdater + 2.6.7 - - 17 - UTF-8 + + 17 + UTF-8 - 1.5.8 - 2.8.0 - 1.15.3 + 1.5.8 + 2.8.0 + 1.15.3 - 3.8.1 - 5.1.0 - dev - + 3.8.1 + 5.1.0 + + dev + - - - - io.github.resilience4j - resilience4j-retry - 1.7.1 - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-validation - + + + + io.github.resilience4j + resilience4j-retry + 1.7.1 + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-validation + - - - io.swagger - swagger-annotations - ${swagger-annotations-version} - - - io.springfox - springfox-swagger2 - ${springfox-version} - - - io.springfox - springfox-swagger-ui - ${springfox-version} - - - javax.xml.bind - jaxb-api - 2.2.11 - - - org.glassfish.jaxb - jaxb-runtime - runtime - - - org.openapitools - jackson-databind-nullable - 0.2.1 - - - - com.google.code.gson - gson - 2.9.0 - - - org.springframework.boot - spring-boot-configuration-processor - true - - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.boot - spring-boot-starter-actuator - + + + io.swagger + swagger-annotations + ${swagger-annotations-version} + + + io.springfox + springfox-swagger2 + ${springfox-version} + + + io.springfox + springfox-swagger-ui + ${springfox-version} + + + javax.xml.bind + jaxb-api + 2.2.11 + + + org.glassfish.jaxb + jaxb-runtime + runtime + + + org.openapitools + jackson-databind-nullable + 0.2.1 + + + + com.google.code.gson + gson + 2.9.0 + + + org.springframework.boot + spring-boot-configuration-processor + true + + + org.springframework.boot + spring-boot-starter-security + + + org.springframework.boot + spring-boot-starter-test + test + + + org.springframework.boot + spring-boot-starter-actuator + - - - org.apache.commons - commons-lang3 - 3.12.0 - - - org.projectlombok - lombok - true - 1.18.22 - - - org.thymeleaf - thymeleaf-spring5 - 3.0.12.RELEASE - - - com.azure - azure-core-http-netty - 1.9.1 - - - com.azure - azure-core - 1.26.0 - + + + org.apache.commons + commons-lang3 + 3.12.0 + + + org.projectlombok + lombok + true + 1.18.22 + + + org.thymeleaf + thymeleaf-spring5 + 3.0.12.RELEASE + + + com.azure + azure-core-http-netty + 1.9.1 + + + com.azure + azure-core + 1.26.0 + - - - org.junit.vintage - junit-vintage-engine - test - - - org.testcontainers - testcontainers - ${testcontainer-version} - test - - - org.testcontainers - junit-jupiter - ${testcontainer-version} - test - + + + org.junit.vintage + junit-vintage-engine + test + + + org.testcontainers + testcontainers + ${testcontainer-version} + test + + + org.testcontainers + junit-jupiter + ${testcontainer-version} + test + - - - org.apache.logging.log4j - log4j-api - 2.17.1 - - - org.apache.logging.log4j - log4j-to-slf4j - 2.16.0 - - - - org.apache.avro - avro - 1.8.2 - - - org.apache.avro - avro-maven-plugin - 1.8.2 - - - com.azure - azure-messaging-eventhubs - 5.11.2 - - - com.azure - azure-messaging-eventhubs-checkpointstore-blob - 1.6.0 - - - - org.apache.avro - avro - 1.11.0 - - - - org.json - json - 20220320 - - - - org.springframework.boot - spring-boot-starter-data-mongodb - - - org.springframework.boot - spring-boot-starter-webflux - - - tech.allegro.schema.json2avro - converter - 0.2.14 - + + + org.apache.logging.log4j + log4j-api + 2.17.1 + + + org.apache.logging.log4j + log4j-to-slf4j + 2.16.0 + + + + org.apache.avro + avro + 1.8.2 + + + org.apache.avro + avro-maven-plugin + 1.8.2 + + + com.azure + azure-messaging-eventhubs + 5.11.2 + + + com.azure + azure-messaging-eventhubs-checkpointstore-blob + 1.6.0 + + + + org.apache.avro + avro + 1.11.0 + + + + org.json + json + 20220320 + + + + org.springframework.boot + spring-boot-starter-data-mongodb + + + org.springframework.boot + spring-boot-starter-webflux + + + tech.allegro.schema.json2avro + converter + 0.2.14 + - - org.springframework.kafka - spring-kafka-test - 2.8.6 - test - - - org.springframework.kafka - spring-kafka - 2.8.5 - - - org.springframework - spring-test - 5.3.19 - test - - - org.springframework.boot - spring-boot-starter-quartz - - - com.microsoft.azure - applicationinsights-core - 2.6.4 - - - javax.transaction - javax.transaction-api - 1.3 - - - org.apache.avro - avro-compiler - 1.8.2 - - + + org.springframework.kafka + spring-kafka-test + 2.8.6 + test + + + org.springframework.kafka + spring-kafka + 2.8.5 + + + org.springframework + spring-test + 5.3.19 + test + + + org.springframework.boot + spring-boot-starter-quartz + + + com.microsoft.azure + applicationinsights-core + 3.5.2 + + + javax.transaction + javax.transaction-api + 1.3 + + + org.apache.avro + avro-compiler + 1.8.2 + + - - - - src/main/resources - true - - fonts/* - - - - - src/main/resources - false - - fonts/* - - - - - - org.apache.maven.plugins - maven-resources-plugin - 3.1.0 - - - org.springframework.boot - spring-boot-maven-plugin - - it.gov.pagopa.paymentupdater.Application - - - org.projectlombok - lombok - - - - - - org.openapitools - openapi-generator-maven-plugin - ${openapi-generator-maven-plugin-version} - - - spring-server - - generate - - - ${project.basedir}/openapi/openapi_V1.yaml - ${project.build.directory}/generated-sources + + + + src/main/resources + true + + fonts/* + + + + + src/main/resources + false + + fonts/* + + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.1.0 + + + org.springframework.boot + spring-boot-maven-plugin + + it.gov.pagopa.paymentupdater.Application + + + org.projectlombok + lombok + + + + + + org.openapitools + openapi-generator-maven-plugin + ${openapi-generator-maven-plugin-version} + + + spring-server + + generate + + + ${project.basedir}/openapi/openapi_V1.yaml + ${project.build.directory}/generated-sources - spring - ${project.groupId}.${project.artifactId}.api - ${project.groupId}.${project.artifactId}.model - true - - true - @lombok.Builder @lombok.NoArgsConstructor @lombok.AllArgsConstructor - - - - - + spring + ${project.groupId}.${project.artifactId}.api + + ${project.groupId}.${project.artifactId}.model + + true + + true + @lombok.Builder + @lombok.NoArgsConstructor @lombok.AllArgsConstructor + + + + + + - - org.jacoco - jacoco-maven-plugin - 0.8.8 - - - default-prepare-agent - - prepare-agent - - - - report - prepare-package - - report - - - - - - org/openapitools/**/* - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - download-files - generate-sources - - run - - - - - - - - - - - - - - - org.apache.avro - avro-maven-plugin - 1.8.1 - - - avro generation - generate-sources - - schema - - - - **/*.json - - ${project.basedir}/src/main/resources/avro - ${project.basedir}/target/generated-sources/src/main/java - String - - - - avro test generation - generate-test-sources - - schema - - - - **/*.json - - ${project.basedir}/src/main/resources/avro - ${project.basedir}/target/generated-sources/src/main/java - String - - - - - - io.swagger - swagger-codegen-maven-plugin - 2.4.7 - - - - generate - - - ${basedir}/src/main/resources/api-auth-v2.yaml - java - resttemplate - ${project.basedir}/target/generated-sources/ + + org.jacoco + jacoco-maven-plugin + 0.8.8 + + + default-prepare-agent + + prepare-agent + + + + report + prepare-package + + report + + + + + + org/openapitools/**/* + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + download-files + generate-sources + + run + + + + + + + + + + + + + + + org.apache.avro + avro-maven-plugin + 1.8.1 + + + avro generation + generate-sources + + schema + + + + **/*.json + + ${project.basedir}/src/main/resources/avro + + + ${project.basedir}/target/generated-sources/src/main/java + + String + + + + avro test generation + generate-test-sources + + schema + + + + **/*.json + + ${project.basedir}/src/main/resources/avro + + + ${project.basedir}/target/generated-sources/src/main/java + + String + + + + + + io.swagger + swagger-codegen-maven-plugin + 2.4.7 + + + + generate + + + ${basedir}/src/main/resources/api-auth-v2.yaml + + java + resttemplate + ${project.basedir}/target/generated-sources/ - it.gov.pagopa.paymentupdater.restclient.proxy.api - it.gov.pagopa.paymentupdater.restclient.proxy.model - it.gov.pagopa.paymentupdater.restclient.proxy + it.gov.pagopa.paymentupdater.restclient.proxy.api + + + it.gov.pagopa.paymentupdater.restclient.proxy.model + + it.gov.pagopa.paymentupdater.restclient.proxy + - false - false - false - false - - java8 + false + false + false + false + + java8 - - - - - - - + + + + + + + diff --git a/src/test/java/it/gov/pagopa/paymentupdater/MockDeserializerIntegrationTest.java b/src/test/java/it/gov/pagopa/paymentupdater/MockDeserializerIntegrationTest.java index 087332c..37c6141 100644 --- a/src/test/java/it/gov/pagopa/paymentupdater/MockDeserializerIntegrationTest.java +++ b/src/test/java/it/gov/pagopa/paymentupdater/MockDeserializerIntegrationTest.java @@ -1,5 +1,6 @@ package it.gov.pagopa.paymentupdater; +import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; @@ -39,7 +40,6 @@ import com.fasterxml.jackson.databind.DatabindException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.microsoft.applicationinsights.core.dependencies.apachecommons.io.output.ByteArrayOutputStream; import dto.message; import it.gov.pagopa.paymentupdater.deserialize.AvroMessageDeserializer; @@ -64,7 +64,7 @@ public class MockDeserializerIntegrationTest extends AbstractMock { @Autowired CommonErrorHandler commonErrorHandler; - + @Mock ObjectMapper mapper; @@ -122,12 +122,12 @@ public void test_paymentDeserialize_KO() throws StreamReadException, DatabindExc protected void mockKafkaDeserializationErrorHandler(Exception unexpectedException, boolean recordIsNotNull) { List> records = new ArrayList<>(); - + if (recordIsNotNull) { ConsumerRecord record = new ConsumerRecord<>("message", 0, 439198, null, null); records.add(record); } - + Map props = new HashMap<>(); props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "PLAINTEXT://localhost:9065"); props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"); From e8a801169fc318e407abf9d06cf39dc6856732d3 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Tue, 14 May 2024 08:10:17 +0000 Subject: [PATCH 2/4] Bump version [skip ci] --- helm/Chart.yaml | 4 ++-- helm/values-beta.yaml | 2 +- helm/values-prod01.yaml | 2 +- openapi/openapi.yaml | 2 +- openapi/openapi_V1.yaml | 2 +- pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index ac78949..610a50b 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: io-pagopa-payment-updater-ms description: io-pagopa-payment-updater-ms type: application -version: 2.6.7 -appVersion: 2.6.7 +version: 2.6.8 +appVersion: 2.6.8 dependencies: - name: microservice-chart version: 5.2.0 diff --git a/helm/values-beta.yaml b/helm/values-beta.yaml index f1ce2ea..1ea91f1 100644 --- a/helm/values-beta.yaml +++ b/helm/values-beta.yaml @@ -2,7 +2,7 @@ microservice-chart: namespace: "payments" image: repository: "iopcommonacr.azurecr.io/io-pagopa-payment-updater-ms" - tag: "2.6.7" + tag: "2.6.8" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod01.yaml b/helm/values-prod01.yaml index 90ab72d..dbc83bb 100644 --- a/helm/values-prod01.yaml +++ b/helm/values-prod01.yaml @@ -2,7 +2,7 @@ microservice-chart: namespace: "payments" image: repository: "iopcommonacr.azurecr.io/io-pagopa-payment-updater-ms" - tag: "2.6.7" + tag: "2.6.8" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 8398340..329abbc 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -2,7 +2,7 @@ swagger: '2.0' info: title: Microservice JAVA API description: Microservice JAVA API - version: '2.6.7' + version: '2.6.8' host: localhost basePath: /api/v1 schemes: diff --git a/openapi/openapi_V1.yaml b/openapi/openapi_V1.yaml index dbd72db..492722c 100644 --- a/openapi/openapi_V1.yaml +++ b/openapi/openapi_V1.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Microservice JAVA API description: Microservice JAVA API - version: 2.6.7 + version: 2.6.8 servers: - url: http://localhost:9090/api/v1/payment description: DEV diff --git a/pom.xml b/pom.xml index 1e93caa..13303db 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ it.gov.pagopa paymentupdater - 2.6.7 + 2.6.8 17 From 3f5650b3cced61af5208b5bc84c274745239df5f Mon Sep 17 00:00:00 2001 From: Michael Disaro Date: Tue, 14 May 2024 10:28:13 +0200 Subject: [PATCH 3/4] chore: updated application insights agent on docker container --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f0e28a7..658a440 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ FROM eclipse-temurin:17.0.10_7-jdk-alpine RUN addgroup -S spring && adduser -S spring -G spring USER spring:spring -ADD --chown=spring:spring https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.1.1/applicationinsights-agent-3.1.1.jar /applicationinsights-agent.jar +ADD --chown=spring:spring https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.5.2/applicationinsights-agent-3.5.2.jar /applicationinsights-agent.jar COPY --chown=spring:spring docker/applicationinsights.json ./applicationinsights.json COPY --chown=spring:spring --from=builder dependencies/ ./ From 63fc81848c5e59c42f5f240b51cf6a7fabede0d9 Mon Sep 17 00:00:00 2001 From: pagopa-github-bot Date: Tue, 14 May 2024 08:39:56 +0000 Subject: [PATCH 4/4] Bump version [skip ci] --- helm/Chart.yaml | 4 ++-- helm/values-beta.yaml | 2 +- helm/values-prod01.yaml | 2 +- openapi/openapi.yaml | 2 +- openapi/openapi_V1.yaml | 2 +- pom.xml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 610a50b..6f70e79 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: io-pagopa-payment-updater-ms description: io-pagopa-payment-updater-ms type: application -version: 2.6.8 -appVersion: 2.6.8 +version: 2.6.9 +appVersion: 2.6.9 dependencies: - name: microservice-chart version: 5.2.0 diff --git a/helm/values-beta.yaml b/helm/values-beta.yaml index 1ea91f1..acea833 100644 --- a/helm/values-beta.yaml +++ b/helm/values-beta.yaml @@ -2,7 +2,7 @@ microservice-chart: namespace: "payments" image: repository: "iopcommonacr.azurecr.io/io-pagopa-payment-updater-ms" - tag: "2.6.8" + tag: "2.6.9" pullPolicy: Always livenessProbe: httpGet: diff --git a/helm/values-prod01.yaml b/helm/values-prod01.yaml index dbc83bb..a3fe6ef 100644 --- a/helm/values-prod01.yaml +++ b/helm/values-prod01.yaml @@ -2,7 +2,7 @@ microservice-chart: namespace: "payments" image: repository: "iopcommonacr.azurecr.io/io-pagopa-payment-updater-ms" - tag: "2.6.8" + tag: "2.6.9" pullPolicy: Always livenessProbe: httpGet: diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index 329abbc..981170d 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -2,7 +2,7 @@ swagger: '2.0' info: title: Microservice JAVA API description: Microservice JAVA API - version: '2.6.8' + version: '2.6.9' host: localhost basePath: /api/v1 schemes: diff --git a/openapi/openapi_V1.yaml b/openapi/openapi_V1.yaml index 492722c..389cc63 100644 --- a/openapi/openapi_V1.yaml +++ b/openapi/openapi_V1.yaml @@ -2,7 +2,7 @@ openapi: 3.0.0 info: title: Microservice JAVA API description: Microservice JAVA API - version: 2.6.8 + version: 2.6.9 servers: - url: http://localhost:9090/api/v1/payment description: DEV diff --git a/pom.xml b/pom.xml index 13303db..363fb1e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ it.gov.pagopa paymentupdater - 2.6.8 + 2.6.9 17