From e77c0907b0792cd4ef1c5594c5b1d9efd43f48d8 Mon Sep 17 00:00:00 2001 From: Junji Takakura Date: Thu, 27 Jun 2024 08:25:22 +0900 Subject: [PATCH 1/2] Update akka dependencies to pekko and change package names --- build.sbt | 18 +++++++++--------- .../common/interpreters/AkkaHttpDSL.scala | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.sbt b/build.sbt index 30bbee1..a83c934 100644 --- a/build.sbt +++ b/build.sbt @@ -12,11 +12,11 @@ lazy val commonSettings = Seq( "-Ywarn-unused" ), libraryDependencies ++= { - val catsVersion = "2.8.0" - val monixVersion = "3.2.2" - val doobieVersion = "0.9.0" - val akkaVersion = "2.6.17" - val akkaHttpVersion = "10.2.7" + val catsVersion = "2.8.0" + val monixVersion = "3.2.2" + val doobieVersion = "0.9.0" + val pekkoVersion = "1.0.3" + val pekkoHttpVersion = "1.0.1" Seq( "org.typelevel" %% "cats-core" % catsVersion, "org.typelevel" %% "cats-kernel" % catsVersion, @@ -25,10 +25,10 @@ lazy val commonSettings = Seq( "io.monix" %% "monix-reactive" % monixVersion, "org.tpolecat" %% "doobie-core" % doobieVersion, "org.tpolecat" %% "doobie-hikari" % doobieVersion, - "com.typesafe.akka" %% "akka-actor" % akkaVersion, - "com.typesafe.akka" %% "akka-stream" % akkaVersion, - "com.typesafe.akka" %% "akka-slf4j" % akkaVersion, - "com.typesafe.akka" %% "akka-http" % akkaHttpVersion, + "org.apache.pekko" %% "pekko-actor" % pekkoVersion, + "org.apache.pekko" %% "pekko-stream" % pekkoVersion, + "org.apache.pekko" %% "pekko-slf4j" % pekkoVersion, + "org.apache.pekko" %% "pekko-http" % pekkoHttpVersion, "org.xerial" % "sqlite-jdbc" % "3.36.0.3", "com.nulab-inc" % "backlog4j" % "2.5.2", "org.typelevel" %% "simulacrum" % "1.0.0", diff --git a/core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/AkkaHttpDSL.scala b/core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/AkkaHttpDSL.scala index 12ef40b..acd6a61 100644 --- a/core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/AkkaHttpDSL.scala +++ b/core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/AkkaHttpDSL.scala @@ -2,13 +2,13 @@ package com.nulabinc.backlog.migration.common.interpreters import java.net.InetSocketAddress -import akka.actor.ActorSystem -import akka.http.scaladsl.model._ -import akka.http.scaladsl.model.headers.{BasicHttpCredentials, HttpCredentials} -import akka.http.scaladsl.settings.{ClientConnectionSettings, ConnectionPoolSettings} -import akka.http.scaladsl.{ClientTransport, Http} import com.nulabinc.backlog.migration.common.dsl.{HttpDSL, HttpQuery, RequestError, ServerDown} import monix.eval.Task +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.model._ +import org.apache.pekko.http.scaladsl.model.headers.{BasicHttpCredentials, HttpCredentials} +import org.apache.pekko.http.scaladsl.settings.{ClientConnectionSettings, ConnectionPoolSettings} +import org.apache.pekko.http.scaladsl.{ClientTransport, Http} import org.slf4j.LoggerFactory import scala.concurrent.ExecutionContext From f83ad59c5d33ac9dbb146b79834758a1f0e5c63d Mon Sep 17 00:00:00 2001 From: Junji Takakura Date: Thu, 27 Jun 2024 10:08:04 +0900 Subject: [PATCH 2/2] BLG_INTG-1603 Change names containing akka --- .../migration/common/conf/BacklogConfiguration.scala | 8 ++++---- .../{AkkaHttpDSL.scala => PekkoHttpDSL.scala} | 2 +- core/src/test/resources/application.conf | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/{AkkaHttpDSL.scala => PekkoHttpDSL.scala} (99%) diff --git a/core/src/main/scala/com/nulabinc/backlog/migration/common/conf/BacklogConfiguration.scala b/core/src/main/scala/com/nulabinc/backlog/migration/common/conf/BacklogConfiguration.scala index 153c155..fb730e0 100644 --- a/core/src/main/scala/com/nulabinc/backlog/migration/common/conf/BacklogConfiguration.scala +++ b/core/src/main/scala/com/nulabinc/backlog/migration/common/conf/BacklogConfiguration.scala @@ -42,18 +42,18 @@ trait BacklogConfiguration { } } - val akkaMailBoxPool = { + val pekkoMailBoxPool = { try { - external.getInt("application.akka.mailbox-pool") + external.getInt("application.pekko.mailbox-pool") } catch { case _: ConfigException => - internal.getInt("application.akka.mailbox-pool") + internal.getInt("application.pekko.mailbox-pool") } } def getBacklogConfiguration() = { try { - external.getInt("application.akka.mailbox-pool") + external.getInt("application.pekko.mailbox-pool") external } catch { case _: ConfigException => diff --git a/core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/AkkaHttpDSL.scala b/core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/PekkoHttpDSL.scala similarity index 99% rename from core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/AkkaHttpDSL.scala rename to core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/PekkoHttpDSL.scala index acd6a61..b6630c6 100644 --- a/core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/AkkaHttpDSL.scala +++ b/core/src/main/scala/com/nulabinc/backlog/migration/common/interpreters/PekkoHttpDSL.scala @@ -16,7 +16,7 @@ import scala.concurrent.duration._ import scala.util.control.NonFatal import scala.util.{Failure, Try} -class AkkaHttpDSL()(implicit +class PekkoHttpDSL()(implicit actorSystem: ActorSystem, exc: ExecutionContext ) extends HttpDSL[Task] { diff --git a/core/src/test/resources/application.conf b/core/src/test/resources/application.conf index 67a0b9f..789b82e 100644 --- a/core/src/test/resources/application.conf +++ b/core/src/test/resources/application.conf @@ -6,7 +6,7 @@ application { backlog4jVersion = "0.0.2" export-limit-at-once = 100 language=default - akka.mailbox-pool = 100 + pekko.mailbox-pool = 100 defaultRetryCount = 3 iaah = "" }