refactor: Pekko migration#1266
Open
warcholjakub wants to merge 6 commits intoscalacenter:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request migrates the Scastie codebase from Akka to Apache Pekko, a significant refactoring that updates all actor-based components, HTTP server infrastructure, and remote communication protocols. The migration is comprehensive and touches all major modules including server, balancer, runners (sbt and scala-cli), and utilities.
Changes:
- Replaced all Akka imports with Apache Pekko equivalents across the entire codebase
- Updated configuration keys from "akka-port" to "remote-port" and "akka." to "pekko."
- Migrated third-party library dependencies (akka-http-circe → pekko-http-circe, akka-http-session → pekko-http-session, akka-http-cors → pekko-http-cors)
- Changed actor protocol URLs from "akka://" to "pekko://"
- Moved BlockingProcess from akka.contrib.process package to org.scastie.util
- Updated all logback configuration to use org.apache.pekko logger names
- Updated environment variables and deployment configuration
Reviewed changes
Copilot reviewed 62 out of 63 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| utils/src/test/scala/org/scastie/util/ProcessActorTest.scala | Updated test imports to Pekko actor and testkit |
| utils/src/main/scala/org/scastie/util/ScalaCliTask.scala | Updated ActorRef import to Pekko |
| utils/src/main/scala/org/scastie/util/SbtTask.scala | Updated ActorRef import to Pekko |
| utils/src/main/scala/org/scastie/util/ReconnectingActor.scala | Updated actor imports and renamed port fields to serverRemotePort/actorRemotePort |
| utils/src/main/scala/org/scastie/util/ProcessActor.scala | Updated all Pekko actor and stream imports, removed akka.contrib.process |
| utils/src/main/scala/org/scastie/util/GraphStageLogicForwarder.scala | Updated stream stage imports to Pekko |
| utils/src/main/scala/org/scastie/util/GraphStageForwarder.scala | Updated stream stage imports to Pekko |
| utils/src/main/scala/org/scastie/util/BlockingProcess.scala | Moved from akka.contrib.process to org.scastie.util, updated all imports and config references |
| utils/src/main/resources/reference.conf | Updated configuration keys from akka to pekko, renamed akka-port to remote-port |
| storage/src/test/resources/logback.xml | Updated logger name to org.apache.pekko |
| server/src/test/scala/org/scastie/web/SnippetIdMatcherTests.scala | Updated HTTP test imports and circe support library |
| server/src/test/resources/application.conf | Updated actor provider to fully qualified Pekko class name |
| server/src/main/scala/org/scastie/server/routes/*.scala | Updated all HTTP and actor imports across all route files |
| server/src/main/scala/org/scastie/server/oauth2/*.scala | Updated session library imports to pekko-http-session |
| server/src/main/scala/org/scastie/server/ServerMain.scala | Updated actor system, HTTP, and CORS imports; updated config key references |
| server/src/main/scala/org/scastie/server/RestApiServer.scala | Updated pattern matching and actor imports |
| server/src/main/resources/reference.conf | Updated all configuration from akka to pekko namespace |
| server/src/main/resources/logback.xml | Updated logger name to org.apache.pekko |
| scala-cli-runner/src/test/scala/org/scastie/scalacli/ScalaCliRunnerTest.scala | Updated test actor imports |
| scala-cli-runner/src/test/resources/.xml,.conf | Updated test configuration for Pekko |
| scala-cli-runner/src/main/scala/org/scastie/scalacli/*.scala | Updated all actor and pattern imports, renamed port references |
| scala-cli-runner/src/main/resources/.xml,.conf | Updated runtime configuration for Pekko |
| sbt-runner/src/test/scala/org/scastie/sbt/SbtActorTest.scala | Updated test actor imports |
| sbt-runner/src/test/resources/application.conf | Updated test configuration for Pekko |
| sbt-runner/src/main/scala/org/scastie/sbt/*.scala | Updated all actor imports, renamed port references, updated actor URLs |
| sbt-runner/src/main/resources/.xml,.conf | Updated runtime configuration for Pekko |
| run.sh | Updated environment variable from SERVER_AKKA_PORT to SERVER_REMOTE_PORT |
| project/Deployment.scala | Updated config key from akka-port to remote-port |
| deployment/*.conf | Updated deployment configurations for staging, production, and local environments |
| deployment/logback.xml | Updated logger name in production logback config |
| build.sbt | Updated all dependencies from Akka to Pekko, including versions |
| balancer/src/test/scala/org/scastie/balancer/DispatchActorIntegrationTest.scala | Updated integration test imports and renamed port variables |
| balancer/src/test/resources/application.conf | Updated actor provider configuration |
| balancer/src/main/scala/org/scastie/balancer/*.scala | Updated all actor, stream, and event imports across balancer actors |
| balancer/src/main/resources/reference.conf | Updated actor configuration warning setting |
| CONTRIBUTING.md | Updated architecture documentation to reference pekko-remote instead of akka-remote |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.