diff --git a/build.gradle b/build.gradle index a531fbae1..d866866e2 100644 --- a/build.gradle +++ b/build.gradle @@ -83,6 +83,7 @@ allprojects { implementation('org.apache.logging.log4j:log4j-slf4j-impl') implementation('org.apache.logging.log4j:log4j-jul') implementation('org.apache.logging.log4j:log4j-web') + compileOnly 'org.projectlombok:lombok:1.18.34' annotationProcessor 'org.projectlombok:lombok:1.18.34' diff --git a/dependencies.gradle b/dependencies.gradle index b768c98d3..93637ab1b 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -60,7 +60,7 @@ ext { revFasterXml = '2.15.3' revAmqpClient = '5.13.0' revKafka = '2.6.0' - revMicrometer = '1.8.12' + revMicrometer = '1.13.1' revPrometheus = '0.9.0' revElasticSearch7 = '7.17.19' revCodec = '1.15' @@ -68,5 +68,6 @@ ext { revNatsStreaming = '2.6.5' revNats = '2.16.14' revStan = '2.2.3' + revFlyway = '9.0.4' } diff --git a/metrics/src/main/java/com/netflix/conductor/contribs/metrics/PrometheusMetricsConfiguration.java b/metrics/src/main/java/com/netflix/conductor/contribs/metrics/PrometheusMetricsConfiguration.java index 38c5756c7..244fbcb69 100644 --- a/metrics/src/main/java/com/netflix/conductor/contribs/metrics/PrometheusMetricsConfiguration.java +++ b/metrics/src/main/java/com/netflix/conductor/contribs/metrics/PrometheusMetricsConfiguration.java @@ -21,7 +21,6 @@ import com.netflix.spectator.micrometer.MicrometerRegistry; import io.micrometer.core.instrument.MeterRegistry; -import io.micrometer.prometheus.PrometheusRenameFilter; /** * Metrics prometheus module, sending all metrics to a Prometheus server. @@ -40,7 +39,6 @@ public class PrometheusMetricsConfiguration { public PrometheusMetricsConfiguration(MeterRegistry meterRegistry) { LOGGER.info("Prometheus metrics module initialized"); final MicrometerRegistry metricsRegistry = new MicrometerRegistry(meterRegistry); - meterRegistry.config().meterFilter(new PrometheusRenameFilter()); Spectator.globalRegistry().add(metricsRegistry); } } diff --git a/metrics/src/test/java/com/netflix/conductor/contribs/metrics/PrometheusMetricsConfigurationTest.java b/metrics/src/test/java/com/netflix/conductor/contribs/metrics/PrometheusMetricsConfigurationTest.java index f094d377b..5bceccddf 100644 --- a/metrics/src/test/java/com/netflix/conductor/contribs/metrics/PrometheusMetricsConfigurationTest.java +++ b/metrics/src/test/java/com/netflix/conductor/contribs/metrics/PrometheusMetricsConfigurationTest.java @@ -31,8 +31,7 @@ import com.netflix.spectator.micrometer.MicrometerRegistry; import io.micrometer.core.instrument.MeterRegistry; -import io.micrometer.prometheus.PrometheusConfig; -import io.micrometer.prometheus.PrometheusMeterRegistry; +import io.micrometer.core.instrument.simple.SimpleMeterRegistry; import static org.junit.Assert.assertTrue; @@ -72,7 +71,7 @@ public static class TestConfig { @Bean @Primary public MeterRegistry meterRegistry() { - return new PrometheusMeterRegistry(PrometheusConfig.DEFAULT); + return new SimpleMeterRegistry(); } } } diff --git a/postgres-external-storage/build.gradle b/postgres-external-storage/build.gradle index a429cc067..5322185bc 100644 --- a/postgres-external-storage/build.gradle +++ b/postgres-external-storage/build.gradle @@ -7,7 +7,7 @@ dependencies { implementation "org.postgresql:postgresql:${revPostgres}" implementation 'org.springframework.boot:spring-boot-starter-jdbc' - implementation 'org.flywaydb:flyway-core' + implementation "org.flywaydb:flyway-core:${revFlyway}" implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${revSpringDoc}" implementation "commons-codec:commons-codec:${revCodec}" diff --git a/postgres-persistence/build.gradle b/postgres-persistence/build.gradle index a9f740b64..125d603d9 100644 --- a/postgres-persistence/build.gradle +++ b/postgres-persistence/build.gradle @@ -15,10 +15,9 @@ dependencies { implementation "org.apache.commons:commons-lang3" implementation "org.postgresql:postgresql:${revPostgres}" implementation "org.springframework.boot:spring-boot-starter-jdbc" - implementation "org.flywaydb:flyway-core" + implementation "org.flywaydb:flyway-core:${revFlyway}" testImplementation "org.apache.groovy:groovy-all:${revGroovy}" - testImplementation project(':conductor-server') testImplementation project(':conductor-client') testImplementation project(':conductor-grpc-client') diff --git a/postgres-persistence/src/main/java/com/netflix/conductor/postgres/config/PostgresConfiguration.java b/postgres-persistence/src/main/java/com/netflix/conductor/postgres/config/PostgresConfiguration.java index 1e00cb067..8debc582c 100644 --- a/postgres-persistence/src/main/java/com/netflix/conductor/postgres/config/PostgresConfiguration.java +++ b/postgres-persistence/src/main/java/com/netflix/conductor/postgres/config/PostgresConfiguration.java @@ -65,7 +65,7 @@ public Flyway flywayForPrimaryDb() { config.locations("classpath:db/migration_postgres"); } - return config.configuration(Map.of("flyway.postgresql.transactional.lock", "false")) + return config.configuration(Map.of()) .schemas(properties.getSchema()) .dataSource(dataSource) .outOfOrder(true) diff --git a/rest/src/main/java/com/netflix/conductor/rest/controllers/ApplicationExceptionMapper.java b/rest/src/main/java/com/netflix/conductor/rest/controllers/ApplicationExceptionMapper.java index 6aa1aa904..486853b9f 100644 --- a/rest/src/main/java/com/netflix/conductor/rest/controllers/ApplicationExceptionMapper.java +++ b/rest/src/main/java/com/netflix/conductor/rest/controllers/ApplicationExceptionMapper.java @@ -22,6 +22,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; +import org.springframework.web.servlet.resource.NoResourceFoundException; import com.netflix.conductor.common.validation.ErrorResponse; import com.netflix.conductor.core.exception.ConflictException; @@ -49,6 +50,7 @@ public class ApplicationExceptionMapper { EXCEPTION_STATUS_MAP.put(ConflictException.class, HttpStatus.CONFLICT); EXCEPTION_STATUS_MAP.put(IllegalArgumentException.class, HttpStatus.BAD_REQUEST); EXCEPTION_STATUS_MAP.put(InvalidFormatException.class, HttpStatus.INTERNAL_SERVER_ERROR); + EXCEPTION_STATUS_MAP.put(NoResourceFoundException.class, HttpStatus.NOT_FOUND); } @ExceptionHandler(Throwable.class) diff --git a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/HierarchicalForkJoinSubworkflowRerunSpec.groovy b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/HierarchicalForkJoinSubworkflowRerunSpec.groovy index c1c93f304..1a8f1dff4 100644 --- a/test-harness/src/test/groovy/com/netflix/conductor/test/integration/HierarchicalForkJoinSubworkflowRerunSpec.groovy +++ b/test-harness/src/test/groovy/com/netflix/conductor/test/integration/HierarchicalForkJoinSubworkflowRerunSpec.groovy @@ -237,6 +237,7 @@ class HierarchicalForkJoinSubworkflowRerunSpec extends AbstractSpecification { then: "verify that a new mid level workflow is created and is in RUNNING state" newMidLevelWorkflowId != midLevelWorkflowId + workflowExecutor.decide(newMidLevelWorkflowId) with(workflowExecutionService.getExecutionStatus(newMidLevelWorkflowId, true)) { status == Workflow.WorkflowStatus.RUNNING tasks.size() == 4