Skip to content

Conversation

DanielCliftonGuardian
Copy link
Contributor

@DanielCliftonGuardian DanielCliftonGuardian commented Sep 25, 2023

What is the value of this and can you measure success?

Part of Akka migration due to licensing changes (#8783)

Note: still using akka (instead of pekko) materializer from Play as both filters extend Play's Filter, so the types need to match

What does this change?

Updates config for akka to pekko as mentioned in the Pekko migration guide

Config names use “pekko” prefix instead of “akka”, e.g. pekko.actor.provider instead of akka.actor.provider

Also renames akkaAsync values to pekkoAsync to make it super clear it's using Pekko not Akka now.

This completes the work from #26582

Checklist

@DanielCliftonGuardian DanielCliftonGuardian marked this pull request as ready for review September 25, 2023 13:20
@DanielCliftonGuardian DanielCliftonGuardian changed the title Akka config pekko refactor(akka): update config and refactor names Sep 25, 2023
@ioannakok
Copy link
Contributor

ioannakok commented Sep 27, 2023

Looks great!! 💎 Just one clarification for a few akka related stuff I can still see in the codebase:

  1. akka.stream.Materializer in

I remember from #26563 we don't need to migrate those, is that correct?

  1. PlayAkkaHttpServer in ProjectSettings. Do we need to wait from the Play framework to migrate?

@DanielCliftonGuardian
Copy link
Contributor Author

Looks great!! 💎 Just one clarification for a few akka related stuff I can still see in the codebase:

  1. akka.stream.Materializer in

I remember from #26563 we don't need to migrate those, is that correct?

  1. PlayAkkaHttpServer in ProjectSettings. Do we need to wait from the Play framework to migrate?

akka.stream.materializer is proving difficult as we are using it in all the filters and it extends

class Gzipper(implicit val mat: Materializer) extends GzipFilter(new GzipperConfig)
which is built into play and uses akka and cannot mix the two. There is a draft PR though 0729726 But it sounds like we can use this from the migration doc. "The Additional Usage grant in Lightbend's BSL licence states: If you develop an application using a version of Play Framework that utilizes binary versions of akka-streams and its dependencies, you may use such binary versions of akka-streams and its dependencies in the development of your application only as they are incorporated into Play Framework and solely to implement the functionality provided by Play Framework; provided that, they are only used in the following way: Connecting to a Play Framework websocket and/or Play Framework request/response bodies for server and play-ws client."
2. Good spot. This seems to just be disabling the use of the PlayAkkaHttpServer as we use the PlayNettyServer so i think we want to leave this https://github.com/guardian/frontend/blob/e93bc211dc6dd2350e9c6bb5c591531afef32426/project/ProjectSettings.scala#L121C7-L121C42

@ioannakok
Copy link
Contributor

Looks great!! 💎 Just one clarification for a few akka related stuff I can still see in the codebase:

  1. akka.stream.Materializer in

I remember from #26563 we don't need to migrate those, is that correct?

  1. PlayAkkaHttpServer in ProjectSettings. Do we need to wait from the Play framework to migrate?

akka.stream.materializer is proving difficult as we are using it in all the filters and it extends

class Gzipper(implicit val mat: Materializer) extends GzipFilter(new GzipperConfig)

which is built into play and uses akka and cannot mix the two. There is a draft PR though 0729726 But it sounds like we can use this from the migration doc. "The Additional Usage grant in Lightbend's BSL licence states: If you develop an application using a version of Play Framework that utilizes binary versions of akka-streams and its dependencies, you may use such binary versions of akka-streams and its dependencies in the development of your application only as they are incorporated into Play Framework and solely to implement the functionality provided by Play Framework; provided that, they are only used in the following way: Connecting to a Play Framework websocket and/or Play Framework request/response bodies for server and play-ws client."
2. Good spot. This seems to just be disabling the use of the PlayAkkaHttpServer as we use the PlayNettyServer so i think we want to leave this https://github.com/guardian/frontend/blob/e93bc211dc6dd2350e9c6bb5c591531afef32426/project/ProjectSettings.scala#L121C7-L121C42

Thanks! Makes sense. Re the Materializer, perhaps you could add a similar comment.

Looks like both of this points will be addressed in Play 3.0.

Great work!

@prout-bot
Copy link

Seen on FRONTS-PROD (merged by @DanielCliftonGuardian 17 minutes and 59 seconds ago)

@prout-bot
Copy link

Seen on ADMIN-PROD (merged by @DanielCliftonGuardian 18 minutes and 7 seconds ago)

@mkurz
Copy link
Contributor

mkurz commented Nov 7, 2023

See

for migrating to Play 3 which comes with Pekko now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants