From 1fb62e168db4f72fae264a097337e811a247ee16 Mon Sep 17 00:00:00 2001 From: "scala-steward-asf[bot]" <147768647+scala-steward-asf[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 00:09:25 +0000 Subject: [PATCH 1/3] Update scalafmt-core to 3.8.5 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 479a4ed1..37d0d16c 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.8.3 +version = 3.8.5 runner.dialect = scala213 project.git = true style = defaultWithAlign From 1561c4c81d5e6f12c6025b46fd7d9faca352693a Mon Sep 17 00:00:00 2001 From: "scala-steward-asf[bot]" <147768647+scala-steward-asf[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 00:09:34 +0000 Subject: [PATCH 2/3] Reformat with scalafmt 3.8.5 Executed command: scalafmt --non-interactive --- .../kafka/benchmarks/PerfFixtureHelpers.scala | 2 +- .../ReactiveKafkaConsumerBenchmarks.scala | 2 +- .../ReactiveKafkaProducerBenchmarks.scala | 2 +- .../ReactiveKafkaTransactionBenchmarks.scala | 2 +- build.sbt | 3 +-- .../kafka/scaladsl/MetadataClientSpec.scala | 16 ++++++++-------- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/PerfFixtureHelpers.scala b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/PerfFixtureHelpers.scala index 5a96782f..7653ddda 100644 --- a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/PerfFixtureHelpers.scala +++ b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/PerfFixtureHelpers.scala @@ -46,7 +46,7 @@ object PerfFixtureHelpers { private[benchmarks] trait PerfFixtureHelpers extends LazyLogging { import PerfFixtureHelpers._ - val producerTimeout = 6 minutes + val producerTimeout = 6.minutes val logPercentStep = 25 val adminClientCloseTimeout = Duration.ofSeconds(5) val producerCloseTimeout = adminClientCloseTimeout diff --git a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaConsumerBenchmarks.scala b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaConsumerBenchmarks.scala index be66980a..a912cbf5 100644 --- a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaConsumerBenchmarks.scala +++ b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaConsumerBenchmarks.scala @@ -36,7 +36,7 @@ import scala.language.postfixOps import scala.util.Success object ReactiveKafkaConsumerBenchmarks extends LazyLogging with InflightMetrics { - val streamingTimeout: FiniteDuration = 30 minutes + val streamingTimeout: FiniteDuration = 30.minutes type NonCommittableFixture = ReactiveKafkaConsumerTestFixture[ConsumerRecord[Array[Byte], String]] type CommittableFixture = ReactiveKafkaConsumerTestFixture[CommittableMessage[Array[Byte], String]] diff --git a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaProducerBenchmarks.scala b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaProducerBenchmarks.scala index b622e62d..6fb3b0a1 100644 --- a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaProducerBenchmarks.scala +++ b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaProducerBenchmarks.scala @@ -30,7 +30,7 @@ import scala.concurrent.duration._ import scala.language.postfixOps object ReactiveKafkaProducerBenchmarks extends LazyLogging { - val streamingTimeout = 30 minutes + val streamingTimeout = 30.minutes val logStep = 100000 type Fixture = ReactiveKafkaConsumerTestFixture[CommittableMessage[Array[Byte], String]] diff --git a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaTransactionBenchmarks.scala b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaTransactionBenchmarks.scala index 55ec86f2..778e80e7 100644 --- a/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaTransactionBenchmarks.scala +++ b/benchmarks/src/main/scala/org/apache/pekko/kafka/benchmarks/ReactiveKafkaTransactionBenchmarks.scala @@ -30,7 +30,7 @@ import scala.language.postfixOps import scala.util.Success object ReactiveKafkaTransactionBenchmarks extends LazyLogging { - val streamingTimeout: FiniteDuration = 30 minutes + val streamingTimeout: FiniteDuration = 30.minutes type TransactionFixture = ReactiveKafkaTransactionTestFixture[KTransactionMessage, KProducerMessage, KResult] /** diff --git a/build.sbt b/build.sbt index 7d35492f..cbf5bb3d 100644 --- a/build.sbt +++ b/build.sbt @@ -135,8 +135,7 @@ lazy val docs = project Preprocess / siteSubdirName := s"api/pekko-connectors-kafka/${projectInfoVersion.value}", Preprocess / sourceDirectory := (LocalRootProject / ScalaUnidoc / unidoc / target).value, Preprocess / preprocessRules := Seq( - ("\\.java\\.scala".r, _ => ".java"), - ("https://javadoc\\.io/page/".r, _ => "https://javadoc\\.io/static/"), + ("\\.java\\.scala".r, _ => ".java"), ("https://javadoc\\.io/page/".r, _ => "https://javadoc\\.io/static/"), // bug in Scaladoc ("https://docs\\.oracle\\.com/en/java/javase/11/docs/api/java.base/java/time/Duration\\$.html".r, _ => "https://docs\\.oracle\\.com/en/java/javase/11/docs/api/java.base/java/time/Duration.html"), diff --git a/tests/src/test/scala/org/apache/pekko/kafka/scaladsl/MetadataClientSpec.scala b/tests/src/test/scala/org/apache/pekko/kafka/scaladsl/MetadataClientSpec.scala index e9f4f082..7bcb9722 100644 --- a/tests/src/test/scala/org/apache/pekko/kafka/scaladsl/MetadataClientSpec.scala +++ b/tests/src/test/scala/org/apache/pekko/kafka/scaladsl/MetadataClientSpec.scala @@ -31,7 +31,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val partition0 = new TopicPartition(topic1, 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10)) @@ -49,7 +49,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val nonExistingPartition = new TopicPartition("non-existing topic", 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) val beginningOffsetsFuture = metadataClient .getBeginningOffsets(Set(nonExistingPartition)) @@ -65,7 +65,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val partition0 = new TopicPartition(topic1, 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10)) @@ -83,7 +83,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val group1 = createGroupId(1) val partition0 = new TopicPartition(topic1, 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10)) @@ -98,7 +98,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val group1 = createGroupId(1) val nonExistingPartition = new TopicPartition("non-existing topic", 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) val endOffsetsFuture = metadataClient.getEndOffsets(Set(nonExistingPartition)) @@ -112,7 +112,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val group1 = createGroupId(1) val partition0 = new TopicPartition(topic1, 0) val consumerSettings = consumerDefaults.withGroupId(group1) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10)) @@ -128,7 +128,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val topic1 = createTopic(suffix = 1, partitions = 2) val topic2 = createTopic(suffix = 2, partitions = 1) val consumerSettings = consumerDefaults.withGroupId(group) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic1, 1 to 10, partition = 0)) awaitProduce(produce(topic1, 1 to 10, partition = 1)) @@ -148,7 +148,7 @@ class MetadataClientSpec extends SpecBase with TestcontainersKafkaLike { val group = createGroupId(1) val topic = createTopic(suffix = 1, partitions = 2) val consumerSettings = consumerDefaults.withGroupId(group) - val metadataClient = MetadataClient.create(consumerSettings, 1 second) + val metadataClient = MetadataClient.create(consumerSettings, 1.second) awaitProduce(produce(topic, 1 to 10, partition = 0)) awaitProduce(produce(topic, 1 to 10, partition = 1)) From a5a410d1fc2ddfcad815790a9c9e5c9cc49740e0 Mon Sep 17 00:00:00 2001 From: "scala-steward-asf[bot]" <147768647+scala-steward-asf[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 00:09:34 +0000 Subject: [PATCH 3/3] Add 'Reformat with scalafmt 3.8.5' to .git-blame-ignore-revs --- .git-blame-ignore-revs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index a9431e2b..ffa90746 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -12,3 +12,6 @@ d12fb4427a1ccff4660b6c559b858adfe4eebaf0 # Scala Steward: Reformat with scalafmt 3.8.3 3f4adc5fafe17c8de66876d3a93a8eb54e1d65d3 + +# Scala Steward: Reformat with scalafmt 3.8.5 +1561c4c81d5e6f12c6025b46fd7d9faca352693a