refactor(MEDECA-386): move persistence from Akka to Apache Pekko #40

Merged
mph merged 2 commits from MEDECA-386-pekko-main into main 2026-08-01 21:00:17 +00:00
Owner

Why

Akka 2.6.x is frozen at the pre-BSL licence and receives no further fixes. Apache Pekko is the fork of that same codebase and publishes native Scala 3 artifacts, so consuming it also lets us drop the withDottyCompat bridge and the silencer hack from this module.

This is the same change already released as v0.1.22 off release/0.1.21. It is cherry-picked here so the upcoming 0.2.0 forms release off main carries it too — otherwise the next main-line release would silently revert to Akka.

What

  • akka-persistencepekko-persistence; package works.iterative.akkaworks.iterative.pekko; Akka* types → Pekko*. Published artifact is now iw-support-pekko-persistence.
  • Pekko coordinates pinned explicitly (pekko 1.1.5, pekko-persistence-jdbc 1.2.0, pekko-projection 1.1.0, Slick 3.5.1).
  • Projection offset store pinned in this module's reference.conf to akka_projection_offset_store / akka_projection_management, because Pekko's defaults are pekko_*. Without this every consumer would silently start a fresh offset store and replay every projection.

Compatibility

Journal plugin ids (jdbc-journal, jdbc-snapshot-store, jdbc-read-journal), all table and column names, and the | persistence-id separator are unchanged between the two versions. Serializer identifiers are preserved, and PekkoZioJsonSerializer.fromBinary ignores the stored manifest, so existing journal and snapshot rows deserialize unchanged.

Verified at runtime in medeca-modul-poptavky against a database holding Akka-written rows: Pekko resumed from the existing offset without replaying, and after the offset was cleared it replayed and deserialized those Akka-written events correctly. New writes use an identical wire format.

Version

CommonVersion.publishVersion moves 0.1.22-SNAPSHOT0.2.0-SNAPSHOT. 0.1.22 is now a released tag off the release line, so main could not keep claiming it. This also matches the plan for forms consolidation to ship as 0.2.0.

Note for consumers

cmi-portaly also consumes iw-support. It does not use this module, but the artifact rename is breaking for anyone who does.

## Why Akka 2.6.x is frozen at the pre-BSL licence and receives no further fixes. Apache Pekko is the fork of that same codebase and publishes native Scala 3 artifacts, so consuming it also lets us drop the `withDottyCompat` bridge and the silencer hack from this module. This is the same change already released as **v0.1.22** off `release/0.1.21`. It is cherry-picked here so the upcoming **0.2.0** forms release off `main` carries it too — otherwise the next main-line release would silently revert to Akka. ## What - `akka-persistence` → `pekko-persistence`; package `works.iterative.akka` → `works.iterative.pekko`; `Akka*` types → `Pekko*`. Published artifact is now `iw-support-pekko-persistence`. - Pekko coordinates pinned explicitly (`pekko` 1.1.5, `pekko-persistence-jdbc` 1.2.0, `pekko-projection` 1.1.0, Slick 3.5.1). - Projection offset store pinned in this module's `reference.conf` to `akka_projection_offset_store` / `akka_projection_management`, because Pekko's defaults are `pekko_*`. Without this every consumer would silently start a fresh offset store and replay every projection. ## Compatibility Journal plugin ids (`jdbc-journal`, `jdbc-snapshot-store`, `jdbc-read-journal`), all table and column names, and the `|` persistence-id separator are unchanged between the two versions. Serializer identifiers are preserved, and `PekkoZioJsonSerializer.fromBinary` ignores the stored manifest, so existing journal and snapshot rows deserialize unchanged. Verified at runtime in `medeca-modul-poptavky` against a database holding Akka-written rows: Pekko resumed from the existing offset without replaying, and after the offset was cleared it replayed and deserialized those Akka-written events correctly. New writes use an identical wire format. ## Version `CommonVersion.publishVersion` moves `0.1.22-SNAPSHOT` → `0.2.0-SNAPSHOT`. `0.1.22` is now a released tag off the release line, so main could not keep claiming it. This also matches the plan for forms consolidation to ship as 0.2.0. ## Note for consumers `cmi-portaly` also consumes iw-support. It does not use this module, but the artifact rename is breaking for anyone who does.
Replace Akka 2.6 / Akka Persistence JDBC / Akka Projection coordinates with
Apache Pekko 1.1.5 / 1.2.0 / 1.1.0 and bump Slick to 3.5.1. All Pekko artifacts
publish native Scala 3 builds, so withDottyCompat and the silencer dependency
are dropped. Sources rename akka.* imports to org.apache.pekko.*; the package
name works.iterative.akka and the Mill module name are intentionally unchanged.
reference.conf moves the serializer config from akka.actor to pekko.actor.
refactor(MEDECA-386): name the Pekko persistence module after Pekko
All checks were successful
CI / Check Formatting (pull_request) Successful in 1m22s
CI / Compile (pull_request) Successful in 2m25s
CI / Check Linting (pull_request) Successful in 5m36s
CI / Run Tests (pull_request) Successful in 2m15s
743bd0350c
Renames the module, package and types to match the runtime they wrap:
akka-persistence -> pekko-persistence, works.iterative.akka ->
works.iterative.pekko, Akka* -> Pekko*. The published artifact becomes
iw-support-pekko-persistence.

