Skip to content

Conversation

@sntiwari1
Copy link

@sntiwari1 sntiwari1 commented Oct 13, 2025

This PR upgrades the cert-service repository from Play Framework 2.7.2 + Akka 2.5.22 to Play Framework 3.0.5 + Apache Pekko 1.0.3.

The upgrade focuses on license compliance, improved security, and modernization to align with current Play and Pekko releases.
All functional and API compatibilities have been maintained while removing deprecated APIs and legacy configurations.


Motivation and Context

  • License Compliance: Akka switched from Apache 2.0 to Business Source License 1.1, requiring commercial licenses. Apache Pekko retains the Apache 2.0 license.
  • Security: Play 2.7.2 and Akka 2.5.22 are end-of-life and no longer receive patches.
  • Modernization: Unlocks latest language and framework improvements, especially for Play 3.0, Java 11, and Scala 2.13.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature / Upgrade (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Technology Stack Changes

Component Before After
Play Framework 2.7.2 3.0.5
Actor Framework Akka 2.5.22 Apache Pekko 1.0.3
Scala 2.11.12 2.13.12
Java 8 11
Guice 3.0 5.1.0
SLF4J 1.6.1 2.0.9
Logback 1.0.7 1.4.14
Jackson 2.9.9 2.14.3
Netty 4.1.44 4.1.93

Key Changes

Dependencies

  • All POMs updated with latest compatible versions.
  • Group ID for Play changed from com.typesafe.playorg.playframework.
  • Scala 2.11 artifacts excluded to avoid version mismatches.

Source Code

Migrated all Akka references to Pekko equivalents:

  • akka.actororg.apache.pekko.actor
  • akka.patternorg.apache.pekko.pattern
  • akka.routingorg.apache.pekko.routing
  • akka.utilorg.apache.pekko.util
  • akka.testkitorg.apache.pekko.testkit
  • play.libs.akkaplay.libs.pekko
  • scala.compat.java8.FutureConvertersscala.jdk.javaapi.FutureConverters

Play 3.0 API Updates

  • ActorStartModule: Uses PekkoGuiceSupport instead of AkkaGuiceSupport
  • OnRequestHandler: Refactored to use Http.Request parameter
  • Controllers (HealthController, CertificateController): Accept Http.Request parameter
  • Routes file: Updated to pass Http.Request parameter per Play 3.0 conventions

Configuration

  • Updated all application.conf references:
    • akkapekko
    • Updated actor system configurations, serializers, and dispatchers
  • Revised logger configurations to match Play 3.0 and Pekko structure

Scala Version Handling

  • Excluded transitive Scala 2.11 dependencies (scala-library, scala-reflect, and jackson-module-scala_2.11)
  • Explicitly declared Scala 2.13.12 dependency
  • Ensured jackson-module-scala_2.13 is included across all modules

Build Instructions

Build all modules:

mvn clean install -Dmaven.test.skip=true

<!-- Korbit AI PR Description Start -->
## Description by Korbit AI

### What change is being made?

Upgrade the project from Play Framework 2.7.2 + Akka 2.5.22 to Play Framework 3.0.5 + Apache Pekko 1.0.3, migrating all code, configurations, dependencies, and tests to Pekko-era APIs and namespaces (akka -> pekko), updating Scala/Java targets, and adjusting build configurations accordingly.

### Why are these changes being made?

To achieve Apache 2.0 license compliance with Pekko, regain security updates and modern features, and align the codebase with current Play/Pekko ecosystem practices. This is a modernization effort that preserves API compatibility where possible while migrating to Pekko-specific packages and configuration.

> Is this description stale? Ask me to generate a new description by commenting `/korbit-generate-pr-description`
<!-- Korbit AI PR Description End -->

Copilot AI and others added 15 commits October 8, 2025 05:44
- Removed storageConfig.toString() call causing scala.Serializable error
- Fixed OnRequestHandler to use Http.Request instead of deprecated Context
- Updated HealthController methods to accept Http.Request parameter
- Fixed routes file to include request parameter for health endpoint
- Fixed filters-helpers artifact name to play-filters-helpers
- Build verified successful

Co-authored-by: sntiwari1 <[email protected]>
…Serializable issues

- Updated test imports from akka to pekko (ActorSystem, ActorRef, Props, TestKit)
- Added scala-library dependency to all-actors for Scala type support
- Fixed StorageConfig mocking in tests using PowerMockito method name stubbing to avoid scala.Serializable compilation errors
- Build now succeeds with test compilation enabled

Co-authored-by: sntiwari1 <[email protected]>
- Removed exclusion of jackson-module-scala_2.13 from service POM to allow proper Jackson module loading
- Added exclusion of jackson-module-scala_2.11 from cert-processor's cloud-store-sdk dependency to prevent Scala version conflicts
- Distribution now contains only jackson-module-scala_2.13-2.14.3.jar (Scala 2.13 compatible)
- Fixes ServiceConfigurationError for DefaultScalaModule at runtime

Co-authored-by: sntiwari1 <[email protected]>
- Updated all akka namespace references to pekko in application.conf
- Changed akka.event.slf4j classes to org.apache.pekko.event.slf4j
- Changed akka.actor classes to org.apache.pekko.actor
- Changed akka.serialization to org.apache.pekko.serialization
- Fixed akka.actor.allow-java-serialization to allow-java-serialization
- Build verified successful with all Pekko configurations

Co-authored-by: sntiwari1 <[email protected]>
- Created concise UPGRADE.md with essential upgrade information
- Removed MIGRATION_COMPATIBILITY_REPORT.md (detailed technical analysis)
- Removed MIGRATION_INDEX.md (navigation hub)
- Removed MIGRATION_DECISION_TREE.md (visual decision guide)
- Removed MIGRATION_SUMMARY.md (executive summary)
- UPGRADE.md contains: overview, tech stack changes, key changes, build instructions, testing, known issues, and rollback plan
- No icons, symbols, or file counts as requested

Co-authored-by: sntiwari1 <[email protected]>
Removed verification steps and rollback plan from upgrade documentation.
… 1.0.3

Upgrade Play Framework to 3.0.5 and migrate from Akka to Apache Pekko 1.0.3
@korbit-ai
Copy link

korbit-ai bot commented Oct 13, 2025

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

@sntiwari1 sntiwari1 changed the base branch from release-8.0.0 to release-8.1.0 October 13, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant