diff --git a/.ackrc b/.ackrc index 09004ee7d9..706ac1ab91 100644 --- a/.ackrc +++ b/.ackrc @@ -2,6 +2,8 @@ --ignore-dir=target --ignore-dir=miniodata --ignore-dir=DB +--ignore-dir=.idea +--ignore-file=match:application.log # Add a type for messages, messages.en etc files --type-set=messages:match:/messages(\.[a-z]{2})?/ diff --git a/app/guice/SearchModule.scala b/app/guice/SearchModule.scala index d23e896cbd..843e5db382 100644 --- a/app/guice/SearchModule.scala +++ b/app/guice/SearchModule.scala @@ -19,7 +19,7 @@ class SearchModule extends AbstractModule { bind(classOf[Index]).toProvider(classOf[SolrIndexProvider]) bind(classOf[ResponseParser]).to(classOf[SolrJsonResponseParser]) bind(classOf[QueryBuilder]).to(classOf[SolrQueryBuilder]) - bind(classOf[SearchIndexMediator]).to(classOf[AkkaStreamsIndexMediator]) + bind(classOf[SearchIndexMediator]).to(classOf[PekkoStreamsIndexMediator]) bind(classOf[SearchEngine]).to(classOf[SolrSearchEngine]) bind(classOf[SearchItemResolver]).to(classOf[GidSearchResolver]) } diff --git a/build.sbt b/build.sbt index 1f6229c22d..135544a8c8 100644 --- a/build.sbt +++ b/build.sbt @@ -5,7 +5,7 @@ import com.typesafe.sbt.packager.SettingsHelper._ import com.typesafe.sbt.uglify.Import._ import com.typesafe.sbt.web.SbtWeb.autoImport._ import net.ground5hark.sbt.concat.Import._ -import play.core.PlayVersion.{akkaHttpVersion, akkaVersion} +import play.core.PlayVersion.{pekkoHttpVersion, pekkoVersion} import play.sbt.PlayImport._ import play.sbt.routes.RoutesKeys._ import play.twirl.sbt.Import.TwirlKeys.templateImports @@ -22,7 +22,7 @@ val appName = "docview" val backendVersion = "0.15.1" val dataConverterVersion = "1.1.15" -val alpakkaVersion = "3.0.4" +val pekkoConnectorsVersion = "1.0.2" // This prevents a library version incompatibility error between // scala-xml 1.3.0 and 2.2.0 (which are in fact binary compatible.) @@ -39,10 +39,10 @@ val backendDependencies = Seq( "org.apache.commons" % "commons-text" % "1.4", // Push JSON parser used for stream parsing... - "com.lightbend.akka" %% "akka-stream-alpakka-json-streaming" % alpakkaVersion, + "org.apache.pekko" %% "pekko-connectors-json-streaming" % pekkoConnectorsVersion, // CSV parser/writer... - "com.lightbend.akka" %% "akka-stream-alpakka-csv" % alpakkaVersion, + "org.apache.pekko" %% "pekko-connectors-csv" % pekkoConnectorsVersion, // IRI helper... "org.apache.jena" % "jena-iri" % "3.9.0", @@ -61,9 +61,9 @@ val coreDependencies = backendDependencies ++ Seq( // Force Scala XML version "org.scala-lang.modules" %% "scala-xml" % "2.2.0", - // Force Akka HTTP version - "com.typesafe.akka" %% "akka-http" % akkaHttpVersion, - "com.typesafe.akka" %% "akka-http-xml" % akkaHttpVersion, + // Force Pekko HTTP version + "org.apache.pekko" %% "pekko-http" % pekkoHttpVersion, + "org.apache.pekko" %% "pekko-http-xml" % pekkoHttpVersion, // Anorm DB lib "org.playframework.anorm" %% "anorm" % "2.7.0", @@ -109,13 +109,13 @@ val portalDependencies = Seq( "eu.ehri-project" % "index-data-converter" % dataConverterVersion exclude("log4j", "log4j") exclude ("org.slf4j", "slf4j-log4j12"), // S3 Upload plugin - "com.lightbend.akka" %% "akka-stream-alpakka-s3" % alpakkaVersion, + "org.apache.pekko" %% "pekko-connectors-s3" % pekkoConnectorsVersion, // S3 sdk - "software.amazon.awssdk" % "s3" % "2.15.63", + "software.amazon.awssdk" % "s3" % "2.17.113", // AWS Location sdk - "software.amazon.awssdk" % "location" % "2.15.63", + "software.amazon.awssdk" % "location" % "2.17.113", ) val adminDependencies = Seq( @@ -123,15 +123,15 @@ val adminDependencies = Seq( "org.relaxng" % "jing" % "20181222", // XML parsing - "com.lightbend.akka" %% "akka-stream-alpakka-xml" % alpakkaVersion, - "com.lightbend.akka" %% "akka-stream-alpakka-text" % alpakkaVersion, + "org.apache.pekko" %% "pekko-connectors-xml" % pekkoConnectorsVersion, + "org.apache.pekko" %% "pekko-connectors-text" % pekkoConnectorsVersion, ) val testDependencies = Seq( specs2 % Test, // Used for testing JSON stream parsing... - "com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion % Test + "org.apache.pekko" %% "pekko-stream-testkit" % pekkoVersion % Test ) val additionalResolvers = Resolver.sonatypeOssRepos("releases") ++ Seq( diff --git a/conf/application.conf b/conf/application.conf index 5267dd4bfc..f196cfca9b 100644 --- a/conf/application.conf +++ b/conf/application.conf @@ -164,8 +164,8 @@ contexts { } } -# Akka S3 defaults -alpakka.s3.aws { +# Pekko S3 defaults +pekko.connectors.s3.aws { path-style-access: false credentials.provider: static region.provider: static @@ -195,9 +195,9 @@ storage { # Classifier is basically the bucket name on AWS S3. # Config refers to a block of configuration matching - # the Alpakka reference.conf: - # https://github.com/akka/alpakka/blob/master/s3/src/main/resources/reference.conf - # Make sure this is defined, i.e. config = ${alpakka.s3} + # the Pekko connectors reference.conf: + # https://github.com/apache/pekko-connectors/blob/main/s3/src/main/resources/reference.conf + # Make sure this is defined, i.e. config = ${pekko.connectors.s3} portal { classifier = disk-a config = {} @@ -444,9 +444,9 @@ ehri { } # Ensure indexer does not idle timeout -akka.http.host-connection-pool.client.idle-timeout = 5 minutes -akka.http.client.idle-timeout = 5 minutes -akka.http.server.idle-timeout = 5 minutes +pekko.http.host-connection-pool.client.idle-timeout = 5 minutes +pekko.http.client.idle-timeout = 5 minutes +pekko.http.server.idle-timeout = 5 minutes # Ensure websocket connections do not idle timeout play.server.websocket.periodic-keep-alive-max-idle = 10 seconds diff --git a/conf/aws.conf.example b/conf/aws.conf.example index 4d4dac054d..1e172e2f8a 100644 --- a/conf/aws.conf.example +++ b/conf/aws.conf.example @@ -1,4 +1,4 @@ -akka.stream.alpakka.s3.aws { +pekko.stream.connectors.s3.aws { # e.g. "eu-west-1" region.default-region= diff --git a/conf/logback-play-dev.xml b/conf/logback-play-dev.xml index d359ef280e..2a48f722cf 100644 --- a/conf/logback-play-dev.xml +++ b/conf/logback-play-dev.xml @@ -33,7 +33,7 @@ - + @@ -76,7 +76,7 @@ - + diff --git a/modules/admin/app/actors/Ticker.scala b/modules/admin/app/actors/Ticker.scala index aab46140c5..c1e7431dd9 100644 --- a/modules/admin/app/actors/Ticker.scala +++ b/modules/admin/app/actors/Ticker.scala @@ -1,7 +1,7 @@ package actors import actors.Ticker.Tick -import akka.actor.{Actor, ActorRef, Cancellable} +import org.apache.pekko.actor.{Actor, ActorRef, Cancellable} import scala.concurrent.ExecutionContext import scala.concurrent.duration.{DurationInt, FiniteDuration} diff --git a/modules/admin/app/actors/cleanup/CleanupRunner.scala b/modules/admin/app/actors/cleanup/CleanupRunner.scala index 4142bcaf78..b1553ea05e 100644 --- a/modules/admin/app/actors/cleanup/CleanupRunner.scala +++ b/modules/admin/app/actors/cleanup/CleanupRunner.scala @@ -1,7 +1,7 @@ package actors.cleanup import actors.Ticker -import akka.actor.{Actor, ActorLogging, ActorRef, Props} +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, Props} import play.api.Configuration import services.data.{DataService, EventForwarder} import services.ingest.{Cleanup, ImportLogService, IngestService} @@ -45,7 +45,7 @@ case class CleanupRunner( )(implicit config: Configuration, ec: ExecutionContext) extends Actor with ActorLogging { import CleanupRunner._ - import akka.pattern._ + import org.apache.pekko.pattern._ private val batchSize = config.get[Int]("ehri.admin.bulkOperations.maxDeletions") diff --git a/modules/admin/app/actors/cleanup/CleanupRunnerManager.scala b/modules/admin/app/actors/cleanup/CleanupRunnerManager.scala index 5062491f8f..7d20c3503e 100644 --- a/modules/admin/app/actors/cleanup/CleanupRunnerManager.scala +++ b/modules/admin/app/actors/cleanup/CleanupRunnerManager.scala @@ -3,7 +3,7 @@ package actors.cleanup import actors.LongRunningJob.Cancel import actors.Ticker.Tick import actors.cleanup.CleanupRunner.CleanupJob -import akka.actor.{Actor, ActorContext, ActorLogging, ActorRef, Terminated} +import org.apache.pekko.actor.{Actor, ActorContext, ActorLogging, ActorRef, Terminated} import play.api.i18n.Messages import services.ingest.Cleanup import utils.WebsocketConstants diff --git a/modules/admin/app/actors/datamodel/Auditor.scala b/modules/admin/app/actors/datamodel/Auditor.scala index 78cf652d8c..c5cabae0eb 100644 --- a/modules/admin/app/actors/datamodel/Auditor.scala +++ b/modules/admin/app/actors/datamodel/Auditor.scala @@ -2,8 +2,8 @@ package actors.datamodel import actors.LongRunningJob.Cancel import actors.datamodel.AuditorManager.{AuditTask, AuditorJob} -import akka.actor.{Actor, ActorLogging, ActorRef} -import akka.pattern._ +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef} +import org.apache.pekko.pattern._ import models._ import services.data.DataUser import services.search._ diff --git a/modules/admin/app/actors/datamodel/AuditorManager.scala b/modules/admin/app/actors/datamodel/AuditorManager.scala index 3f10574923..f0a134daca 100644 --- a/modules/admin/app/actors/datamodel/AuditorManager.scala +++ b/modules/admin/app/actors/datamodel/AuditorManager.scala @@ -3,8 +3,8 @@ package actors.datamodel import actors.LongRunningJob.Cancel import actors.datamodel.Auditor.{Cancelled, CheckBatch, Checked, Completed, RunAudit} import actors.datamodel.AuditorManager.{AuditorJob, ItemResult} -import akka.actor.SupervisorStrategy.Stop -import akka.actor.{Actor, ActorLogging, ActorRef, OneForOneStrategy, Props, SupervisorStrategy, Terminated} +import org.apache.pekko.actor.SupervisorStrategy.Stop +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, OneForOneStrategy, Props, SupervisorStrategy, Terminated} import models._ import play.api.Configuration import play.api.i18n.Messages diff --git a/modules/admin/app/actors/harvesting/HarvesterManager.scala b/modules/admin/app/actors/harvesting/HarvesterManager.scala index 8303db3778..6444b7d116 100644 --- a/modules/admin/app/actors/harvesting/HarvesterManager.scala +++ b/modules/admin/app/actors/harvesting/HarvesterManager.scala @@ -2,9 +2,9 @@ package actors.harvesting import actors.LongRunningJob.Cancel import actors.harvesting.Harvester.HarvestJob -import akka.actor.Status.Failure -import akka.actor.SupervisorStrategy.Stop -import akka.actor.{Actor, ActorContext, ActorLogging, ActorRef, OneForOneStrategy, SupervisorStrategy, Terminated} +import org.apache.pekko.actor.Status.Failure +import org.apache.pekko.actor.SupervisorStrategy.Stop +import org.apache.pekko.actor.{Actor, ActorContext, ActorLogging, ActorRef, OneForOneStrategy, SupervisorStrategy, Terminated} import models.UserProfile import play.api.i18n.Messages import services.harvesting.{HarvestEventHandle, HarvestEventService, OaiPmhError} @@ -26,7 +26,7 @@ case class HarvesterManager(job: HarvestJob, init: ActorContext => ActorRef, eve import Harvester._ import HarvesterManager._ import OaiPmhHarvester._ - import akka.pattern.pipe + import org.apache.pekko.pattern.pipe override def supervisorStrategy: SupervisorStrategy = OneForOneStrategy() { case e => diff --git a/modules/admin/app/actors/harvesting/OaiPmhHarvester.scala b/modules/admin/app/actors/harvesting/OaiPmhHarvester.scala index 40766f6a2d..1029c0c1ca 100644 --- a/modules/admin/app/actors/harvesting/OaiPmhHarvester.scala +++ b/modules/admin/app/actors/harvesting/OaiPmhHarvester.scala @@ -2,8 +2,8 @@ package actors.harvesting import actors.LongRunningJob.Cancel import actors.harvesting.Harvester.HarvestJob -import akka.actor.Status.Failure -import akka.actor.{Actor, ActorLogging, ActorRef} +import org.apache.pekko.actor.Status.Failure +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef} import models.{OaiPmhConfig, UserProfile} import services.harvesting.{OaiPmhClient, OaiPmhError} import services.storage.FileStorage @@ -55,7 +55,7 @@ case class OaiPmhHarvester (client: OaiPmhClient, storage: FileStorage)( implicit userOpt: Option[UserProfile], ec: ExecutionContext) extends Actor with ActorLogging { import Harvester._ import OaiPmhHarvester._ - import akka.pattern.pipe + import org.apache.pekko.pattern.pipe override def postStop(): Unit = { log.debug("Harvester shut down") diff --git a/modules/admin/app/actors/harvesting/ResourceSyncHarvester.scala b/modules/admin/app/actors/harvesting/ResourceSyncHarvester.scala index 0838755f98..032262fab3 100644 --- a/modules/admin/app/actors/harvesting/ResourceSyncHarvester.scala +++ b/modules/admin/app/actors/harvesting/ResourceSyncHarvester.scala @@ -2,9 +2,9 @@ package actors.harvesting import actors.LongRunningJob.Cancel import actors.harvesting.Harvester.HarvestJob -import akka.actor.Status.Failure -import akka.actor.{Actor, ActorLogging, ActorRef} -import akka.http.scaladsl.model.Uri +import org.apache.pekko.actor.Status.Failure +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef} +import org.apache.pekko.http.scaladsl.model.Uri import models.{FileLink, ResourceSyncConfig, UserProfile} import services.harvesting.ResourceSyncClient import services.storage.FileStorage @@ -44,7 +44,7 @@ case class ResourceSyncHarvester (client: ResourceSyncClient, storage: FileStora implicit userOpt: Option[UserProfile], ec: ExecutionContext) extends Actor with ActorLogging { import Harvester._ import ResourceSyncHarvester._ - import akka.pattern.pipe + import org.apache.pekko.pattern.pipe override def receive: Receive = { // Start the initial harvest diff --git a/modules/admin/app/actors/harvesting/UrlSetHarvester.scala b/modules/admin/app/actors/harvesting/UrlSetHarvester.scala index 31e3f71282..806a4c2d46 100644 --- a/modules/admin/app/actors/harvesting/UrlSetHarvester.scala +++ b/modules/admin/app/actors/harvesting/UrlSetHarvester.scala @@ -2,10 +2,10 @@ package actors.harvesting import actors.LongRunningJob.Cancel import actors.harvesting.Harvester.HarvestJob -import akka.actor.Status.Failure -import akka.actor.{Actor, ActorLogging, ActorRef} -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.actor.Status.Failure +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef} +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import models.{BasicAuthConfig, UrlNameMap, UrlSetConfig, UserProfile} import play.api.http.HeaderNames import play.api.libs.ws.{WSAuthScheme, WSClient} @@ -45,7 +45,7 @@ case class UrlSetHarvester (client: WSClient, storage: FileStorage)( implicit userOpt: Option[UserProfile], ec: ExecutionContext) extends Actor with ActorLogging { import Harvester._ import UrlSetHarvester._ - import akka.pattern.pipe + import org.apache.pekko.pattern.pipe override def receive: Receive = { // Start the initial harvest diff --git a/modules/admin/app/actors/ingest/DataImporter.scala b/modules/admin/app/actors/ingest/DataImporter.scala index 0326e678e9..8b9c1fb71d 100644 --- a/modules/admin/app/actors/ingest/DataImporter.scala +++ b/modules/admin/app/actors/ingest/DataImporter.scala @@ -2,8 +2,8 @@ package actors.ingest import actors.Ticker import actors.ingest.DataImporter._ -import akka.actor.{Actor, ActorLogging, ActorRef, Props} -import akka.pattern._ +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, Props} +import org.apache.pekko.pattern._ import models._ import services.ingest.IngestService.{IngestData, IngestJob} import services.ingest._ diff --git a/modules/admin/app/actors/ingest/DataImporterManager.scala b/modules/admin/app/actors/ingest/DataImporterManager.scala index 662d2facb5..8bab76a2c8 100644 --- a/modules/admin/app/actors/ingest/DataImporterManager.scala +++ b/modules/admin/app/actors/ingest/DataImporterManager.scala @@ -2,8 +2,8 @@ package actors.ingest import actors.Ticker.Tick import actors.ingest.DataImporter.{Done, Start, Message, UnexpectedError} -import akka.actor.SupervisorStrategy.Stop -import akka.actor.{Actor, ActorLogging, ActorRef, OneForOneStrategy, Props, SupervisorStrategy, Terminated} +import org.apache.pekko.actor.SupervisorStrategy.Stop +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, OneForOneStrategy, Props, SupervisorStrategy, Terminated} import models.{ErrorLog, ImportLog} import services.ingest.IngestService.{IngestData, IngestJob} import services.ingest._ diff --git a/modules/admin/app/actors/transformation/XmlConverter.scala b/modules/admin/app/actors/transformation/XmlConverter.scala index 99412a7a9c..d659526e84 100644 --- a/modules/admin/app/actors/transformation/XmlConverter.scala +++ b/modules/admin/app/actors/transformation/XmlConverter.scala @@ -3,8 +3,8 @@ package actors.transformation import actors.LongRunningJob.Cancel import actors.transformation.XmlConverter._ import actors.transformation.XmlConverterManager.XmlConvertJob -import akka.actor.{Actor, ActorLogging, ActorRef, Scheduler} -import akka.stream.Materializer +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, Scheduler} +import org.apache.pekko.stream.Materializer import services.transformation.utils.getUtf8Transcoder import models.UserProfile import services.storage.{FileMeta, FileStorage} @@ -43,7 +43,7 @@ case class XmlConverter (job: XmlConvertJob, transformer: XmlTransformer, storag private val transformDigest: String = services.transformation.utils.digest(job.data.transformers) - import akka.pattern.pipe + import org.apache.pekko.pattern.pipe override def receive: Receive = { // Start the initial harvest @@ -94,7 +94,7 @@ case class XmlConverter (job: XmlConvertJob, transformer: XmlTransformer, storag // Fetching a file case Convert(file :: others, truncated, _, count, fresh) => - import akka.pattern.retry + import org.apache.pekko.pattern.retry implicit val scheduler: Scheduler = context.system.scheduler context.become(running(msgTo, count, fresh, total, start)) diff --git a/modules/admin/app/actors/transformation/XmlConverterManager.scala b/modules/admin/app/actors/transformation/XmlConverterManager.scala index 0252cbace1..14f59b3eff 100644 --- a/modules/admin/app/actors/transformation/XmlConverterManager.scala +++ b/modules/admin/app/actors/transformation/XmlConverterManager.scala @@ -3,9 +3,9 @@ package actors.transformation import actors.LongRunningJob.Cancel import actors.transformation.XmlConverter._ import actors.transformation.XmlConverterManager.XmlConvertJob -import akka.actor.SupervisorStrategy.Stop -import akka.actor.{Actor, ActorLogging, ActorRef, OneForOneStrategy, Props, SupervisorStrategy, Terminated} -import akka.stream.Materializer +import org.apache.pekko.actor.SupervisorStrategy.Stop +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, OneForOneStrategy, Props, SupervisorStrategy, Terminated} +import org.apache.pekko.stream.Materializer import models.{TransformationType, UserProfile} import play.api.i18n.Messages import play.api.libs.json.JsObject diff --git a/modules/admin/app/controllers/admin/Indexing.scala b/modules/admin/app/controllers/admin/Indexing.scala index adebfee1be..8488ef379b 100644 --- a/modules/admin/app/controllers/admin/Indexing.scala +++ b/modules/admin/app/controllers/admin/Indexing.scala @@ -1,6 +1,6 @@ package controllers.admin -import akka.actor.{Actor, ActorRef, ActorSystem, Props} +import org.apache.pekko.actor.{Actor, ActorRef, ActorSystem, Props} import controllers.AppComponents import controllers.base.AdminController import models.EntityType diff --git a/modules/admin/app/controllers/admin/Ingest.scala b/modules/admin/app/controllers/admin/Ingest.scala index f83bdec6b4..3bd1dcb1cc 100644 --- a/modules/admin/app/controllers/admin/Ingest.scala +++ b/modules/admin/app/controllers/admin/Ingest.scala @@ -1,8 +1,8 @@ package controllers.admin import actors.ingest.DataImporterManager -import akka.actor.Props -import akka.stream.Materializer +import org.apache.pekko.actor.Props +import org.apache.pekko.stream.Materializer import controllers.AppComponents import controllers.base.AdminController import controllers.datasets.StorageHelpers diff --git a/modules/admin/app/controllers/admin/Tasks.scala b/modules/admin/app/controllers/admin/Tasks.scala index 24a94d7a8a..51aee407e1 100644 --- a/modules/admin/app/controllers/admin/Tasks.scala +++ b/modules/admin/app/controllers/admin/Tasks.scala @@ -1,8 +1,8 @@ package controllers.admin import actors.LongRunningJob -import akka.actor.{Actor, ActorLogging, ActorNotFound, ActorSystem, Props} -import akka.stream.{Materializer, OverflowStrategy} +import org.apache.pekko.actor.{Actor, ActorLogging, ActorNotFound, ActorSystem, Props} +import org.apache.pekko.stream.{Materializer, OverflowStrategy} import controllers.AppComponents import controllers.base.AdminController import play.api.libs.json.{JsNull, JsValue, Json} diff --git a/modules/admin/app/controllers/admin/Utils.scala b/modules/admin/app/controllers/admin/Utils.scala index c2fd98988c..1c63e294d9 100644 --- a/modules/admin/app/controllers/admin/Utils.scala +++ b/modules/admin/app/controllers/admin/Utils.scala @@ -1,9 +1,9 @@ package controllers.admin -import akka.actor.ActorRef -import akka.stream.scaladsl.{BroadcastHub, Keep, Source} -import akka.stream.{CompletionStrategy, Materializer, OverflowStrategy} -import akka.{Done, NotUsed} +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.stream.scaladsl.{BroadcastHub, Keep, Source} +import org.apache.pekko.stream.{CompletionStrategy, Materializer, OverflowStrategy} +import org.apache.pekko.{Done, NotUsed} import controllers.AppComponents import controllers.base.AdminController import play.api.http.MimeTypes diff --git a/modules/admin/app/controllers/countries/Countries.scala b/modules/admin/app/controllers/countries/Countries.scala index c0d5c57c2c..c8e088451a 100644 --- a/modules/admin/app/controllers/countries/Countries.scala +++ b/modules/admin/app/controllers/countries/Countries.scala @@ -1,7 +1,7 @@ package controllers.countries -import akka.actor.{Actor, ActorRef, ActorSystem, Props} -import akka.stream.Materializer +import org.apache.pekko.actor.{Actor, ActorRef, ActorSystem, Props} +import org.apache.pekko.stream.Materializer import controllers.AppComponents import controllers.base.AdminController import controllers.generic._ diff --git a/modules/admin/app/controllers/cypher/CypherQueries.scala b/modules/admin/app/controllers/cypher/CypherQueries.scala index e1f9918381..f111492f51 100644 --- a/modules/admin/app/controllers/cypher/CypherQueries.scala +++ b/modules/admin/app/controllers/cypher/CypherQueries.scala @@ -1,9 +1,9 @@ package controllers.cypher -import akka.stream.alpakka.csv.scaladsl.CsvFormatting -import akka.stream.scaladsl.{Keep, Source} -import akka.util.ByteString +import org.apache.pekko.stream.connectors.csv.scaladsl.CsvFormatting +import org.apache.pekko.stream.scaladsl.{Keep, Source} +import org.apache.pekko.util.ByteString import controllers.base.AdminController import controllers.{AppComponents, DataFormat} import models.CypherQuery diff --git a/modules/admin/app/controllers/datamodel/EntityTypeMetadataApi.scala b/modules/admin/app/controllers/datamodel/EntityTypeMetadataApi.scala index dbf288323b..9b72cd044f 100644 --- a/modules/admin/app/controllers/datamodel/EntityTypeMetadataApi.scala +++ b/modules/admin/app/controllers/datamodel/EntityTypeMetadataApi.scala @@ -2,8 +2,8 @@ package controllers.datamodel import actors.datamodel.AuditorManager import actors.datamodel.AuditorManager.{AuditTask, AuditorJob} -import akka.actor.Props -import akka.stream.Materializer +import org.apache.pekko.actor.Props +import org.apache.pekko.stream.Materializer import controllers.AppComponents import controllers.base.{AdminController, ApiBodyParsers} import models._ diff --git a/modules/admin/app/controllers/datasets/ConvertConfigs.scala b/modules/admin/app/controllers/datasets/ConvertConfigs.scala index 0383cabaef..c402c89be0 100644 --- a/modules/admin/app/controllers/datasets/ConvertConfigs.scala +++ b/modules/admin/app/controllers/datasets/ConvertConfigs.scala @@ -2,11 +2,11 @@ package controllers.datasets import actors.transformation.XmlConverterManager import actors.transformation.XmlConverterManager.{XmlConvertData, XmlConvertJob} -import akka.NotUsed -import akka.actor.Props -import akka.stream.Materializer -import akka.stream.scaladsl.{Flow, Source} -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.Props +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{Flow, Source} +import org.apache.pekko.util.ByteString import controllers.AppComponents import controllers.base.{AdminController, ApiBodyParsers} import controllers.generic.Update diff --git a/modules/admin/app/controllers/datasets/CoreferenceTables.scala b/modules/admin/app/controllers/datasets/CoreferenceTables.scala index c638a14eea..cef3cb9781 100644 --- a/modules/admin/app/controllers/datasets/CoreferenceTables.scala +++ b/modules/admin/app/controllers/datasets/CoreferenceTables.scala @@ -1,7 +1,7 @@ package controllers.datasets -import akka.stream.Materializer -import akka.stream.scaladsl.Sink +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Sink import controllers.AppComponents import controllers.base.{AdminController, ApiBodyParsers} import controllers.generic._ diff --git a/modules/admin/app/controllers/datasets/DataTransformations.scala b/modules/admin/app/controllers/datasets/DataTransformations.scala index b0bf50873a..2eb4f9e163 100644 --- a/modules/admin/app/controllers/datasets/DataTransformations.scala +++ b/modules/admin/app/controllers/datasets/DataTransformations.scala @@ -1,6 +1,6 @@ package controllers.datasets -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import controllers.AppComponents import controllers.base.{AdminController, ApiBodyParsers} import controllers.generic.Update diff --git a/modules/admin/app/controllers/datasets/HarvestConfigs.scala b/modules/admin/app/controllers/datasets/HarvestConfigs.scala index 1cfcc048a7..614348ae0c 100644 --- a/modules/admin/app/controllers/datasets/HarvestConfigs.scala +++ b/modules/admin/app/controllers/datasets/HarvestConfigs.scala @@ -5,10 +5,10 @@ import actors.harvesting.OaiPmhHarvester.{OaiPmhHarvestData, OaiPmhHarvestJob} import actors.harvesting.ResourceSyncHarvester.{ResourceSyncData, ResourceSyncJob} import actors.harvesting.UrlSetHarvester.{UrlSetHarvesterData, UrlSetHarvesterJob} import actors.harvesting.{HarvesterManager, OaiPmhHarvester, ResourceSyncHarvester, UrlSetHarvester} -import akka.actor.{ActorContext, ActorRef, Props} -import akka.http.scaladsl.model.Uri -import akka.stream.Materializer -import akka.stream.scaladsl.Sink +import org.apache.pekko.actor.{ActorContext, ActorRef, Props} +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Sink import controllers.AppComponents import controllers.base.{AdminController, ApiBodyParsers} import controllers.generic.Update diff --git a/modules/admin/app/controllers/datasets/ImportConfigs.scala b/modules/admin/app/controllers/datasets/ImportConfigs.scala index 0ba1bac44c..1279999509 100644 --- a/modules/admin/app/controllers/datasets/ImportConfigs.scala +++ b/modules/admin/app/controllers/datasets/ImportConfigs.scala @@ -1,9 +1,9 @@ package controllers.datasets import actors.ingest -import akka.actor.Props -import akka.stream.Materializer -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.Props +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Source import controllers.AppComponents import controllers.base.{AdminController, ApiBodyParsers} import controllers.generic._ diff --git a/modules/admin/app/controllers/datasets/ImportDatasets.scala b/modules/admin/app/controllers/datasets/ImportDatasets.scala index 74b30a2a11..77618daf31 100644 --- a/modules/admin/app/controllers/datasets/ImportDatasets.scala +++ b/modules/admin/app/controllers/datasets/ImportDatasets.scala @@ -1,6 +1,6 @@ package controllers.datasets -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import controllers.AppComponents import controllers.base.{AdminController, ApiBodyParsers} import controllers.generic._ diff --git a/modules/admin/app/controllers/datasets/ImportFiles.scala b/modules/admin/app/controllers/datasets/ImportFiles.scala index cede7917b2..a6ab9677a1 100644 --- a/modules/admin/app/controllers/datasets/ImportFiles.scala +++ b/modules/admin/app/controllers/datasets/ImportFiles.scala @@ -1,9 +1,9 @@ package controllers.datasets -import akka.http.scaladsl.model.Uri -import akka.stream.Materializer -import akka.stream.scaladsl.{Sink, Source} -import akka.util.ByteString +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{Sink, Source} +import org.apache.pekko.util.ByteString import controllers.AppComponents import controllers.base.{AdminController, ApiBodyParsers} import controllers.generic._ diff --git a/modules/admin/app/controllers/datasets/ImportLogs.scala b/modules/admin/app/controllers/datasets/ImportLogs.scala index f56b4a5f3c..78ced67774 100644 --- a/modules/admin/app/controllers/datasets/ImportLogs.scala +++ b/modules/admin/app/controllers/datasets/ImportLogs.scala @@ -2,9 +2,9 @@ package controllers.datasets import actors.cleanup.CleanupRunner.CleanupJob import actors.cleanup.{CleanupRunner, CleanupRunnerManager} -import akka.actor.{ActorContext, ActorRef, Props} -import akka.stream.Materializer -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.{ActorContext, ActorRef, Props} +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Source import controllers.AppComponents import controllers.base.{AdminController, ApiBodyParsers} import controllers.generic._ diff --git a/modules/admin/app/controllers/institutions/Repositories.scala b/modules/admin/app/controllers/institutions/Repositories.scala index 15222b6bbb..a4fc950847 100644 --- a/modules/admin/app/controllers/institutions/Repositories.scala +++ b/modules/admin/app/controllers/institutions/Repositories.scala @@ -1,6 +1,6 @@ package controllers.institutions -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import controllers.AppComponents import controllers.base.{AdminController, ImageHelpers, ResolutionTooHigh, UnrecognizedType} import controllers.generic._ diff --git a/modules/admin/app/controllers/tools/Tools.scala b/modules/admin/app/controllers/tools/Tools.scala index 2e4562a14c..7bf26bbc75 100644 --- a/modules/admin/app/controllers/tools/Tools.scala +++ b/modules/admin/app/controllers/tools/Tools.scala @@ -1,12 +1,13 @@ package controllers.tools -import akka.stream.Materializer -import akka.stream.alpakka.csv.scaladsl.CsvParsing -import akka.stream.scaladsl.{FileIO, Flow, Sink, Source} -import akka.util.ByteString +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.connectors.csv.scaladsl.CsvParsing +import org.apache.pekko.stream.scaladsl.{FileIO, Flow, Sink, Source} +import org.apache.pekko.util.ByteString import controllers.base.AdminController import controllers.{AppComponents, Execution} import models.{BatchDeleteTask, ContentTypes} +import org.apache.pekko.NotUsed import play.api.data.Form import play.api.data.Forms._ import play.api.i18n.Messages @@ -73,14 +74,14 @@ case class Tools @Inject()( } - private val errorsToBytes: Flow[XmlValidationError, ByteString, akka.NotUsed] = Flow[XmlValidationError] + private val errorsToBytes: Flow[XmlValidationError, ByteString, NotUsed] = Flow[XmlValidationError] .map(e => Json.toJson(e)) .map(Json.prettyPrint) .map(ByteString.apply) .intersperse(ByteString("["), ByteString(","), ByteString("]")) private val eadValidatingBodyParser: BodyParser[Source[ByteString, _]] = BodyParser { req => - val validateFlow: Flow[ByteString, ByteString, akka.NotUsed] = Flow[ByteString] + val validateFlow: Flow[ByteString, ByteString, NotUsed] = Flow[ByteString] .prefixAndTail(0) .mapAsync(1) { case (_, src) => eadValidator.validateEad(src) } .flatMapConcat(errs => Source.apply(errs.toList)) diff --git a/modules/admin/app/models/UrlSetConfig.scala b/modules/admin/app/models/UrlSetConfig.scala index f5013b4d35..fc375492dc 100644 --- a/modules/admin/app/models/UrlSetConfig.scala +++ b/modules/admin/app/models/UrlSetConfig.scala @@ -1,6 +1,6 @@ package models -import akka.http.scaladsl.model.HttpMethods +import org.apache.pekko.http.scaladsl.model.HttpMethods case class UrlNameMap(url: String, name: String) diff --git a/modules/admin/app/services/datasets/ImportDatasetService.scala b/modules/admin/app/services/datasets/ImportDatasetService.scala index 72399bc09b..07facf1270 100644 --- a/modules/admin/app/services/datasets/ImportDatasetService.scala +++ b/modules/admin/app/services/datasets/ImportDatasetService.scala @@ -1,6 +1,6 @@ package services.datasets -import akka.util.ByteString +import org.apache.pekko.util.ByteString import com.google.inject.ImplementedBy import models.{ImportDataset, ImportDatasetInfo} import play.api.http.{MimeTypes, Writeable} diff --git a/modules/admin/app/services/datasets/SqlImportDatasetService.scala b/modules/admin/app/services/datasets/SqlImportDatasetService.scala index 6e57486100..1aafc1b13a 100644 --- a/modules/admin/app/services/datasets/SqlImportDatasetService.scala +++ b/modules/admin/app/services/datasets/SqlImportDatasetService.scala @@ -1,6 +1,6 @@ package services.datasets -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.{Macro, RowParser, _} import models.{ImportDataset, ImportDatasetInfo} import play.api.db.Database diff --git a/modules/admin/app/services/harvesting/OaiPmhClient.scala b/modules/admin/app/services/harvesting/OaiPmhClient.scala index 5e7a573cfc..215082d6d4 100644 --- a/modules/admin/app/services/harvesting/OaiPmhClient.scala +++ b/modules/admin/app/services/harvesting/OaiPmhClient.scala @@ -2,8 +2,8 @@ package services.harvesting import java.time.Instant -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import models.{OaiPmhConfig, OaiPmhIdentity} import org.w3c.dom.Element import play.api.i18n.Messages diff --git a/modules/admin/app/services/harvesting/OaiPmhRecordParser.scala b/modules/admin/app/services/harvesting/OaiPmhRecordParser.scala index 02d0297807..73e6191821 100644 --- a/modules/admin/app/services/harvesting/OaiPmhRecordParser.scala +++ b/modules/admin/app/services/harvesting/OaiPmhRecordParser.scala @@ -1,9 +1,9 @@ package services.harvesting -import akka.stream.alpakka.xml.{Characters, EndElement, ParseEvent, StartElement} -import akka.stream.scaladsl.Flow -import akka.stream.stage.{GraphStageLogic, GraphStageWithMaterializedValue, InHandler, OutHandler} -import akka.stream.{Attributes, FlowShape, Inlet, Outlet} +import org.apache.pekko.stream.connectors.xml.{Characters, EndElement, ParseEvent, StartElement} +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.stage.{GraphStageLogic, GraphStageWithMaterializedValue, InHandler, OutHandler} +import org.apache.pekko.stream.{Attributes, FlowShape, Inlet, Outlet} import scala.concurrent.{Future, Promise} diff --git a/modules/admin/app/services/harvesting/OaiPmhTokenParser.scala b/modules/admin/app/services/harvesting/OaiPmhTokenParser.scala index cf171b663c..a16fb39c39 100644 --- a/modules/admin/app/services/harvesting/OaiPmhTokenParser.scala +++ b/modules/admin/app/services/harvesting/OaiPmhTokenParser.scala @@ -1,9 +1,9 @@ package services.harvesting -import akka.stream.alpakka.xml.{Characters, EndDocument, ParseEvent, StartElement} -import akka.stream.scaladsl.Flow -import akka.stream.stage.{GraphStageLogic, GraphStageWithMaterializedValue, InHandler, OutHandler} -import akka.stream.{Attributes, FlowShape, Inlet, Outlet} +import org.apache.pekko.stream.connectors.xml.{Characters, EndDocument, ParseEvent, StartElement} +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.stage.{GraphStageLogic, GraphStageWithMaterializedValue, InHandler, OutHandler} +import org.apache.pekko.stream.{Attributes, FlowShape, Inlet, Outlet} import scala.concurrent.{Future, Promise} diff --git a/modules/admin/app/services/harvesting/ResourceSyncClient.scala b/modules/admin/app/services/harvesting/ResourceSyncClient.scala index 47e7bef7e5..86a99da70c 100644 --- a/modules/admin/app/services/harvesting/ResourceSyncClient.scala +++ b/modules/admin/app/services/harvesting/ResourceSyncClient.scala @@ -1,7 +1,7 @@ package services.harvesting -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import models.{FileLink, ResourceSyncConfig} import play.api.i18n.Messages diff --git a/modules/admin/app/services/harvesting/SqlHarvestEventService.scala b/modules/admin/app/services/harvesting/SqlHarvestEventService.scala index a39297464d..b7ea871ca4 100644 --- a/modules/admin/app/services/harvesting/SqlHarvestEventService.scala +++ b/modules/admin/app/services/harvesting/SqlHarvestEventService.scala @@ -2,7 +2,7 @@ package services.harvesting import java.io.{PrintWriter, StringWriter} -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.{Macro, RowParser, _} import javax.inject.Inject import models.{HarvestEvent, UserProfile} diff --git a/modules/admin/app/services/harvesting/SqlOaiPmhConfigService.scala b/modules/admin/app/services/harvesting/SqlOaiPmhConfigService.scala index d31254b720..0456c852c4 100644 --- a/modules/admin/app/services/harvesting/SqlOaiPmhConfigService.scala +++ b/modules/admin/app/services/harvesting/SqlOaiPmhConfigService.scala @@ -1,6 +1,6 @@ package services.harvesting -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.{RowParser, SqlParser, _} import models.OaiPmhConfig import play.api.db.Database diff --git a/modules/admin/app/services/harvesting/SqlResourceSyncConfigService.scala b/modules/admin/app/services/harvesting/SqlResourceSyncConfigService.scala index d61234f5ba..dccbb510ee 100644 --- a/modules/admin/app/services/harvesting/SqlResourceSyncConfigService.scala +++ b/modules/admin/app/services/harvesting/SqlResourceSyncConfigService.scala @@ -1,6 +1,6 @@ package services.harvesting -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.{RowParser, _} import models.ResourceSyncConfig import play.api.db.Database diff --git a/modules/admin/app/services/harvesting/SqlUrlSetConfigService.scala b/modules/admin/app/services/harvesting/SqlUrlSetConfigService.scala index 8340250b93..0aa4763243 100644 --- a/modules/admin/app/services/harvesting/SqlUrlSetConfigService.scala +++ b/modules/admin/app/services/harvesting/SqlUrlSetConfigService.scala @@ -1,6 +1,6 @@ package services.harvesting -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.postgresql._ import anorm.{RowParser, _} import models.UrlSetConfig diff --git a/modules/admin/app/services/harvesting/WSOaiPmhClient.scala b/modules/admin/app/services/harvesting/WSOaiPmhClient.scala index 07d187c7af..2457c9136a 100644 --- a/modules/admin/app/services/harvesting/WSOaiPmhClient.scala +++ b/modules/admin/app/services/harvesting/WSOaiPmhClient.scala @@ -1,11 +1,11 @@ package services.harvesting -import akka.NotUsed -import akka.stream.Materializer -import akka.stream.alpakka.xml.ParseEvent -import akka.stream.alpakka.xml.scaladsl.{XmlParsing, XmlWriting} -import akka.stream.scaladsl.{Flow, Keep, Source} -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.connectors.xml.ParseEvent +import org.apache.pekko.stream.connectors.xml.scaladsl.{XmlParsing, XmlWriting} +import org.apache.pekko.stream.scaladsl.{Flow, Keep, Source} +import org.apache.pekko.util.ByteString import models.OaiPmhIdentity.Granularity import models.{OaiPmhConfig, OaiPmhIdentity} import org.w3c.dom.Element diff --git a/modules/admin/app/services/harvesting/WSResourceSyncClient.scala b/modules/admin/app/services/harvesting/WSResourceSyncClient.scala index 654c00cd4e..03a614581b 100644 --- a/modules/admin/app/services/harvesting/WSResourceSyncClient.scala +++ b/modules/admin/app/services/harvesting/WSResourceSyncClient.scala @@ -1,10 +1,10 @@ package services.harvesting import java.util.regex.Pattern -import akka.NotUsed -import akka.stream.Materializer -import akka.stream.scaladsl.{Sink, Source} -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{Sink, Source} +import org.apache.pekko.util.ByteString import javax.inject.Inject import models._ diff --git a/modules/admin/app/services/ingest/EadValidator.scala b/modules/admin/app/services/ingest/EadValidator.scala index 13627a1670..0b624bde55 100644 --- a/modules/admin/app/services/ingest/EadValidator.scala +++ b/modules/admin/app/services/ingest/EadValidator.scala @@ -2,9 +2,9 @@ package services.ingest import java.nio.file.Path -import akka.http.scaladsl.model.Uri -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import scala.concurrent.Future diff --git a/modules/admin/app/services/ingest/ImportLogService.scala b/modules/admin/app/services/ingest/ImportLogService.scala index 3bf324ce22..3bd3b14016 100644 --- a/modules/admin/app/services/ingest/ImportLogService.scala +++ b/modules/admin/app/services/ingest/ImportLogService.scala @@ -1,6 +1,6 @@ package services.ingest -import akka.stream.scaladsl.Source +import org.apache.pekko.stream.scaladsl.Source import com.google.inject.ImplementedBy import models.ImportLog import play.api.libs.json.{Json, Writes} diff --git a/modules/admin/app/services/ingest/IngestService.scala b/modules/admin/app/services/ingest/IngestService.scala index 717088752e..7839afa05e 100644 --- a/modules/admin/app/services/ingest/IngestService.scala +++ b/modules/admin/app/services/ingest/IngestService.scala @@ -1,6 +1,6 @@ package services.ingest -import akka.actor.ActorRef +import org.apache.pekko.actor.ActorRef import models.{ContentTypes, IngestParams, IngestResult} import play.api.mvc.QueryStringBindable import services.data.DataUser diff --git a/modules/admin/app/services/ingest/RelaxNGEadValidator.scala b/modules/admin/app/services/ingest/RelaxNGEadValidator.scala index dc3e01944f..bb514a7e9b 100644 --- a/modules/admin/app/services/ingest/RelaxNGEadValidator.scala +++ b/modules/admin/app/services/ingest/RelaxNGEadValidator.scala @@ -3,10 +3,10 @@ package services.ingest import java.io.InputStreamReader import java.nio.file.Path -import akka.http.scaladsl.model.Uri -import akka.stream.Materializer -import akka.stream.scaladsl.{Source, StreamConverters} -import akka.util.ByteString +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{Source, StreamConverters} +import org.apache.pekko.util.ByteString import com.google.common.io.Resources import com.thaiopensource.util.PropertyMapBuilder import com.thaiopensource.validate.prop.rng.RngProperty diff --git a/modules/admin/app/services/ingest/SqlCoreferenceService.scala b/modules/admin/app/services/ingest/SqlCoreferenceService.scala index 09b193c809..2223b9eb84 100644 --- a/modules/admin/app/services/ingest/SqlCoreferenceService.scala +++ b/modules/admin/app/services/ingest/SqlCoreferenceService.scala @@ -1,6 +1,6 @@ package services.ingest -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.SqlParser._ import anorm._ import play.api.db.Database diff --git a/modules/admin/app/services/ingest/SqlImportConfigService.scala b/modules/admin/app/services/ingest/SqlImportConfigService.scala index 4de9e598a6..024582651a 100644 --- a/modules/admin/app/services/ingest/SqlImportConfigService.scala +++ b/modules/admin/app/services/ingest/SqlImportConfigService.scala @@ -1,6 +1,6 @@ package services.ingest -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.{Macro, RowParser, _} import models.ImportConfig import play.api.db.Database diff --git a/modules/admin/app/services/ingest/SqlImportLogService.scala b/modules/admin/app/services/ingest/SqlImportLogService.scala index 076bab5c34..c41f2ac679 100644 --- a/modules/admin/app/services/ingest/SqlImportLogService.scala +++ b/modules/admin/app/services/ingest/SqlImportLogService.scala @@ -1,8 +1,8 @@ package services.ingest -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.scaladsl.{Sink, Source} +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{Sink, Source} import anorm.SqlParser._ import anorm._ import models.ImportLog diff --git a/modules/admin/app/services/ingest/WSIngestService.scala b/modules/admin/app/services/ingest/WSIngestService.scala index 83030472e9..a1c8a5dc37 100644 --- a/modules/admin/app/services/ingest/WSIngestService.scala +++ b/modules/admin/app/services/ingest/WSIngestService.scala @@ -1,9 +1,9 @@ package services.ingest -import akka.actor.ActorRef -import akka.stream.Materializer -import akka.stream.scaladsl.{FileIO, Source} -import akka.util.ByteString +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{FileIO, Source} +import org.apache.pekko.util.ByteString import com.fasterxml.jackson.databind.JsonMappingException import models._ import play.api.cache.AsyncCacheApi diff --git a/modules/admin/app/services/ingest/XmlFormatter.scala b/modules/admin/app/services/ingest/XmlFormatter.scala index 0e22e042b4..42ea3496bc 100644 --- a/modules/admin/app/services/ingest/XmlFormatter.scala +++ b/modules/admin/app/services/ingest/XmlFormatter.scala @@ -2,11 +2,11 @@ package services.ingest import java.util -import akka.NotUsed -import akka.stream.alpakka.xml.{Characters, EndElement, ParseEvent, StartElement} -import akka.stream.scaladsl.Flow -import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler} -import akka.stream.{Attributes, FlowShape, Inlet, Outlet} +import org.apache.pekko.NotUsed +import org.apache.pekko.stream.connectors.xml.{Characters, EndElement, ParseEvent, StartElement} +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler} +import org.apache.pekko.stream.{Attributes, FlowShape, Inlet, Outlet} object XmlFormatter { diff --git a/modules/admin/app/services/transformation/DataTransformationService.scala b/modules/admin/app/services/transformation/DataTransformationService.scala index 159aa094d1..a31b849aae 100644 --- a/modules/admin/app/services/transformation/DataTransformationService.scala +++ b/modules/admin/app/services/transformation/DataTransformationService.scala @@ -1,6 +1,6 @@ package services.transformation -import akka.util.ByteString +import org.apache.pekko.util.ByteString import com.google.inject.ImplementedBy import models.{DataTransformation, DataTransformationInfo} import play.api.http.{MimeTypes, Writeable} diff --git a/modules/admin/app/services/transformation/SqlDataTransformationService.scala b/modules/admin/app/services/transformation/SqlDataTransformationService.scala index 4813c6b32f..7e347c255d 100644 --- a/modules/admin/app/services/transformation/SqlDataTransformationService.scala +++ b/modules/admin/app/services/transformation/SqlDataTransformationService.scala @@ -1,7 +1,7 @@ package services.transformation import _root_.utils.{db => dbUtils} -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.postgresql._ import anorm.{Macro, RowParser, _} import models.{DataTransformation, DataTransformationInfo} diff --git a/modules/admin/app/services/transformation/WrappingXmlTransformer.scala b/modules/admin/app/services/transformation/WrappingXmlTransformer.scala index 700ae65cb7..72b35d9454 100644 --- a/modules/admin/app/services/transformation/WrappingXmlTransformer.scala +++ b/modules/admin/app/services/transformation/WrappingXmlTransformer.scala @@ -1,8 +1,8 @@ package services.transformation -import akka.stream.Materializer -import akka.stream.scaladsl.{Flow, Source} -import akka.util.ByteString +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{Flow, Source} +import org.apache.pekko.util.ByteString import eu.ehri.project.xml.{Timer, XQueryXmlTransformer, XsltXmlTransformer} import models.TransformationType import play.api.cache.{NamedCache, SyncCacheApi} diff --git a/modules/admin/app/services/transformation/XmlTransformer.scala b/modules/admin/app/services/transformation/XmlTransformer.scala index da6ef0f548..64cb83e0ce 100644 --- a/modules/admin/app/services/transformation/XmlTransformer.scala +++ b/modules/admin/app/services/transformation/XmlTransformer.scala @@ -1,7 +1,7 @@ package services.transformation -import akka.stream.scaladsl.Flow -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.util.ByteString import com.google.inject.ImplementedBy import models.TransformationType import play.api.libs.json.JsObject diff --git a/modules/admin/app/services/transformation/utils/package.scala b/modules/admin/app/services/transformation/utils/package.scala index 2afe91ce39..dd1943b49b 100644 --- a/modules/admin/app/services/transformation/utils/package.scala +++ b/modules/admin/app/services/transformation/utils/package.scala @@ -1,10 +1,10 @@ package services.transformation -import akka.NotUsed -import akka.http.scaladsl.model.ContentType -import akka.stream.alpakka.text.scaladsl.TextFlow -import akka.stream.scaladsl.Flow -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.model.ContentType +import org.apache.pekko.stream.connectors.text.scaladsl.TextFlow +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.util.ByteString import models.TransformationType import play.api.libs.Codecs import play.api.libs.json.{JsObject, Json} diff --git a/modules/admin/test/services/harvesting/OaiPmhRecordParserSpec.scala b/modules/admin/test/services/harvesting/OaiPmhRecordParserSpec.scala index fb3fc74b85..b6a0f38818 100644 --- a/modules/admin/test/services/harvesting/OaiPmhRecordParserSpec.scala +++ b/modules/admin/test/services/harvesting/OaiPmhRecordParserSpec.scala @@ -1,10 +1,10 @@ package services.harvesting -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.alpakka.xml.scaladsl.{XmlParsing, XmlWriting} -import akka.stream.scaladsl.{Keep, Source} -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.connectors.xml.scaladsl.{XmlParsing, XmlWriting} +import org.apache.pekko.stream.scaladsl.{Keep, Source} +import org.apache.pekko.util.ByteString import play.api.test.PlaySpecification import scala.concurrent.Future diff --git a/modules/admin/test/services/harvesting/OaiPmhTokenParserSpec.scala b/modules/admin/test/services/harvesting/OaiPmhTokenParserSpec.scala index 7ac5dcb85d..32c5034867 100644 --- a/modules/admin/test/services/harvesting/OaiPmhTokenParserSpec.scala +++ b/modules/admin/test/services/harvesting/OaiPmhTokenParserSpec.scala @@ -1,10 +1,10 @@ package services.harvesting -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.alpakka.xml.scaladsl.{XmlParsing, XmlWriting} -import akka.stream.scaladsl.{Keep, Source} -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.connectors.xml.scaladsl.{XmlParsing, XmlWriting} +import org.apache.pekko.stream.scaladsl.{Keep, Source} +import org.apache.pekko.util.ByteString import play.api.test.PlaySpecification import scala.concurrent.Future diff --git a/modules/admin/test/services/harvesting/XmlFormatterSpec.scala b/modules/admin/test/services/harvesting/XmlFormatterSpec.scala index 940055bd45..9daa605dc4 100644 --- a/modules/admin/test/services/harvesting/XmlFormatterSpec.scala +++ b/modules/admin/test/services/harvesting/XmlFormatterSpec.scala @@ -1,11 +1,11 @@ package services.harvesting -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.alpakka.xml.Characters -import akka.stream.alpakka.xml.scaladsl.XmlParsing -import akka.stream.scaladsl.{Sink, Source} -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.connectors.xml.Characters +import org.apache.pekko.stream.connectors.xml.scaladsl.XmlParsing +import org.apache.pekko.stream.scaladsl.{Sink, Source} +import org.apache.pekko.util.ByteString import play.api.test.PlaySpecification import services.ingest.XmlFormatter diff --git a/modules/admin/test/services/ingest/RelaxNGEadValidatorSpec.scala b/modules/admin/test/services/ingest/RelaxNGEadValidatorSpec.scala index 91b2958423..7a111902ff 100644 --- a/modules/admin/test/services/ingest/RelaxNGEadValidatorSpec.scala +++ b/modules/admin/test/services/ingest/RelaxNGEadValidatorSpec.scala @@ -2,10 +2,10 @@ package services.ingest import java.nio.file.Paths -import akka.actor.ActorSystem -import akka.http.scaladsl.model.Uri -import akka.stream.Materializer -import akka.stream.scaladsl.FileIO +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.FileIO import com.google.common.io.Resources import play.api.test.PlaySpecification diff --git a/modules/api/app/controllers/api/datasets/Datasets.scala b/modules/api/app/controllers/api/datasets/Datasets.scala index efe4703c2e..f816e2404c 100644 --- a/modules/api/app/controllers/api/datasets/Datasets.scala +++ b/modules/api/app/controllers/api/datasets/Datasets.scala @@ -1,9 +1,9 @@ package controllers.api.datasets -import akka.stream.Materializer -import akka.stream.alpakka.csv.scaladsl.CsvFormatting -import akka.stream.scaladsl.{Keep, Source} -import akka.util.ByteString +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.connectors.csv.scaladsl.CsvFormatting +import org.apache.pekko.stream.scaladsl.{Keep, Source} +import org.apache.pekko.util.ByteString import controllers.portal.base.PortalController import controllers.{AppComponents, DataFormat} import models.CypherQuery diff --git a/modules/api/app/controllers/api/graphql/GraphQL.scala b/modules/api/app/controllers/api/graphql/GraphQL.scala index 2377cd47b6..d169028843 100644 --- a/modules/api/app/controllers/api/graphql/GraphQL.scala +++ b/modules/api/app/controllers/api/graphql/GraphQL.scala @@ -1,6 +1,6 @@ package controllers.api.graphql -import akka.util.ByteString +import org.apache.pekko.util.ByteString import controllers.AppComponents import controllers.portal.base.PortalController import play.api.http.{ContentTypes, HeaderNames, HttpVerbs} diff --git a/modules/api/app/controllers/api/oaipmh/OaiPmhHome.scala b/modules/api/app/controllers/api/oaipmh/OaiPmhHome.scala index edb372dec0..d5f1bf2988 100644 --- a/modules/api/app/controllers/api/oaipmh/OaiPmhHome.scala +++ b/modules/api/app/controllers/api/oaipmh/OaiPmhHome.scala @@ -1,6 +1,6 @@ package controllers.api.oaipmh -import akka.util.ByteString +import org.apache.pekko.util.ByteString import controllers.AppComponents import controllers.portal.base.PortalController import play.api.http.{ContentTypes, HttpVerbs} diff --git a/modules/api/app/controllers/api/v1/ApiV1.scala b/modules/api/app/controllers/api/v1/ApiV1.scala index f81e231915..91730f134e 100644 --- a/modules/api/app/controllers/api/v1/ApiV1.scala +++ b/modules/api/app/controllers/api/v1/ApiV1.scala @@ -1,6 +1,6 @@ package controllers.api.v1 -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import auth.handler.AuthHandler import controllers.AppComponents import controllers.base.{CoreActionBuilders, SearchRelated, SearchVC} diff --git a/modules/backend/src/main/scala/services/cypher/CypherService.scala b/modules/backend/src/main/scala/services/cypher/CypherService.scala index 9cece65f1e..ed20fd6e5e 100644 --- a/modules/backend/src/main/scala/services/cypher/CypherService.scala +++ b/modules/backend/src/main/scala/services/cypher/CypherService.scala @@ -1,7 +1,7 @@ package services.cypher -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import play.api.libs.json._ import scala.concurrent.Future diff --git a/modules/backend/src/main/scala/services/cypher/WsCypherService.scala b/modules/backend/src/main/scala/services/cypher/WsCypherService.scala index cb03be38e6..65a8f08577 100644 --- a/modules/backend/src/main/scala/services/cypher/WsCypherService.scala +++ b/modules/backend/src/main/scala/services/cypher/WsCypherService.scala @@ -1,10 +1,10 @@ package services.cypher -import akka.actor.ActorSystem -import akka.stream.alpakka.json.scaladsl.JsonReader -import akka.stream.scaladsl.Source -import akka.stream.{Materializer, scaladsl} -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.connectors.json.scaladsl.JsonReader +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.stream.{Materializer, scaladsl} +import org.apache.pekko.util.ByteString import play.api.Logger import play.api.cache.SyncCacheApi import play.api.http.HttpVerbs diff --git a/modules/backend/src/main/scala/services/data/DataServiceBuilder.scala b/modules/backend/src/main/scala/services/data/DataServiceBuilder.scala index 73546069ac..6ea4107e49 100644 --- a/modules/backend/src/main/scala/services/data/DataServiceBuilder.scala +++ b/modules/backend/src/main/scala/services/data/DataServiceBuilder.scala @@ -1,6 +1,6 @@ package services.data -import akka.stream.scaladsl.Source +import org.apache.pekko.stream.scaladsl.Source import models.{ContentTypes, EntityType, GlobalPermissionSet, ItemPermissionSet, Readable, Resource, WithId, Writable} import play.api.libs.json.{JsObject, JsValue} import play.api.libs.ws.WSResponse diff --git a/modules/backend/src/main/scala/services/data/EventForwarder.scala b/modules/backend/src/main/scala/services/data/EventForwarder.scala index 3a7a86ab80..9e91006747 100644 --- a/modules/backend/src/main/scala/services/data/EventForwarder.scala +++ b/modules/backend/src/main/scala/services/data/EventForwarder.scala @@ -1,6 +1,6 @@ package services.data -import akka.actor.{Actor, ActorLogging, ActorRef, Terminated} +import org.apache.pekko.actor.{Actor, ActorLogging, ActorRef, Terminated} import javax.inject.Inject diff --git a/modules/backend/src/main/scala/services/data/EventHandler.scala b/modules/backend/src/main/scala/services/data/EventHandler.scala index 2463ea1e01..3e3dacb831 100644 --- a/modules/backend/src/main/scala/services/data/EventHandler.scala +++ b/modules/backend/src/main/scala/services/data/EventHandler.scala @@ -1,6 +1,6 @@ package services.data -import akka.actor.ActorRef +import org.apache.pekko.actor.ActorRef trait EventHandler { def subscribe(actorRef: ActorRef): Unit = () diff --git a/modules/backend/src/main/scala/services/data/WsDataService.scala b/modules/backend/src/main/scala/services/data/WsDataService.scala index 85ef310e97..312cc408e5 100644 --- a/modules/backend/src/main/scala/services/data/WsDataService.scala +++ b/modules/backend/src/main/scala/services/data/WsDataService.scala @@ -1,8 +1,8 @@ package services.data -import akka.Done -import akka.stream.scaladsl.{JsonFraming, Source} -import akka.util.ByteString +import org.apache.pekko.Done +import org.apache.pekko.stream.scaladsl.{JsonFraming, Source} +import org.apache.pekko.util.ByteString import models.{ContentTypes, EntityType, GlobalPermissionSet, ItemPermissionSet, Readable, Resource, WithId, Writable} import play.api.Configuration import play.api.cache.AsyncCacheApi diff --git a/modules/backend/src/main/scala/services/data/streams/ByteStreamResizer.scala b/modules/backend/src/main/scala/services/data/streams/ByteStreamResizer.scala index 5e2f753146..2c82f0bbe0 100644 --- a/modules/backend/src/main/scala/services/data/streams/ByteStreamResizer.scala +++ b/modules/backend/src/main/scala/services/data/streams/ByteStreamResizer.scala @@ -1,10 +1,10 @@ package services.data.streams -import akka.NotUsed -import akka.stream.scaladsl.Flow -import akka.stream.{Attributes, FlowShape, Inlet, Outlet} -import akka.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler} -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.stream.scaladsl.Flow +import org.apache.pekko.stream.{Attributes, FlowShape, Inlet, Outlet} +import org.apache.pekko.stream.stage.{GraphStage, GraphStageLogic, InHandler, OutHandler} +import org.apache.pekko.util.ByteString object ByteStreamResizer { /** diff --git a/modules/backend/src/main/scala/utils/CsvHelpers.scala b/modules/backend/src/main/scala/utils/CsvHelpers.scala index c968bbbfea..a35c04e13f 100644 --- a/modules/backend/src/main/scala/utils/CsvHelpers.scala +++ b/modules/backend/src/main/scala/utils/CsvHelpers.scala @@ -1,8 +1,8 @@ package utils -import akka.NotUsed -import akka.stream.alpakka.csv.scaladsl.CsvFormatting -import akka.stream.scaladsl.Source +import org.apache.pekko.NotUsed +import org.apache.pekko.stream.connectors.csv.scaladsl.CsvFormatting +import org.apache.pekko.stream.scaladsl.Source trait CsvHelpers { def writeCsv(headers: Seq[String], data: Seq[Array[String]], sep: Char = ','): Source[String, NotUsed] = { diff --git a/modules/backend/src/test/scala/services/data/streams/ByteStringResizerSpec.scala b/modules/backend/src/test/scala/services/data/streams/ByteStringResizerSpec.scala index 41ac02ff73..e26b77ba82 100644 --- a/modules/backend/src/test/scala/services/data/streams/ByteStringResizerSpec.scala +++ b/modules/backend/src/test/scala/services/data/streams/ByteStringResizerSpec.scala @@ -1,9 +1,9 @@ package services.data.streams -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.scaladsl.{Source, StreamConverters} -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{Source, StreamConverters} +import org.apache.pekko.util.ByteString import play.api.test.PlaySpecification import scala.concurrent.Await @@ -11,8 +11,8 @@ import scala.concurrent.duration._ class ByteStringResizerSpec extends PlaySpecification { - private implicit val as: akka.actor.ActorSystem = ActorSystem.create("testing") - private implicit val mat: akka.stream.Materializer = Materializer(as) + private implicit val as: ActorSystem = ActorSystem.create("testing") + private implicit val mat: Materializer = Materializer(as) def count(size: Int, bytes: ByteString*): Int = Await.result( Source.apply(bytes.toList) diff --git a/modules/core/src/main/scala/controllers/base/CoreActionBuilders.scala b/modules/core/src/main/scala/controllers/base/CoreActionBuilders.scala index c735dadfab..8a5d3face2 100644 --- a/modules/core/src/main/scala/controllers/base/CoreActionBuilders.scala +++ b/modules/core/src/main/scala/controllers/base/CoreActionBuilders.scala @@ -1,6 +1,6 @@ package controllers.base -import akka.stream.scaladsl.Flow +import org.apache.pekko.stream.scaladsl.Flow import auth.handler.AuthHandler import views.AppConfig import lifecycle.ItemLifecycle diff --git a/modules/core/src/main/scala/services/accounts/SqlAccountManager.scala b/modules/core/src/main/scala/services/accounts/SqlAccountManager.scala index fc322315b5..041f7d2313 100644 --- a/modules/core/src/main/scala/services/accounts/SqlAccountManager.scala +++ b/modules/core/src/main/scala/services/accounts/SqlAccountManager.scala @@ -4,7 +4,7 @@ import java.sql.Connection import java.time.ZonedDateTime import java.util.UUID -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.SqlParser._ import anorm._ import auth._ diff --git a/modules/core/src/main/scala/services/datamodel/SqlEntityTypeMetadataService.scala b/modules/core/src/main/scala/services/datamodel/SqlEntityTypeMetadataService.scala index 4004a7a8a0..4813e2abfa 100644 --- a/modules/core/src/main/scala/services/datamodel/SqlEntityTypeMetadataService.scala +++ b/modules/core/src/main/scala/services/datamodel/SqlEntityTypeMetadataService.scala @@ -1,6 +1,6 @@ package services.datamodel -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.{Column, SqlStringInterpolation, ToStatement, TypeDoesNotMatch} import models._ import org.postgresql.jdbc.PgArray diff --git a/modules/core/src/main/scala/services/search/IndexingEventHandler.scala b/modules/core/src/main/scala/services/search/IndexingEventHandler.scala index afc33ef86c..e3ec59dbb8 100644 --- a/modules/core/src/main/scala/services/search/IndexingEventHandler.scala +++ b/modules/core/src/main/scala/services/search/IndexingEventHandler.scala @@ -1,8 +1,9 @@ package services.search -import akka.actor.ActorRef -import akka.stream.Materializer -import akka.stream.scaladsl.Source +import org.apache.pekko.Done +import org.apache.pekko.actor.ActorRef +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Source import play.api.{Configuration, Logger} import services.data.EventForwarder.{Create, Delete, Update} import services.data.EventHandler @@ -54,7 +55,7 @@ case class IndexingEventHandler @Inject()( searchIndexer.handle.clearIds(group: _*) } // This runs all deletes in a synchronous sequence, as opposed to in parallel - val allDone: Future[akka.Done] = Source.fromIterator(() => deletes) + val allDone: Future[Done] = Source.fromIterator(() => deletes) .mapAsync(parallelism = 1)(identity) .runForeach(identity) diff --git a/modules/core/src/main/scala/services/search/SearchIndexMediator.scala b/modules/core/src/main/scala/services/search/SearchIndexMediator.scala index 53a57a18c3..6e1fa4c840 100644 --- a/modules/core/src/main/scala/services/search/SearchIndexMediator.scala +++ b/modules/core/src/main/scala/services/search/SearchIndexMediator.scala @@ -1,6 +1,6 @@ package services.search -import akka.actor.ActorRef +import org.apache.pekko.actor.ActorRef import models.EntityType import scala.concurrent.Future diff --git a/modules/portal/app/controllers/AppComponents.scala b/modules/portal/app/controllers/AppComponents.scala index 4111ee7b15..5f2775d191 100644 --- a/modules/portal/app/controllers/AppComponents.scala +++ b/modules/portal/app/controllers/AppComponents.scala @@ -1,6 +1,6 @@ package controllers -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import auth.handler.AuthHandler import com.google.inject.ImplementedBy import views.AppConfig diff --git a/modules/portal/app/controllers/base/SearchRelated.scala b/modules/portal/app/controllers/base/SearchRelated.scala index 687aad14c1..085bffbace 100644 --- a/modules/portal/app/controllers/base/SearchRelated.scala +++ b/modules/portal/app/controllers/base/SearchRelated.scala @@ -1,7 +1,7 @@ package controllers.base -import akka.stream.Materializer -import akka.stream.scaladsl.Sink +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Sink import controllers.generic.Search import play.api.libs.json.JsString import services.cypher.CypherService diff --git a/modules/portal/app/controllers/portal/Concepts.scala b/modules/portal/app/controllers/portal/Concepts.scala index 98b35a7448..a577460566 100644 --- a/modules/portal/app/controllers/portal/Concepts.scala +++ b/modules/portal/app/controllers/portal/Concepts.scala @@ -1,6 +1,6 @@ package controllers.portal -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import javax.inject.{Inject, Singleton} import controllers.AppComponents diff --git a/modules/portal/app/controllers/portal/HistoricalAgents.scala b/modules/portal/app/controllers/portal/HistoricalAgents.scala index d74c8cab5a..01aabd4b12 100644 --- a/modules/portal/app/controllers/portal/HistoricalAgents.scala +++ b/modules/portal/app/controllers/portal/HistoricalAgents.scala @@ -1,6 +1,6 @@ package controllers.portal -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import controllers.AppComponents import controllers.generic.Search import controllers.portal.base.{Generic, PortalController, Related} diff --git a/modules/portal/app/controllers/portal/base/PortalController.scala b/modules/portal/app/controllers/portal/base/PortalController.scala index 9beb86a4ef..213b85e890 100644 --- a/modules/portal/app/controllers/portal/base/PortalController.scala +++ b/modules/portal/app/controllers/portal/base/PortalController.scala @@ -1,6 +1,6 @@ package controllers.portal.base -import akka.http.scaladsl.model.Uri +import org.apache.pekko.http.scaladsl.model.Uri import auth.handler.AuthHandler import controllers.base.CoreActionBuilders import controllers.{AppComponents, renderError} diff --git a/modules/portal/app/controllers/portal/base/Related.scala b/modules/portal/app/controllers/portal/base/Related.scala index 33cfb889c8..2fa123626e 100644 --- a/modules/portal/app/controllers/portal/base/Related.scala +++ b/modules/portal/app/controllers/portal/base/Related.scala @@ -1,6 +1,6 @@ package controllers.portal.base -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import controllers.base.SearchRelated import controllers.generic.{Read, Search} import models.{Annotation, ContentType, UserProfile} diff --git a/modules/portal/app/controllers/portal/users/UserProfiles.scala b/modules/portal/app/controllers/portal/users/UserProfiles.scala index 89ed397d60..6599122526 100644 --- a/modules/portal/app/controllers/portal/users/UserProfiles.scala +++ b/modules/portal/app/controllers/portal/users/UserProfiles.scala @@ -1,6 +1,6 @@ package controllers.portal.users -import akka.stream.Materializer +import org.apache.pekko.stream.Materializer import controllers.base.{ImageHelpers, ResolutionTooHigh, UnrecognizedType} import controllers.generic.Search import controllers.portal.base.PortalController diff --git a/modules/portal/app/guice/AppModule.scala b/modules/portal/app/guice/AppModule.scala index 5097f181cf..8611c41eb0 100644 --- a/modules/portal/app/guice/AppModule.scala +++ b/modules/portal/app/guice/AppModule.scala @@ -1,13 +1,13 @@ package guice -import akka.actor.ActorSystem -import akka.stream.Materializer +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer import com.google.inject.AbstractModule import com.google.inject.name.Names import views.AppConfig import data.markdown.{CommonmarkMarkdownRenderer, RawMarkdownRenderer, SanitisingMarkdownRenderer} import lifecycle.{GeocodingItemLifecycle, ItemLifecycle} -import play.api.libs.concurrent.AkkaGuiceSupport +import play.api.libs.concurrent.PekkoGuiceSupport import services.RateLimitChecker import services.cypher.{CypherQueryService, CypherService, SqlCypherQueryService, WsCypherService} import services.data._ @@ -36,7 +36,7 @@ private class AwsGeocodingServiceProvider @Inject()(config: play.api.Configurati override def get(): GeocodingService = AwsGeocodingService(config.get[com.typesafe.config.Config]("services.geocoding"))(ec) } -class AppModule extends AbstractModule with AkkaGuiceSupport { +class AppModule extends AbstractModule with PekkoGuiceSupport { override def configure(): Unit = { bind(classOf[AppConfig]) bind(classOf[RateLimitChecker]) diff --git a/modules/portal/app/services/cypher/SqlCypherQueryService.scala b/modules/portal/app/services/cypher/SqlCypherQueryService.scala index 2b4d042baf..0c7d398d08 100644 --- a/modules/portal/app/services/cypher/SqlCypherQueryService.scala +++ b/modules/portal/app/services/cypher/SqlCypherQueryService.scala @@ -3,7 +3,7 @@ package services.cypher import java.time.ZonedDateTime import javax.inject.{Inject, Singleton} -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm.{Macro, RowParser, SqlParser, _} import models.CypherQuery import play.api.db.Database diff --git a/modules/portal/app/services/feedback/SqlFeedbackService.scala b/modules/portal/app/services/feedback/SqlFeedbackService.scala index ee08b71f87..dd03f74b8b 100644 --- a/modules/portal/app/services/feedback/SqlFeedbackService.scala +++ b/modules/portal/app/services/feedback/SqlFeedbackService.scala @@ -4,7 +4,7 @@ import java.io.ByteArrayOutputStream import java.nio.charset.StandardCharsets import java.time.ZonedDateTime -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm._ import javax.inject.{Inject, Singleton} import models.{Feedback, FeedbackContext} diff --git a/modules/portal/app/services/redirects/SqlMovedPageLookup.scala b/modules/portal/app/services/redirects/SqlMovedPageLookup.scala index 92c6f5dc3b..257d0247a1 100644 --- a/modules/portal/app/services/redirects/SqlMovedPageLookup.scala +++ b/modules/portal/app/services/redirects/SqlMovedPageLookup.scala @@ -2,7 +2,7 @@ package services.redirects import javax.inject.Inject -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import anorm._ import org.apache.commons.codec.digest.DigestUtils import play.api.db.Database diff --git a/modules/portal/app/services/search/CmdlineIndexMediator.scala b/modules/portal/app/services/search/CmdlineIndexMediator.scala index 1009f9f57a..eca1bff96e 100644 --- a/modules/portal/app/services/search/CmdlineIndexMediator.scala +++ b/modules/portal/app/services/search/CmdlineIndexMediator.scala @@ -1,6 +1,6 @@ package services.search -import akka.actor.ActorRef +import org.apache.pekko.actor.ActorRef import com.google.common.collect.EvictingQueue import models.EntityType import play.api.{Configuration, Logger} diff --git a/modules/portal/app/services/search/AkkaStreamsIndexMediator.scala b/modules/portal/app/services/search/PekkoStreamsIndexMediator.scala similarity index 85% rename from modules/portal/app/services/search/AkkaStreamsIndexMediator.scala rename to modules/portal/app/services/search/PekkoStreamsIndexMediator.scala index 25f9b2d37a..45e7c9273f 100644 --- a/modules/portal/app/services/search/AkkaStreamsIndexMediator.scala +++ b/modules/portal/app/services/search/PekkoStreamsIndexMediator.scala @@ -1,16 +1,16 @@ package services.search -import akka.actor.{ActorRef, ActorSystem} -import akka.http.scaladsl.Http -import akka.http.scaladsl.Http.HostConnectionPool -import akka.http.scaladsl.common.EntityStreamingSupport -import akka.http.scaladsl.model.Uri.Query -import akka.http.scaladsl.model._ -import akka.http.scaladsl.model.headers.{Authorization, BasicHttpCredentials, RawHeader} -import akka.http.scaladsl.settings.{ClientConnectionSettings, ConnectionPoolSettings} -import akka.stream.Materializer -import akka.stream.scaladsl.{Flow, Keep, Sink, Source} -import akka.util.ByteString +import org.apache.pekko.actor.{ActorRef, ActorSystem} +import org.apache.pekko.http.scaladsl.Http +import org.apache.pekko.http.scaladsl.Http.HostConnectionPool +import org.apache.pekko.http.scaladsl.common.EntityStreamingSupport +import org.apache.pekko.http.scaladsl.model.Uri.Query +import org.apache.pekko.http.scaladsl.model._ +import org.apache.pekko.http.scaladsl.model.headers.{Authorization, BasicHttpCredentials, RawHeader} +import org.apache.pekko.http.scaladsl.settings.{ClientConnectionSettings, ConnectionPoolSettings} +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{Flow, Keep, Sink, Source} +import org.apache.pekko.util.ByteString import com.fasterxml.jackson.databind.{JsonNode, ObjectMapper} import eu.ehri.project.indexing.converter.impl.JsonConverter import models.EntityType @@ -25,15 +25,16 @@ import javax.inject.Inject import scala.concurrent.{ExecutionContext, Future} import scala.util.{Failure, Success, Try} import org.apache.commons.lang3.time.DurationFormatUtils.formatDurationWords +import org.apache.pekko.NotUsed import services.ServiceConfig -case class AkkaStreamsIndexMediator @Inject()(actorSystem: ActorSystem, mat: Materializer, config: Configuration, executionContext: ExecutionContext) extends +case class PekkoStreamsIndexMediator @Inject()(actorSystem: ActorSystem, mat: Materializer, config: Configuration, executionContext: ExecutionContext) extends SearchIndexMediator { - override val handle: SearchIndexMediatorHandle = AkkaStreamsIndexMediatorHandle()(actorSystem, mat, config, executionContext) + override val handle: SearchIndexMediatorHandle = PekkoStreamsIndexMediatorHandle()(actorSystem, mat, config, executionContext) } -case class AkkaStreamsIndexMediatorHandle( +case class PekkoStreamsIndexMediatorHandle( chan: Option[ActorRef] = None, processFunc: String => String = identity[String], progressFilter: Int => Boolean = _ % 100 == 0 @@ -42,13 +43,13 @@ case class AkkaStreamsIndexMediatorHandle( config: Configuration, executionContext: ExecutionContext) extends SearchIndexMediatorHandle { - override def withChannel(actorRef: ActorRef, formatter: String => String, filter: Int => Boolean = _ % 100 == 0): AkkaStreamsIndexMediatorHandle = + override def withChannel(actorRef: ActorRef, formatter: String => String, filter: Int => Boolean = _ % 100 == 0): PekkoStreamsIndexMediatorHandle = copy(chan = Some(actorRef), processFunc = formatter, progressFilter = filter) import scala.jdk.CollectionConverters._ import scala.concurrent.duration._ - private val logger = Logger(classOf[AkkaStreamsIndexMediator]) + private val logger = Logger(classOf[PekkoStreamsIndexMediator]) private val dataServiceConfig = ServiceConfig("ehridata", config) private val dataBaseUrl: Uri = dataServiceConfig.baseUrl @@ -87,16 +88,16 @@ case class AkkaStreamsIndexMediatorHandle( .mapMaterializedValue(_.map(_.utf8String)) .named("http-sink-flow") - private val bytesToJsonNode: Flow[ByteString, JsonNode, akka.NotUsed] = Flow[ByteString] + private val bytesToJsonNode: Flow[ByteString, JsonNode, NotUsed] = Flow[ByteString] .via(jsonSupport.framingDecoder) .map(bytes => mapper.readValue(bytes.toArray, classOf[JsonNode])) .named("bytes-to-json-node") - private val jsonNodeToBytes: Flow[JsonNode, ByteString, akka.NotUsed] = Flow[JsonNode] + private val jsonNodeToBytes: Flow[JsonNode, ByteString, NotUsed] = Flow[JsonNode] .map(node => ByteString.fromArray(writer.writeValueAsBytes(node))) .named("json-node-to-bytes") - private def jsonNodeToDoc(jsonConverter: JsonConverter): Flow[JsonNode, JsonNode, akka.NotUsed] = Flow[JsonNode] + private def jsonNodeToDoc(jsonConverter: JsonConverter): Flow[JsonNode, JsonNode, NotUsed] = Flow[JsonNode] .mapConcat[JsonNode](n => jsonConverter.convert(n).asScala.toVector) .named("json-node-to-solr-doc") diff --git a/modules/portal/app/services/search/SearchToolsIndexMediator.scala b/modules/portal/app/services/search/SearchToolsIndexMediator.scala index 226194b10b..726dd89c0b 100644 --- a/modules/portal/app/services/search/SearchToolsIndexMediator.scala +++ b/modules/portal/app/services/search/SearchToolsIndexMediator.scala @@ -1,6 +1,6 @@ package services.search -import akka.actor.{ActorRef, ActorSystem} +import org.apache.pekko.actor.{ActorRef, ActorSystem} import com.fasterxml.jackson.databind.{JsonNode, ObjectMapper, ObjectWriter} import eu.ehri.project.indexing.Pipeline.Builder import eu.ehri.project.indexing.converter.impl.JsonConverter diff --git a/modules/portal/app/services/storage/FileStorage.scala b/modules/portal/app/services/storage/FileStorage.scala index 854720505f..724e2cba6c 100644 --- a/modules/portal/app/services/storage/FileStorage.scala +++ b/modules/portal/app/services/storage/FileStorage.scala @@ -1,8 +1,8 @@ package services.storage import java.net.URI -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import com.google.common.hash.Hashing import com.google.common.io.Files diff --git a/modules/portal/app/services/storage/S3CompatibleFileStorage.scala b/modules/portal/app/services/storage/S3CompatibleFileStorage.scala index 702f4b385a..df508139cf 100644 --- a/modules/portal/app/services/storage/S3CompatibleFileStorage.scala +++ b/modules/portal/app/services/storage/S3CompatibleFileStorage.scala @@ -1,14 +1,14 @@ package services.storage -import akka.NotUsed -import akka.actor.ActorSystem -import akka.http.scaladsl.model._ -import akka.stream.Materializer -import akka.stream.alpakka.s3._ -import akka.stream.alpakka.s3.headers.CannedAcl -import akka.stream.alpakka.s3.scaladsl.S3 -import akka.stream.scaladsl.{FileIO, Sink, Source} -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.http.scaladsl.model._ +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.connectors.s3.{BucketVersioningStatus => _, _} +import org.apache.pekko.stream.connectors.s3.headers.CannedAcl +import org.apache.pekko.stream.connectors.s3.scaladsl.S3 +import org.apache.pekko.stream.scaladsl.{FileIO, Sink, Source} +import org.apache.pekko.util.ByteString import play.api.Logger import software.amazon.awssdk.auth.credentials.{AwsCredentials, AwsCredentialsProvider, StaticCredentialsProvider} import software.amazon.awssdk.core.exception.SdkException @@ -182,7 +182,7 @@ case class S3CompatibleFileStorage( f.key, f.lastModified, f.size, - // NB: S3 returns eTags wrapped in quotes, but Alpakka doesn't + // NB: S3 returns eTags wrapped in quotes, but Pekko Connectors doesn't // hence for compatibility we add it here. Some(f.eTag).map(f => "\"" + f + "\""), )) diff --git a/project/plugins.sbt b/project/plugins.sbt index 4e2fa18f58..4eacd5c61a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -15,7 +15,7 @@ ThisBuild / libraryDependencySchemes ++= Seq( //resolvers += "Typesafe Snapshots" at "http://repo.typesafe.com/typesafe/snapshots/" // Use the Play sbt plugin for Play projects -addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.9.5") +addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.6") addSbtPlugin("io.github.irundaia" % "sbt-sassify" % "1.5.2") diff --git a/test/actors/cleanup/CleanupRunnerManagerSpec.scala b/test/actors/cleanup/CleanupRunnerManagerSpec.scala index f879d01148..f4423aeb5e 100644 --- a/test/actors/cleanup/CleanupRunnerManagerSpec.scala +++ b/test/actors/cleanup/CleanupRunnerManagerSpec.scala @@ -2,7 +2,7 @@ package actors.cleanup import actors.LongRunningJob import actors.cleanup.CleanupRunner.CleanupJob -import akka.actor.{ActorContext, ActorRef, Props} +import org.apache.pekko.actor.{ActorContext, ActorRef, Props} import com.google.inject.name.Names import controllers.datasets.CleanupConfirmation import helpers.IntegrationTestRunner @@ -32,7 +32,7 @@ class CleanupRunnerManagerSpec extends IntegrationTestRunner { "Harvester Manager" should { - "send correct messages when running a cleanup job" in new DBTestAppWithAkka("import-log-fixture.sql", + "send correct messages when running a cleanup job" in new DBTestAppWithPekko("import-log-fixture.sql", specificConfig = Map("ehri.admin.bulkOperations.maxDeletions" -> 1)) { val cleanupConfirmation = CleanupConfirmation("Delete it") val cleanupJob: CleanupJob = CleanupJob("r1", 1, jobId, cleanupConfirmation.msg) @@ -52,7 +52,7 @@ class CleanupRunnerManagerSpec extends IntegrationTestRunner { expectMsg("Done") } - "be cancellable" in new DBTestAppWithAkka("import-log-fixture.sql") { + "be cancellable" in new DBTestAppWithPekko("import-log-fixture.sql") { val cleanupConfirmation = CleanupConfirmation("Delete it") val cleanupJob: CleanupJob = CleanupJob("r1", 1, jobId, cleanupConfirmation.msg) diff --git a/test/actors/datamodel/AuditorSpec.scala b/test/actors/datamodel/AuditorSpec.scala index b0818f8795..1e79aabbbb 100644 --- a/test/actors/datamodel/AuditorSpec.scala +++ b/test/actors/datamodel/AuditorSpec.scala @@ -3,7 +3,7 @@ package actors.datamodel import actors.LongRunningJob.Cancel import actors.datamodel.Auditor.RunAudit import actors.datamodel.AuditorManager.{AuditTask, AuditorJob} -import akka.actor.Props +import org.apache.pekko.actor.Props import helpers.IntegrationTestRunner import mockdata.adminUserProfile import models.{EntityType, FieldMetadata, FieldMetadataSet, UserProfile} @@ -47,7 +47,7 @@ class AuditorSpec extends IntegrationTestRunner { "Auditor runner" should { - "send correct messages when auditing an entity type" in new ITestAppWithAkka { + "send correct messages when auditing an entity type" in new ITestAppWithPekko { val runner = system.actorOf(Props(Auditor(searchEngine, resolver, fieldMetadataSet, 5, 10))) runner ! RunAudit(job, None) @@ -56,7 +56,7 @@ class AuditorSpec extends IntegrationTestRunner { expectMsgClass(classOf[Auditor.Completed]) } - "allow cancellation" in new ITestAppWithAkka { + "allow cancellation" in new ITestAppWithPekko { val runner = system.actorOf(Props(Auditor(searchEngine, resolver, fieldMetadataSet, 5, 10))) runner ! RunAudit(job, None) diff --git a/test/actors/harvesting/HarvesterManagerSpec.scala b/test/actors/harvesting/HarvesterManagerSpec.scala index 7522507d5c..7b38a692fc 100644 --- a/test/actors/harvesting/HarvesterManagerSpec.scala +++ b/test/actors/harvesting/HarvesterManagerSpec.scala @@ -5,7 +5,7 @@ import actors.harvesting import actors.harvesting.OaiPmhHarvester.{OaiPmhHarvestData, OaiPmhHarvestJob} import actors.harvesting.ResourceSyncHarvester.{ResourceSyncData, ResourceSyncJob} import actors.harvesting.UrlSetHarvester.{UrlSetHarvesterData, UrlSetHarvesterJob} -import akka.actor.{ActorContext, Props} +import org.apache.pekko.actor.{ActorContext, Props} import helpers.IntegrationTestRunner import mockdata.adminUserProfile import models.HarvestEvent.HarvestEventType @@ -68,7 +68,7 @@ class HarvesterManagerSpec extends IntegrationTestRunner { "Harvester Manager" should { import scala.concurrent.duration._ - "send correct messages when harvesting an endpoint via OAI-PMH" in new ITestAppWithAkka { + "send correct messages when harvesting an endpoint via OAI-PMH" in new ITestAppWithPekko { val events = MockHarvestEventService() val init = (context: ActorContext) => context.actorOf(Props(OaiPmhHarvester(oaiPmhClient, storage))) val harvester = system.actorOf(Props(HarvesterManager(oaiPmhJob, init, events))) @@ -85,7 +85,7 @@ class HarvesterManagerSpec extends IntegrationTestRunner { .eventually(20, 100.millis) } - "send correct messages when harvesting an endpoint via ResourceSync" in new ITestAppWithAkka { + "send correct messages when harvesting an endpoint via ResourceSync" in new ITestAppWithPekko { val events = MockHarvestEventService() val init = (context: ActorContext) => context.actorOf(Props(ResourceSyncHarvester(rsClient, storage))) val harvester = system.actorOf(Props(HarvesterManager(rsJob, init, events))) @@ -103,7 +103,7 @@ class HarvesterManagerSpec extends IntegrationTestRunner { .eventually(20, 100.millis) } - "send correct messages when harvesting an endpoint via an URL set" in new ITestAppWithAkka { + "send correct messages when harvesting an endpoint via an URL set" in new ITestAppWithPekko { val events = MockHarvestEventService() val init = (context: ActorContext) => context.actorOf(Props(UrlSetHarvester(wsClient, storage))) val harvester = system.actorOf(Props(HarvesterManager(urlSetJob, init, events))) @@ -120,7 +120,7 @@ class HarvesterManagerSpec extends IntegrationTestRunner { .eventually(20, 100.millis) } - "handle errors" in new ITestAppWithAkka { + "handle errors" in new ITestAppWithPekko { val events = MockHarvestEventService() val harvestConf = oaiPmhJob.copy(data = oaiPmhJob.data.copy(config = oaiPmhJob.data.config.copy(url = "http://example.com/oaipmh"))) val init = (context: ActorContext) => context.actorOf(Props(OaiPmhHarvester(oaiPmhClient, storage))) @@ -135,7 +135,7 @@ class HarvesterManagerSpec extends IntegrationTestRunner { await(events.get("r1")) must_== List.empty[HarvestEvent] } - "harvest selectively with `from` date" in new ITestAppWithAkka { + "harvest selectively with `from` date" in new ITestAppWithPekko { val events = MockHarvestEventService() val start: Instant = Instant.now() val job2 = oaiPmhJob(app) @@ -150,7 +150,7 @@ class HarvesterManagerSpec extends IntegrationTestRunner { await(events.get("r1")) must_== List.empty[HarvestEvent] } - "cancel jobs" in new ITestAppWithAkka { + "cancel jobs" in new ITestAppWithPekko { val events = MockHarvestEventService() val init = (context: ActorContext) => context.actorOf(Props(OaiPmhHarvester(oaiPmhClient, storage))) val harvester = system.actorOf(Props(harvesting.HarvesterManager(oaiPmhJob, init, events))) diff --git a/test/actors/harvesting/OaiPmhHarvesterSpec.scala b/test/actors/harvesting/OaiPmhHarvesterSpec.scala index 465126a41d..c7220a1439 100644 --- a/test/actors/harvesting/OaiPmhHarvesterSpec.scala +++ b/test/actors/harvesting/OaiPmhHarvesterSpec.scala @@ -3,7 +3,7 @@ package actors.harvesting import actors.LongRunningJob.Cancel import actors.harvesting import actors.harvesting.OaiPmhHarvester.{OaiPmhHarvestData, OaiPmhHarvestJob} -import akka.actor.Props +import org.apache.pekko.actor.Props import helpers.IntegrationTestRunner import mockdata.adminUserProfile import models.{OaiPmhConfig, BasicAuthConfig, UserProfile} @@ -36,7 +36,7 @@ class OaiPmhHarvesterSpec extends IntegrationTestRunner { "OAI-PMH harvest runner" should { - "send correct messages when harvesting an endpoint" in new ITestAppWithAkka { + "send correct messages when harvesting an endpoint" in new ITestAppWithPekko { val runner = system.actorOf(Props(OaiPmhHarvester(client, storage))) runner ! job @@ -46,7 +46,7 @@ class OaiPmhHarvesterSpec extends IntegrationTestRunner { expectMsgClass(classOf[Completed]) } - "allow cancellation" in new ITestAppWithAkka { + "allow cancellation" in new ITestAppWithPekko { val runner = system.actorOf(Props(harvesting.OaiPmhHarvester(client, storage))) runner ! job diff --git a/test/actors/harvesting/ResourceSyncHarvesterSpec.scala b/test/actors/harvesting/ResourceSyncHarvesterSpec.scala index b5a36e9439..7bfa572a0b 100644 --- a/test/actors/harvesting/ResourceSyncHarvesterSpec.scala +++ b/test/actors/harvesting/ResourceSyncHarvesterSpec.scala @@ -3,8 +3,8 @@ package actors.harvesting import actors.LongRunningJob.Cancel import actors.harvesting import actors.harvesting.ResourceSyncHarvester.{ResourceSyncData, ResourceSyncJob} -import akka.actor.Props -import akka.testkit.{ImplicitSender, TestKit} +import org.apache.pekko.actor.Props +import org.apache.pekko.testkit.{ImplicitSender, TestKit} import helpers.IntegrationTestRunner import mockdata.adminUserProfile import models.{ResourceSyncConfig, UserProfile} diff --git a/test/actors/harvesting/UrlSetHarvesterSpec.scala b/test/actors/harvesting/UrlSetHarvesterSpec.scala index 52f2645f8b..3c636abaf5 100644 --- a/test/actors/harvesting/UrlSetHarvesterSpec.scala +++ b/test/actors/harvesting/UrlSetHarvesterSpec.scala @@ -3,7 +3,7 @@ package actors.harvesting import actors.LongRunningJob.Cancel import actors.harvesting import actors.harvesting.UrlSetHarvester.{UrlSetHarvesterData, UrlSetHarvesterJob} -import akka.actor.Props +import org.apache.pekko.actor.Props import helpers.IntegrationTestRunner import mockdata.adminUserProfile import models.{BasicAuthConfig, UrlSetConfig, UserProfile} @@ -47,7 +47,7 @@ class UrlSetHarvesterSpec extends IntegrationTestRunner { "URL set harvest runner" should { - "send correct messages when harvesting an endpoint" in new ITestAppWithAkka { + "send correct messages when harvesting an endpoint" in new ITestAppWithPekko { val runner = system.actorOf(Props(UrlSetHarvester(client, storage))) runner ! job @@ -58,7 +58,7 @@ class UrlSetHarvesterSpec extends IntegrationTestRunner { expectMsgClass(classOf[Completed]) } - "allow cancellation" in new ITestAppWithAkka { + "allow cancellation" in new ITestAppWithPekko { val runner = system.actorOf(Props(harvesting.UrlSetHarvester(client, storage))) runner ! job @@ -69,7 +69,7 @@ class UrlSetHarvesterSpec extends IntegrationTestRunner { expectMsgClass(classOf[Cancelled]) } - "support POST requests to endpoints" in new ITestAppWithAkka { + "support POST requests to endpoints" in new ITestAppWithPekko { val runner = system.actorOf(Props(UrlSetHarvester(client, storage))) runner ! postJob diff --git a/test/actors/ingest/DataImporterManagerSpec.scala b/test/actors/ingest/DataImporterManagerSpec.scala index da9b901c9e..626b131926 100644 --- a/test/actors/ingest/DataImporterManagerSpec.scala +++ b/test/actors/ingest/DataImporterManagerSpec.scala @@ -1,6 +1,6 @@ package actors.ingest -import akka.actor.Props +import org.apache.pekko.actor.Props import helpers.IntegrationTestRunner import models._ import services.data.DataUser @@ -35,7 +35,7 @@ class DataImporterManagerSpec extends IntegrationTestRunner { "Data Import manager" should { - "send correct messages when importing files" in new ITestAppWithAkka { + "send correct messages when importing files" in new ITestAppWithPekko { val importApi = MockIngestService(ImportLog()) val importManager = system.actorOf(Props(DataImporterManager(job, importApi))) @@ -49,7 +49,7 @@ class DataImporterManagerSpec extends IntegrationTestRunner { expectMsg(WebsocketConstants.DONE_MESSAGE) } - "send correct messages when imports throw an error" in new ITestAppWithAkka { + "send correct messages when imports throw an error" in new ITestAppWithPekko { val importApi = MockIngestService(ErrorLog("identifier", "Missing field")) val importManager = system.actorOf(Props(DataImporterManager(job, importApi))) diff --git a/test/actors/ingest/DataImporterSpec.scala b/test/actors/ingest/DataImporterSpec.scala index 06bac95b58..95098146f9 100644 --- a/test/actors/ingest/DataImporterSpec.scala +++ b/test/actors/ingest/DataImporterSpec.scala @@ -1,7 +1,7 @@ package actors.ingest import actors.ingest.DataImporter.{Done, Start, Message} -import akka.actor.Props +import org.apache.pekko.actor.Props import helpers.IntegrationTestRunner import models._ import services.data.DataUser @@ -35,7 +35,7 @@ class DataImporterSpec extends IntegrationTestRunner { "Data Importer" should { - "send correct messages when importing files" in new ITestAppWithAkka { + "send correct messages when importing files" in new ITestAppWithPekko { val importLog = ImportLog() val importApi = MockIngestService(importLog) val importer = system.actorOf(Props(DataImporter(job, importApi, (_, _) => Future.successful(())))) @@ -51,7 +51,7 @@ class DataImporterSpec extends IntegrationTestRunner { expectMsgType[Done] } - "send correct messages when batch importing files" in new ITestAppWithAkka { + "send correct messages when batch importing files" in new ITestAppWithPekko { val batchData = payload.toSeq.zipWithIndex.map { case ((k, v), i) => ingestData.copy(params = ingestData.params.copy(data = UrlMapPayload(Map(k -> v))), batch = Some(i + 1)) }.toList @@ -79,7 +79,7 @@ class DataImporterSpec extends IntegrationTestRunner { expectMsgType[Done] } - "send correct messages when imports throw an error" in new ITestAppWithAkka { + "send correct messages when imports throw an error" in new ITestAppWithPekko { val importApi = MockIngestService(ErrorLog("identifier", "Missing field")) val importer = system.actorOf(Props(DataImporter(job, importApi, (_, _) => Future.successful(())))) diff --git a/test/actors/transformation/XmlConverterSpec.scala b/test/actors/transformation/XmlConverterSpec.scala index ec10e4c187..ba3430ff4d 100644 --- a/test/actors/transformation/XmlConverterSpec.scala +++ b/test/actors/transformation/XmlConverterSpec.scala @@ -1,9 +1,9 @@ package actors.transformation import actors.transformation.XmlConverterManager.{XmlConvertData, XmlConvertJob} -import akka.actor.Props -import akka.stream.scaladsl.{Flow, Source} -import akka.util.ByteString +import org.apache.pekko.actor.Props +import org.apache.pekko.stream.scaladsl.{Flow, Source} +import org.apache.pekko.util.ByteString import com.google.inject.name.Names import helpers.IntegrationTestRunner import mockdata.adminUserProfile @@ -36,7 +36,7 @@ class XmlConverterSpec extends IntegrationTestRunner { "XML converter" should { - "send the right messages when there's nothing to do" in new ITestAppWithAkka { + "send the right messages when there's nothing to do" in new ITestAppWithPekko { val ds = UUID.randomUUID().toString val job = XmlConvertJob("r1", ds, ds, XmlConvertData(Seq.empty, s"ingest-data/r1/$ds/input/", s"ingest-data/r1/$ds/output/")) @@ -48,7 +48,7 @@ class XmlConverterSpec extends IntegrationTestRunner { expectMsgClass(classOf[Completed]) } - "transcode input charset to UTF-8" in new ITestAppWithAkka { + "transcode input charset to UTF-8" in new ITestAppWithPekko { val ds = UUID.randomUUID().toString val job = XmlConvertJob("r1", ds, ds, XmlConvertData(Seq.empty, s"ingest-data/r1/$ds/input/", s"ingest-data/r1/$ds/output/")) @@ -72,7 +72,7 @@ class XmlConverterSpec extends IntegrationTestRunner { } } - "copy files when transformation is a no-op" in new ITestAppWithAkka { + "copy files when transformation is a no-op" in new ITestAppWithPekko { val ds = UUID.randomUUID().toString val job = XmlConvertJob("r1", ds, ds, XmlConvertData(Seq.empty, s"ingest-data/r1/$ds/input/", s"ingest-data/r1/$ds/output/")) @@ -87,7 +87,7 @@ class XmlConverterSpec extends IntegrationTestRunner { expectMsgClass(classOf[Completed]) } - "handle conversion errors without halting" in new ITestAppWithAkka { + "handle conversion errors without halting" in new ITestAppWithPekko { val ds = UUID.randomUUID().toString val job = XmlConvertJob("r1", ds, ds, XmlConvertData(Seq.empty, s"ingest-data/r1/$ds/input/", s"ingest-data/r1/$ds/output/")) @@ -103,7 +103,7 @@ class XmlConverterSpec extends IntegrationTestRunner { } - "handle storage errors by halting" in new ITestAppWithAkka { + "handle storage errors by halting" in new ITestAppWithPekko { val noKey = "nope.xml" val ds = UUID.randomUUID().toString val job = XmlConvertJob("r1", ds, ds, @@ -121,7 +121,7 @@ class XmlConverterSpec extends IntegrationTestRunner { expectNoMessage() } - "not re-copy when a prior identical transformation has been run" in new ITestAppWithAkka { + "not re-copy when a prior identical transformation has been run" in new ITestAppWithPekko { val ds = UUID.randomUUID().toString val job = XmlConvertJob("r1", ds, ds, XmlConvertData(Seq.empty, s"ingest-data/r1/$ds/input/", s"ingest-data/r1/$ds/output/")) diff --git a/test/helpers/SearchTestRunner.scala b/test/helpers/SearchTestRunner.scala index b4d68b793b..7268fe698b 100644 --- a/test/helpers/SearchTestRunner.scala +++ b/test/helpers/SearchTestRunner.scala @@ -4,7 +4,7 @@ import eu.ehri.project.search.solr.SolrSearchEngine import play.api.inject.bind import play.api.inject.guice.GuiceableModule import play.api.test.PlaySpecification -import services.search.{AkkaStreamsIndexMediator, SearchEngine, SearchIndexMediator} +import services.search.{PekkoStreamsIndexMediator, SearchEngine, SearchIndexMediator} /** * Override the standard Test runner with non-mock search components. @@ -12,7 +12,7 @@ import services.search.{AkkaStreamsIndexMediator, SearchEngine, SearchIndexMedia trait SearchTestRunner extends PlaySpecification with UserFixtures with TestConfiguration { override def testSearchComponents: Seq[GuiceableModule] = Seq( - bind[SearchIndexMediator].to[AkkaStreamsIndexMediator], + bind[SearchIndexMediator].to[PekkoStreamsIndexMediator], bind[SearchEngine].to[SolrSearchEngine], ) } diff --git a/test/helpers/TestConfiguration.scala b/test/helpers/TestConfiguration.scala index 509ca4f291..18c9699a8f 100644 --- a/test/helpers/TestConfiguration.scala +++ b/test/helpers/TestConfiguration.scala @@ -1,9 +1,9 @@ package helpers -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.testkit.{ImplicitSender, TestKitBase} -import akka.util.Timeout +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.testkit.{ImplicitSender, TestKitBase} +import org.apache.pekko.util.Timeout import auth.handler.cookie.CookieIdContainer import auth.handler.{AuthHandler, AuthIdContainer} import auth.oauth2.MockOAuth2Service @@ -199,11 +199,11 @@ trait TestConfiguration { } /** - * Same as ITestApp but with Akka TestKit() functionality. + * Same as ITestApp but with Pekko TestKit() functionality. * * @param specificConfig A map of config values for this test */ - protected abstract class ITestAppWithAkka(specificConfig: Map[String,Any] = Map.empty) + protected abstract class ITestAppWithPekko(specificConfig: Map[String,Any] = Map.empty) extends ITestApp(specificConfig) with TestKitBase with ImplicitSender /** @@ -241,7 +241,7 @@ trait TestConfiguration { super.around(withDatabaseFixture(db, resource)(implicit db => AsResult.effectively(t))) } - protected abstract class DBTestAppWithAkka(resource: String = "", specificConfig: Map[String,Any] = Map.empty) + protected abstract class DBTestAppWithPekko(resource: String = "", specificConfig: Map[String,Any] = Map.empty) extends DBTestApp(resource, specificConfig) with TestKitBase with ImplicitSender /** diff --git a/test/integration/admin/ConvertConfigsSpec.scala b/test/integration/admin/ConvertConfigsSpec.scala index 1873e203f5..0a321f6bee 100644 --- a/test/integration/admin/ConvertConfigsSpec.scala +++ b/test/integration/admin/ConvertConfigsSpec.scala @@ -1,6 +1,6 @@ package integration.admin -import akka.util.ByteString +import org.apache.pekko.util.ByteString import helpers._ import models.{FileStage, TransformationType, _} import play.api.http.{ContentTypes, HeaderNames, Writeable} diff --git a/test/integration/admin/ImportFilesSpec.scala b/test/integration/admin/ImportFilesSpec.scala index 86688a0331..196636e77c 100644 --- a/test/integration/admin/ImportFilesSpec.scala +++ b/test/integration/admin/ImportFilesSpec.scala @@ -1,6 +1,6 @@ package integration.admin -import akka.util.ByteString +import org.apache.pekko.util.ByteString import controllers.datasets.FileToUpload import helpers._ import models.{FileStage, _} diff --git a/test/integration/admin/IndexingSpec.scala b/test/integration/admin/IndexingSpec.scala index de2dfa979c..09cf1c0379 100644 --- a/test/integration/admin/IndexingSpec.scala +++ b/test/integration/admin/IndexingSpec.scala @@ -1,9 +1,9 @@ package integration.admin -import akka.http.scaladsl.Http -import akka.http.scaladsl.model.headers.RawHeader -import akka.http.scaladsl.model.ws.{Message, TextMessage, WebSocketRequest} -import akka.stream.scaladsl.{Flow, Keep, Sink, Source} +import org.apache.pekko.http.scaladsl.Http +import org.apache.pekko.http.scaladsl.model.headers.RawHeader +import org.apache.pekko.http.scaladsl.model.ws.{Message, TextMessage, WebSocketRequest} +import org.apache.pekko.stream.scaladsl.{Flow, Keep, Sink, Source} import controllers.admin.IndexTypes import helpers.SearchTestRunner import play.api.libs.json.{Json, Writes} @@ -44,7 +44,7 @@ class IndexingSpec extends SearchTestRunner { // NB: using the technique mentioned for "half-closed" websockets here to get output // even when we are not putting any items in. We tell the system we want to get the output // by closing the server side connection by sending a None message: - // https://doc.akka.io/docs/akka-http/current/client-side/websocket-support.html#half-closed-websockets + // https://pekko.apache.org/docs/pekko-http/current/client-side/websocket-support.html#half-closed-client-websockets val outFlow: Flow[Message, Message, (Future[Seq[Message]], Promise[Option[Message]])] = Flow.fromSinkAndSourceMat(Sink.seq[Message], src.concatMat(Source.maybe[Message])(Keep.right))(Keep.both) diff --git a/test/integration/admin/IngestSpec.scala b/test/integration/admin/IngestSpec.scala index c5b23f1476..b8b08a772a 100644 --- a/test/integration/admin/IngestSpec.scala +++ b/test/integration/admin/IngestSpec.scala @@ -1,9 +1,9 @@ package integration.admin -import akka.http.scaladsl.Http -import akka.http.scaladsl.model.headers.RawHeader -import akka.http.scaladsl.model.ws.{Message, TextMessage, WebSocketRequest} -import akka.stream.scaladsl.{Flow, Keep, Sink, Source} +import org.apache.pekko.http.scaladsl.Http +import org.apache.pekko.http.scaladsl.model.headers.RawHeader +import org.apache.pekko.http.scaladsl.model.ws.{Message, TextMessage, WebSocketRequest} +import org.apache.pekko.stream.scaladsl.{Flow, Keep, Sink, Source} import com.google.inject.name.Names import helpers.{FakeMultipartUpload, IntegrationTestRunner} import models.{ContentTypes, IngestParams} diff --git a/test/integration/admin/SearchSpec.scala b/test/integration/admin/SearchSpec.scala index 2aa23dbd92..6199dfda43 100644 --- a/test/integration/admin/SearchSpec.scala +++ b/test/integration/admin/SearchSpec.scala @@ -1,11 +1,11 @@ package integration.admin -import akka.NotUsed -import akka.http.scaladsl.Http -import akka.http.scaladsl.model.StatusCodes -import akka.http.scaladsl.model.headers.RawHeader -import akka.http.scaladsl.model.ws.{Message, TextMessage, WebSocketRequest} -import akka.stream.scaladsl.{Flow, Keep, Sink, Source} +import org.apache.pekko.NotUsed +import org.apache.pekko.http.scaladsl.Http +import org.apache.pekko.http.scaladsl.model.StatusCodes +import org.apache.pekko.http.scaladsl.model.headers.RawHeader +import org.apache.pekko.http.scaladsl.model.ws.{Message, TextMessage, WebSocketRequest} +import org.apache.pekko.stream.scaladsl.{Flow, Keep, Sink, Source} import controllers.admin.IndexTypes import helpers._ import models.EntityType diff --git a/test/integration/admin/UtilsSpec.scala b/test/integration/admin/UtilsSpec.scala index c7bae2a240..9399e37db0 100644 --- a/test/integration/admin/UtilsSpec.scala +++ b/test/integration/admin/UtilsSpec.scala @@ -1,6 +1,6 @@ package integration.admin -import akka.util.Timeout +import org.apache.pekko.util.Timeout import helpers._ import play.api.test.FakeRequest diff --git a/test/integration/portal/PortalSpec.scala b/test/integration/portal/PortalSpec.scala index 417fb08b5e..d30bf28540 100644 --- a/test/integration/portal/PortalSpec.scala +++ b/test/integration/portal/PortalSpec.scala @@ -1,6 +1,6 @@ package integration.portal -import akka.util.ByteString +import org.apache.pekko.util.ByteString import cookies.{SessionPreferences, SessionPrefs} import helpers.IntegrationTestRunner import play.api.libs.json.Json diff --git a/test/services/data/WsDataServiceSpec.scala b/test/services/data/WsDataServiceSpec.scala index d512ca62e5..8425d96a8b 100644 --- a/test/services/data/WsDataServiceSpec.scala +++ b/test/services/data/WsDataServiceSpec.scala @@ -1,6 +1,6 @@ package services.data -import akka.stream.scaladsl.Source +import org.apache.pekko.stream.scaladsl.Source import helpers.IntegrationTestRunner import models._ import play.api.Configuration diff --git a/test/services/harvesting/MockHarvestEventService.scala b/test/services/harvesting/MockHarvestEventService.scala index 65627437cc..9e0157dade 100644 --- a/test/services/harvesting/MockHarvestEventService.scala +++ b/test/services/harvesting/MockHarvestEventService.scala @@ -1,9 +1,9 @@ package services.harvesting -import akka.actor.{Actor, ActorSystem, Props} -import akka.pattern.ask -import akka.stream.Materializer -import akka.util.Timeout +import org.apache.pekko.actor.{Actor, ActorSystem, Props} +import org.apache.pekko.pattern.ask +import org.apache.pekko.stream.Materializer +import org.apache.pekko.util.Timeout import models.HarvestEvent.HarvestEventType import models.{HarvestEvent, UserProfile} import services.harvesting.EventDb.Query diff --git a/test/services/harvesting/MockResourceSyncClient.scala b/test/services/harvesting/MockResourceSyncClient.scala index debde837dd..a95f67bf80 100644 --- a/test/services/harvesting/MockResourceSyncClient.scala +++ b/test/services/harvesting/MockResourceSyncClient.scala @@ -1,6 +1,6 @@ package services.harvesting -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import javax.inject.Inject import models.{FileLink, ResourceSyncConfig} diff --git a/test/services/harvesting/WSOaiPmhClientSpec.scala b/test/services/harvesting/WSOaiPmhClientSpec.scala index 9133107c9b..f79923cdb3 100644 --- a/test/services/harvesting/WSOaiPmhClientSpec.scala +++ b/test/services/harvesting/WSOaiPmhClientSpec.scala @@ -1,7 +1,7 @@ package services.harvesting -import akka.stream.scaladsl.Sink -import akka.util.ByteString +import org.apache.pekko.stream.scaladsl.Sink +import org.apache.pekko.util.ByteString import helpers.TestConfiguration import models.OaiPmhIdentity.Granularity import models.{OaiPmhConfig, BasicAuthConfig, OaiPmhIdentity} diff --git a/test/services/harvesting/WSResourceSyncClientSpec.scala b/test/services/harvesting/WSResourceSyncClientSpec.scala index defc3b4e60..eb2f3b35dc 100644 --- a/test/services/harvesting/WSResourceSyncClientSpec.scala +++ b/test/services/harvesting/WSResourceSyncClientSpec.scala @@ -1,7 +1,7 @@ package services.harvesting -import akka.actor.ActorSystem -import akka.stream.Materializer +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer import helpers.TestConfiguration import models.ResourceSyncConfig import play.api.BuiltInComponentsFromContext diff --git a/test/services/ingest/MockEadValidatorService.scala b/test/services/ingest/MockEadValidatorService.scala index a6444a1f50..0d71040bf7 100644 --- a/test/services/ingest/MockEadValidatorService.scala +++ b/test/services/ingest/MockEadValidatorService.scala @@ -1,9 +1,9 @@ package services.ingest -import akka.http.scaladsl.model.Uri -import akka.stream.Materializer -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.http.scaladsl.model.Uri +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import play.api.Configuration import services.storage.FileStorage diff --git a/test/services/ingest/MockIngestService.scala b/test/services/ingest/MockIngestService.scala index 354a0aa4b7..bc90d8569e 100644 --- a/test/services/ingest/MockIngestService.scala +++ b/test/services/ingest/MockIngestService.scala @@ -1,6 +1,6 @@ package services.ingest -import akka.actor.ActorRef +import org.apache.pekko.actor.ActorRef import models.{ContentTypes, IngestResult} import services.data.DataUser diff --git a/test/services/ingest/SqlCoreferenceServiceSpec.scala b/test/services/ingest/SqlCoreferenceServiceSpec.scala index ccb154bb81..2be899845f 100644 --- a/test/services/ingest/SqlCoreferenceServiceSpec.scala +++ b/test/services/ingest/SqlCoreferenceServiceSpec.scala @@ -1,6 +1,6 @@ package services.ingest -import akka.actor.ActorSystem +import org.apache.pekko.actor.ActorSystem import helpers._ import org.specs2.specification.AfterAll import play.api.db.Database diff --git a/test/services/ingest/SqlImportLogServiceSpec.scala b/test/services/ingest/SqlImportLogServiceSpec.scala index 37315f6b31..f2ba8214bf 100644 --- a/test/services/ingest/SqlImportLogServiceSpec.scala +++ b/test/services/ingest/SqlImportLogServiceSpec.scala @@ -1,7 +1,7 @@ package services.ingest -import akka.actor.ActorSystem -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.scaladsl.Source import helpers._ import models.{ContentTypes, ImportLog, IngestParams, UrlMapPayload} import org.specs2.specification.AfterAll diff --git a/test/services/storage/MockFileStorage.scala b/test/services/storage/MockFileStorage.scala index 2a0de47c3e..de38742543 100644 --- a/test/services/storage/MockFileStorage.scala +++ b/test/services/storage/MockFileStorage.scala @@ -1,10 +1,10 @@ package services.storage -import akka.NotUsed -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.scaladsl.{FileIO, Source} -import akka.util.ByteString +import org.apache.pekko.NotUsed +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.{FileIO, Source} +import org.apache.pekko.util.ByteString import java.net.URI import java.time.Instant diff --git a/test/services/storage/MockFileStorageSpec.scala b/test/services/storage/MockFileStorageSpec.scala index c99d4309a6..8d82d5b931 100644 --- a/test/services/storage/MockFileStorageSpec.scala +++ b/test/services/storage/MockFileStorageSpec.scala @@ -1,9 +1,9 @@ package services.storage -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import helpers.TestConfiguration import play.api.test.PlaySpecification diff --git a/test/services/storage/S3CompatibleFileStorageSpec.scala b/test/services/storage/S3CompatibleFileStorageSpec.scala index 73f032d33a..de9de7f0d3 100644 --- a/test/services/storage/S3CompatibleFileStorageSpec.scala +++ b/test/services/storage/S3CompatibleFileStorageSpec.scala @@ -1,9 +1,9 @@ package services.storage -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.scaladsl.Source -import akka.util.ByteString +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Source +import org.apache.pekko.util.ByteString import com.typesafe.config.Config import helpers.TestConfiguration import play.api.Configuration diff --git a/test/utils/CsvHelpersSpec.scala b/test/utils/CsvHelpersSpec.scala index d05ab0ea48..390146ba00 100644 --- a/test/utils/CsvHelpersSpec.scala +++ b/test/utils/CsvHelpersSpec.scala @@ -1,8 +1,8 @@ package utils -import akka.actor.ActorSystem -import akka.stream.Materializer -import akka.stream.scaladsl.Source +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.stream.Materializer +import org.apache.pekko.stream.scaladsl.Source import play.api.test.PlaySpecification import scala.concurrent.Future