From bfe8c4cd6a7ad48f0d2dc5f4abfca6b0885b1fb0 Mon Sep 17 00:00:00 2001 From: Piotr Przybylski Date: Fri, 20 Sep 2024 11:38:39 +0200 Subject: [PATCH] Update dependencies (#6176) --- build.sbt | 80 +++++++++---------- .../api/component/ComponentProvider.scala | 2 +- docs/Changelog.md | 3 + .../lite/components/utils/AvroGen.scala | 2 - .../ComponentFromProvidersExtractorTest.scala | 2 +- 5 files changed, 45 insertions(+), 44 deletions(-) diff --git a/build.sbt b/build.sbt index 324d4ab2343..1cd052a2bdf 100644 --- a/build.sbt +++ b/build.sbt @@ -30,7 +30,7 @@ lazy val supportedScalaVersions = List(scala212, scala213) // Silencer 1.7.x require Scala 2.12.11 (see warning above) // Silencer (and all '@silent' annotations) can be removed after we can upgrade to 2.12.13... // https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html -lazy val silencerV = "1.7.14" +lazy val silencerV = "1.7.17" lazy val silencerV_2_12 = "1.6.0" //TODO: replace configuration by system properties with configuration via environment after removing travis scripts @@ -171,7 +171,7 @@ lazy val commonSettings = ), // We ignore k8s tests to keep development setup low-dependency Test / testOptions ++= Seq(scalaTestReports, ignoreSlowTests, ignoreExternalDepsTests), - addCompilerPlugin("org.typelevel" % "kind-projector" % "0.13.2" cross CrossVersion.full), + addCompilerPlugin("org.typelevel" % "kind-projector" % "0.13.3" cross CrossVersion.full), libraryDependencies += compilerPlugin( "com.github.ghik" % "silencer-plugin" % forScalaVersion(scalaVersion.value) { case (2, 12) => silencerV_2_12 @@ -291,7 +291,7 @@ val kafkaV = "3.6.2" //TODO: Spring 5.3 has some problem with handling our PrimitiveOrWrappersPropertyAccessor val springV = "5.2.23.RELEASE" val scalaTestV = "3.2.18" -val scalaCheckV = "1.17.0" +val scalaCheckV = "1.17.1" val scalaCheckVshort = scalaCheckV.take(4).replace(".", "-") val scalaTestPlusV = "3.2.18.0" // has to match scalatest and scalacheck versions, see https://github.com/scalatest/scalatestplus-scalacheck/releases @@ -300,12 +300,12 @@ val logbackV = "1.2.13" // this is used in cloud, official JsonEncoder uses different field layout val logbackJsonV = "0.1.5" val betterFilesV = "3.9.2" -val circeV = "0.14.6" -val circeGenericExtrasV = "0.14.3" -val circeYamlV = "0.15.2" -val jwtCirceV = "10.0.0" -val jacksonV = "2.15.4" -val catsV = "2.10.0" +val circeV = "0.14.10" +val circeGenericExtrasV = "0.14.4" +val circeYamlV = "0.15.2" // 0.15.3 drops Scala 2.12 +val jwtCirceV = "10.0.1" +val jacksonV = "2.17.2" +val catsV = "2.12.0" val catsEffectV = "3.5.4" val everitSchemaV = "1.14.4" val slf4jV = "1.7.36" @@ -318,40 +318,40 @@ val configV = "1.4.3" // rc16+ depend on slf4j 2.x val dropWizardV = "5.0.0-rc15" val scalaCollectionsCompatV = "2.12.0" -val testContainersScalaV = "0.41.3" -val testContainersJavaV = "1.19.8" -val nettyV = "4.1.109.Final" +val testContainersScalaV = "0.41.4" +val testContainersJavaV = "1.20.1" +val nettyV = "4.1.113.Final" val nettyReactiveStreamsV = "2.0.12" val akkaV = "2.6.20" val akkaHttpV = "10.2.10" val akkaManagementV = "1.1.4" val akkaHttpCirceV = "1.39.2" -val slickV = "3.4.1" -val slickPgV = "0.21.1" +val slickV = "3.4.1" // 3.5 drops Scala 2.12 +val slickPgV = "0.21.1" // 0.22.2 uses Slick 3.5 val hikariCpV = "5.1.0" -val hsqldbV = "2.7.2" -val postgresV = "42.7.3" +val hsqldbV = "2.7.3" +val postgresV = "42.7.4" // Flway 10 requires Java 17 val flywayV = "9.22.3" val confluentV = "7.5.1" val azureKafkaSchemaRegistryV = "1.1.1" -val azureSchemaRegistryV = "1.4.4" -val azureIdentityV = "1.12.0" +val azureSchemaRegistryV = "1.4.9" +val azureIdentityV = "1.13.3" val bcryptV = "0.10.2" -val cronParserV = "9.1.6" // 9.1.7+ requires JDK 16+ +val cronParserV = "9.1.6" // 9.1.7+ requires JDK 16+ val javaxValidationApiV = "2.0.1.Final" val caffeineCacheV = "3.1.8" -val sttpV = "3.9.5" +val sttpV = "3.9.8" val tapirV = "1.10.5" val openapiCirceYamlV = "0.9.0" //we use legacy version because this one supports Scala 2.12 val monocleV = "2.1.0" val jmxPrometheusJavaagentV = "0.20.0" -val wireMockV = "2.35.2" +val wireMockV = "3.9.1" val findBugsV = "3.0.2" -val enumeratumV = "1.7.3" -val ujsonV = "3.1.2" +val enumeratumV = "1.7.4" +val ujsonV = "4.0.1" val igniteV = "2.10.0" // depending on scala version one of this jar lays in Flink lib dir @@ -617,8 +617,8 @@ lazy val flinkDeploymentManager = (project in flink("management")) ), "org.apache.flink" % "flink-statebackend-rocksdb" % flinkV % flinkScope, "com.softwaremill.retry" %% "retry" % "0.3.6", - "com.github.tomakehurst" % "wiremock-jre8" % wireMockV % Test, - "org.scalatestplus" %% "mockito-4-11" % scalaTestPlusV % Test, + "org.wiremock" % "wiremock" % wireMockV % Test, + "org.scalatestplus" %% "mockito-5-10" % scalaTestPlusV % Test, ) ++ flinkLibScalaDeps(scalaVersion.value, Some(flinkScope)) }, // override scala-collection-compat from com.softwaremill.retry:retry @@ -1147,7 +1147,7 @@ lazy val testUtils = (project in utils("test-utils")) "com.dimafeng" %% "testcontainers-scala-core" % testContainersScalaV, "com.lihaoyi" %% "ujson" % ujsonV, // This lib produces more descriptive errors during validation than everit - "com.networknt" % "json-schema-validator" % "1.4.0", + "com.networknt" % "json-schema-validator" % "1.5.1", "com.softwaremill.sttp.tapir" %% "tapir-core" % tapirV, "com.softwaremill.sttp.tapir" %% "tapir-apispec-docs" % tapirV, "com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % openapiCirceYamlV, @@ -1158,7 +1158,7 @@ lazy val testUtils = (project in utils("test-utils")) // rest-assured is not cross compiled, so we have to use different versions def restAssuredDependency(scalaVersion: String) = forScalaVersion(scalaVersion) { case (2, 12) => Seq("io.rest-assured" % "scala-support" % "4.0.0") - case (2, 13) => Seq("io.rest-assured" % "scala-support" % "5.3.1") + case (2, 13) => Seq("io.rest-assured" % "scala-support" % "5.5.0") } lazy val jsonUtils = (project in utils("json-utils")) @@ -1296,7 +1296,7 @@ lazy val liteKafkaComponentsTests: Project = (project in lite("components/kafka- Seq( "org.scalacheck" %% "scalacheck" % scalaCheckV % Test, "org.scalatestplus" %% s"scalacheck-$scalaCheckVshort" % scalaTestPlusV % Test, - "org.scalatestplus" %% "mockito-4-11" % scalaTestPlusV % Test, + "org.scalatestplus" %% "mockito-5-10" % scalaTestPlusV % Test, ) }, ) @@ -1500,7 +1500,7 @@ lazy val liteK8sDeploymentManager = (project in lite("k8sDeploymentManager")) "com.github.julien-truffaut" %% "monocle-core" % monocleV, "com.github.julien-truffaut" %% "monocle-macro" % monocleV, "com.typesafe.akka" %% "akka-slf4j" % akkaV % Test, - "com.github.tomakehurst" % "wiremock-jre8" % wireMockV % Test + "org.wiremock" % "wiremock" % wireMockV % Test, ) }, buildAndImportRuntimeImageToK3d := { @@ -1539,7 +1539,7 @@ lazy val componentsApi = (project in file("components-api")) "com.beachape" %% "enumeratum" % enumeratumV, "com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingV, "com.typesafe" % "config" % configV, - "com.vdurmont" % "semver4j" % "3.1.0", + "org.semver4j" % "semver4j" % "5.4.0", "javax.validation" % "validation-api" % javaxValidationApiV, "org.scala-lang.modules" %% "scala-collection-compat" % scalaCollectionsCompatV, "com.iheart" %% "ficus" % ficusV, @@ -1619,15 +1619,15 @@ lazy val security = (project in file("security")) "io.circe" %% "circe-core" % circeV, "com.github.jwt-scala" %% "jwt-circe" % jwtCirceV, "com.typesafe.scala-logging" %% "scala-logging" % scalaLoggingV, - "com.auth0" % "jwks-rsa" % "0.22.0", // a tool library for reading a remote JWK store, not an Auth0 service dependency + "com.auth0" % "jwks-rsa" % "0.22.1", // a tool library for reading a remote JWK store, not an Auth0 service dependency "com.softwaremill.sttp.tapir" %% "tapir-core" % tapirV, "com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirV, "com.dimafeng" %% "testcontainers-scala-scalatest" % testContainersScalaV % "it,test", - "com.github.dasniko" % "testcontainers-keycloak" % "2.5.0" % "it,test" excludeAll ( + "com.github.dasniko" % "testcontainers-keycloak" % "2.6.0" % "it,test" excludeAll ( ExclusionRule("commons-logging", "commons-logging"), // we're using testcontainers-scala which requires a proper junit4 dependency ExclusionRule("io.quarkus", "quarkus-junit4-mock") - ) + ) // 3.x requires Java 17 ) ) .dependsOn(utilsInternal, httpUtils, testUtils % "it,test") @@ -1666,7 +1666,7 @@ lazy val processReports = (project in file("designer/processReports")) Seq( "com.dimafeng" %% "testcontainers-scala-scalatest" % testContainersScalaV % "it,test", "com.dimafeng" %% "testcontainers-scala-influxdb" % testContainersScalaV % "it,test", - "org.influxdb" % "influxdb-java" % "2.23" % "it,test" + "org.influxdb" % "influxdb-java" % "2.24" % "it,test" ) } ) @@ -1894,7 +1894,7 @@ lazy val deploymentManagerApi = (project in file("designer/deployment-manager-ap "com.typesafe.akka" %% "akka-actor" % akkaV, "com.softwaremill.sttp.client3" %% "core" % sttpV, "com.github.ben-manes.caffeine" % "caffeine" % caffeineCacheV, - "org.scalatestplus" %% "mockito-4-11" % scalaTestPlusV % Test + "org.scalatestplus" %% "mockito-5-10" % scalaTestPlusV % Test ) } ) @@ -1982,7 +1982,7 @@ lazy val designer = (project in file("designer/server")) "org.hsqldb" % "hsqldb" % hsqldbV, "org.postgresql" % "postgresql" % postgresV, "org.flywaydb" % "flyway-core" % flywayV, - "org.apache.xmlgraphics" % "fop" % "2.8" exclude ("commons-logging", "commons-logging"), + "org.apache.xmlgraphics" % "fop" % "2.9" exclude ("commons-logging", "commons-logging"), "com.beachape" %% "enumeratum-circe" % enumeratumV, "tf.tofu" %% "derevo-circe" % "0.13.0", "com.softwaremill.sttp.apispec" %% "openapi-circe-yaml" % openapiCirceYamlV, @@ -1993,18 +1993,18 @@ lazy val designer = (project in file("designer/server")) "com.softwaremill.sttp.tapir" %% "tapir-json-circe" % tapirV, "com.softwaremill.sttp.tapir" %% "tapir-swagger-ui-bundle" % tapirV, "io.circe" %% "circe-generic-extras" % circeGenericExtrasV, - "org.reflections" % "reflections" % "0.10.2", + "org.reflections" % "reflections" % "0.10.2" % Test, "com.github.pathikrit" %% "better-files" % betterFilesV, "com.dimafeng" %% "testcontainers-scala-scalatest" % testContainersScalaV % Test, "com.dimafeng" %% "testcontainers-scala-postgresql" % testContainersScalaV % Test, - "org.scalatestplus" %% "mockito-4-11" % scalaTestPlusV % Test, + "org.scalatestplus" %% "mockito-5-10" % scalaTestPlusV % Test, "io.dropwizard.metrics5" % "metrics-core" % dropWizardV, "io.dropwizard.metrics5" % "metrics-jmx" % dropWizardV, "fr.davit" %% "akka-http-metrics-dropwizard-v5" % "1.7.1", "org.scalacheck" %% "scalacheck" % scalaCheckV % Test, "com.github.erosb" % "everit-json-schema" % everitSchemaV exclude ("commons-logging", "commons-logging"), "org.apache.flink" % "flink-metrics-dropwizard" % flinkV % Test, - "com.github.tomakehurst" % "wiremock-jre8" % wireMockV % Test, + "org.wiremock" % "wiremock" % wireMockV % Test, "io.circe" %% "circe-yaml" % circeYamlV % Test, "com.github.scopt" %% "scopt" % "4.1.0" % Test, "org.questdb" % "questdb" % "7.4.2", @@ -2012,7 +2012,7 @@ lazy val designer = (project in file("designer/server")) case (2, 13) => Seq( "org.scala-lang.modules" %% "scala-parallel-collections" % "1.0.4", - "org.scala-lang.modules" %% "scala-xml" % "2.1.0" + "org.scala-lang.modules" %% "scala-xml" % "2.3.0" ) case _ => Seq() } diff --git a/components-api/src/main/scala/pl/touk/nussknacker/engine/api/component/ComponentProvider.scala b/components-api/src/main/scala/pl/touk/nussknacker/engine/api/component/ComponentProvider.scala index 629a1c644da..f5290ca4fea 100644 --- a/components-api/src/main/scala/pl/touk/nussknacker/engine/api/component/ComponentProvider.scala +++ b/components-api/src/main/scala/pl/touk/nussknacker/engine/api/component/ComponentProvider.scala @@ -2,8 +2,8 @@ package pl.touk.nussknacker.engine.api.component import cats.data.NonEmptySet import com.typesafe.config.{Config, ConfigFactory} -import com.vdurmont.semver4j.Semver import net.ceedubs.ficus.readers.{ArbitraryTypeReader, ValueReader} +import org.semver4j.Semver import pl.touk.nussknacker.engine.api.component.Component._ import pl.touk.nussknacker.engine.api.process.ProcessObjectDependencies import pl.touk.nussknacker.engine.version.BuildInfo diff --git a/docs/Changelog.md b/docs/Changelog.md index d75efecbea2..8c0603fa7d0 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -50,6 +50,9 @@ * [#6886](https://github.com/TouK/nussknacker/pull/6886) Fix for "Illegal table name:$nuCatalog" error when using Apache Iceberg catalog. Internal Nussknacker catalog is now named `_nu_catalog` * [#6766](https://github.com/TouK/nussknacker/pull/6766) Scenario labels support - you can assign labels to scenarios and use them to filter the scenario list +* [#6176](https://github.com/TouK/nussknacker/pull/6176) Update most dependencies to latest versions, most important ones: + * Jackson 2.15.4 -> 2.17.2 + * cats 2.10 -> 2.12 ## 1.17 diff --git a/engine/lite/components/kafka-tests/src/test/scala/pl/touk/nussknacker/engine/lite/components/utils/AvroGen.scala b/engine/lite/components/kafka-tests/src/test/scala/pl/touk/nussknacker/engine/lite/components/utils/AvroGen.scala index 3dbb9a57b9f..2a0422240ad 100644 --- a/engine/lite/components/kafka-tests/src/test/scala/pl/touk/nussknacker/engine/lite/components/utils/AvroGen.scala +++ b/engine/lite/components/kafka-tests/src/test/scala/pl/touk/nussknacker/engine/lite/components/utils/AvroGen.scala @@ -22,8 +22,6 @@ object AvroGen { private val MaxStringLength = 16 private val MapBaseKey = "key" - private val random = new scala.util.Random - def genSchema(config: ExcludedConfig): Gen[Schema] = genSchemaType(config).flatMap(genSchema(_, config.withoutRoot())) def genSchema(schemaType: Type, config: ExcludedConfig): Gen[Schema] = schemaType match { diff --git a/scenario-compiler/src/test/scala/pl/touk/nussknacker/engine/definition/component/ComponentFromProvidersExtractorTest.scala b/scenario-compiler/src/test/scala/pl/touk/nussknacker/engine/definition/component/ComponentFromProvidersExtractorTest.scala index ffde16812ef..7e8455b870a 100644 --- a/scenario-compiler/src/test/scala/pl/touk/nussknacker/engine/definition/component/ComponentFromProvidersExtractorTest.scala +++ b/scenario-compiler/src/test/scala/pl/touk/nussknacker/engine/definition/component/ComponentFromProvidersExtractorTest.scala @@ -1,10 +1,10 @@ package pl.touk.nussknacker.engine.definition.component import com.typesafe.config.{Config, ConfigFactory, ConfigValueFactory} -import com.vdurmont.semver4j.Semver import net.ceedubs.ficus.Ficus._ import org.scalatest.funsuite.AnyFunSuite import org.scalatest.matchers.should.Matchers +import org.semver4j.Semver import pl.touk.nussknacker.engine.ConfigWithUnresolvedVersion import pl.touk.nussknacker.engine.api.component._ import pl.touk.nussknacker.engine.api.process.{ProcessObjectDependencies, Sink, SinkFactory}