pjfanning opened a new pull request, #2947:
URL: https://github.com/apache/pekko/pull/2947

   Part of https://github.com/akka/akka-core/releases/tag/v2.8.2 which is now 
available under 
   Apache License v2.0.
   
   ### Motivation
   Alternative to the config `app-version` that is defined before `ActorSystem` 
startup.
   If the version is read from an external system (e.g. Kubernetes) this 
feature makes it possible to define it after system startup but before joining.
   
   Port of https://github.com/akka/akka-core/pull/31934.
   
   ### Modification
   - Added `SetAppVersionLater` / `SetAppVersion` messages to 
`ClusterUserAction` in `ClusterDaemon.scala`
   - Added `laterAppVersion` state and `setAppVersionLater` / `setAppVersion` 
private methods to `ClusterCoreDaemon`
   - Updated `uninitialized`, `tryingToJoin`, and `initialized` receive 
handlers to handle the new messages
   - Updated `join()` to defer sending a `Join` message when the appVersion 
`Future` is not yet completed
   - Updated `joining()` to use the resolved `laterAppVersion` when adding self 
as a member
   - Added `setAppVersionLater(Future[Version])` (Scala) and 
`setAppVersionLater(CompletionStage[Version])` (Java) API to `Cluster.scala`
   - Added `SetAppVersionLater` case class with Scala and Java constructors to 
`cluster-typed/Cluster.scala`
   - Handled `SetAppVersionLater` in `AdaptedClusterImpl.managerBehavior`
   - Added `AppVersionSpec` multi-JVM test
   - Uses `scala.jdk.FutureConverters` (Pekko standard) instead of 
`scala.compat.java8.FutureConverters` (Akka)
   
   ### Result
   Users can now supply `appVersion` from an external source (e.g. Kubernetes) 
after `ActorSystem` startup but before joining the cluster. The cluster join 
will wait for the `Future`/`CompletionStage` to complete before proceeding.
   
   ### Tests
   - scalafmt: not installed, skipped
   - sbt: not installed, skipped
   
   ### References
   Refs https://github.com/akka/akka-core/pull/31934


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to