Serializer identifiers (1241001, 1241002) are unchanged, and the
serializer ignores the stored manifest on read, so existing journal and
snapshot rows deserialize as before.

Pins the projection offset store to the table names deployments already
carry, so the Pekko defaults (pekko_projection_offset_store /
pekko_projection_management) do not silently start a fresh offset store
and replay every projection.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
Owner

CI run #14 failed on sqldb-mysql.testMySQLMinimalSpec - can create Repo with OffsetDateTime. This is a MySQL testcontainer that failed to start inside its 1-minute budget (JdbcDatabaseContainer.waitUntilContainerStartedGenericContainer.tryStartMySQLTestingLayers.scala:27), not a test assertion failure.

Evidence it is environmental rather than a regression:

  • The same spec ran in 6s earlier in that very run, then took 109s and timed out later in the run — container startup degraded under load, the code did not change between the two.
  • ./mill sqldb-mysql.test passes locally on this branch: 24 tests, 20s, including the exact failing case.
  • sqldb-mysql has no dependency on the persistence module. This change touches only pekko-persistence/ and build.mill's module wiring and version.

Please hit Re-run on the job — the Actions rerun REST endpoint returns 404 on this host, so it cannot be re-triggered from the CLI.

CI run #14 failed on `sqldb-mysql.test` — `MySQLMinimalSpec - can create Repo with OffsetDateTime`. This is a MySQL testcontainer that failed to start inside its 1-minute budget (`JdbcDatabaseContainer.waitUntilContainerStarted` → `GenericContainer.tryStart` → `MySQLTestingLayers.scala:27`), not a test assertion failure. Evidence it is environmental rather than a regression: - The same spec ran in **6s** earlier in that very run, then took **109s** and timed out later in the run — container startup degraded under load, the code did not change between the two. - `./mill sqldb-mysql.test` passes locally on this branch: **24 tests, 20s**, including the exact failing case. - `sqldb-mysql` has no dependency on the persistence module. This change touches only `pekko-persistence/` and `build.mill`'s module wiring and version. Please hit **Re-run** on the job — the Actions rerun REST endpoint returns 404 on this host, so it cannot be re-triggered from the CLI.
mph merged commit 06ecc18b82 into main 2026-08-01 21:00:17 +00:00
mph deleted branch MEDECA-386-pekko-main 2026-08-01 21:00:17 +00:00
Sign in to join this conversation.
No description provided.