From bee120ae7e9d077a35fb41f61f47809264fefe0b Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Sat, 3 Jun 2023 10:34:01 +0200 Subject: [PATCH] Bump slf4j to 1.7.36/2.0.12 + logback to 1.3.14/1.5.4 * For nessie-client: slf4j 1.7 + logback 1.3 * For Spark related: slf4j 1.7 + logback 1.3 * Other module: slf4j 2.0 + logback 1.5 --- api/client/build.gradle.kts | 8 ++++++-- events/service/build.gradle.kts | 2 +- gradle/libs.versions.toml | 9 +++++++-- integrations/spark-extensions/build.gradle.kts | 10 ++++++++-- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/api/client/build.gradle.kts b/api/client/build.gradle.kts index 1291baf12c2..cdf8136f021 100644 --- a/api/client/build.gradle.kts +++ b/api/client/build.gradle.kts @@ -43,7 +43,7 @@ dependencies { compileOnly(libs.httpclient5) - implementation(libs.slf4j.api) + implementation(libs.slf4j.api) { version { require(libs.versions.slf4j.compat.get()) } } compileOnly(libs.errorprone.annotations) compileOnly(libs.immutables.builder) @@ -76,7 +76,11 @@ dependencies { testFixturesApi(libs.undertow.core) testFixturesApi(libs.undertow.servlet) testFixturesApi(libs.httpclient5) - testFixturesImplementation(libs.logback.classic) + testFixturesImplementation(libs.logback.classic) { + version { require(libs.versions.logback.compat.get()) } + // Logback 1.3 brings Slf4j 2.0, which doesn't work with Spark up to 3.3 + exclude("org.slf4j", "slf4j-api") + } testImplementation(libs.wiremock) diff --git a/events/service/build.gradle.kts b/events/service/build.gradle.kts index ba26f84ec9c..73893c9d082 100644 --- a/events/service/build.gradle.kts +++ b/events/service/build.gradle.kts @@ -43,7 +43,7 @@ dependencies { testImplementation(platform(libs.junit.bom)) testImplementation(libs.bundles.junit.testing) testImplementation(libs.guava) - testImplementation(libs.logback.classic) + testRuntimeOnly(libs.logback.classic) testCompileOnly(libs.microprofile.openapi) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 45248c426bf..22e80b1647b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,6 +16,7 @@ jandex = "3.1.7" jmh = "1.37" junit = "5.10.2" keycloak = "24.0.2" +logback = "1.5.4" maven = "3.9.6" mavenResolver = "1.9.18" mockito="4.11.0" @@ -27,9 +28,13 @@ picocli = "4.7.5" protobuf = "3.25.3" quarkusPlatform = "3.9.2" quarkusPlugin = "3.9.2" -slf4j = "1.7.36" +slf4j = "2.0.12" undertow = "2.2.28.Final" +# Backwards compatibility versions. Not referenced in this file to not let Renovate bump those versions. +logback_compat = "1.3.14" # For Java 8 +slf4j_compat = "1.7.36" # Spark up to 3.3 has a hard reference to org.slf4j.impl.StaticLoggerBinder + [bundles] junit-testing = ["assertj-core", "mockito-core", "mockito-junit-jupiter", "junit-jupiter-api", "junit-jupiter-params"] @@ -93,7 +98,7 @@ jmh-generator-annprocess = { module = "org.openjdk.jmh:jmh-generator-annprocess" junit-bom = { module = "org.junit:junit-bom", version.ref = "junit" } junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api" } junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params" } -logback-classic = { module = "ch.qos.logback:logback-classic", version = "1.2.13" } +logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } keycloak-admin-client = { module = "org.keycloak:keycloak-admin-client", version.ref = "keycloak" } maven-core = { module = "org.apache.maven:maven-resolver-provider", version.ref = "maven" } maven-resolver-connector-basic = { module = "org.apache.maven.resolver:maven-resolver-connector-basic", version.ref = "mavenResolver" } diff --git a/integrations/spark-extensions/build.gradle.kts b/integrations/spark-extensions/build.gradle.kts index f7085e56073..1c2673274d9 100644 --- a/integrations/spark-extensions/build.gradle.kts +++ b/integrations/spark-extensions/build.gradle.kts @@ -49,8 +49,14 @@ dependencies { testFixturesImplementation("org.apache.iceberg:iceberg-spark-extensions-${sparkScala.sparkMajorVersion}_${sparkScala.scalaMajorVersion}:$versionIceberg") testFixturesImplementation("org.apache.iceberg:iceberg-hive-metastore:$versionIceberg") - testFixturesRuntimeOnly(libs.logback.classic) - testFixturesImplementation(libs.slf4j.log4j.over.slf4j) + testFixturesRuntimeOnly(libs.logback.classic) { + version { strictly(libs.versions.logback.compat.get()) } + // Logback 1.3 brings Slf4j 2.0, which doesn't work with Spark up to 3.3 + exclude("org.slf4j", "slf4j-api") + } + testFixturesImplementation(libs.slf4j.log4j.over.slf4j) { + version { require(libs.versions.slf4j.compat.get()) } + } testFixturesImplementation("org.apache.spark:spark-sql_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) } testFixturesImplementation("org.apache.spark:spark-core_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) } testFixturesImplementation("org.apache.spark:spark-hive_${sparkScala.scalaMajorVersion}") { forSpark(sparkScala.sparkVersion) }