Skip to content

Commit

Permalink
migrate from akka to pekko (#1531)
Browse files Browse the repository at this point in the history
Akka license changed in newer versions. Switch to
Pekko which is a fork that maintains the ApacheV2
license.
  • Loading branch information
brharrington authored Sep 5, 2023
1 parent 7a66d3b commit fe2fa1a
Show file tree
Hide file tree
Showing 138 changed files with 919 additions and 920 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
PGP_PASSPHRASE: ${{ secrets.ORG_SIGNING_PASSWORD }}
run: |
git fetch --unshallow --tags
cat /dev/null | project/sbt clean test +publishSigned
cat /dev/null | project/sbt ++2.13.11 clean test +publishSigned
cat /dev/null | project/sbt sonatypeBundleRelease
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
PGP_PASSPHRASE: ${{ secrets.ORG_SIGNING_PASSWORD }}
run: |
git fetch --unshallow --tags
cat /dev/null | project/sbt clean test +publishSigned
cat /dev/null | project/sbt ++2.13.11 clean test +publishSigned
6 changes: 0 additions & 6 deletions atlas-akka/src/main/resources/metered-mailbox.conf

This file was deleted.

5 changes: 0 additions & 5 deletions atlas-akka/src/test/resources/application.conf

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ case class Datapoint(
require(tags != null, "tags cannot be null")
require(timestamp >= 0L, s"invalid timestamp: $timestamp")

lazy val id: ItemId = TaggedItem.computeId(tags)
def id: ItemId = TaggedItem.computeId(tags)

def label: String = TimeSeries.toLabel(tags)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,11 +505,11 @@ class TimeSeriesBufferSuite extends FunSuite {
val s2 = new ArrayTimeSeq(DsType.Gauge, 5 * step, step, Array(1.0, 2.0))

// Lazy val for id under 2.13.x will have two fields in the class file, `id`
// and `bitmap$0`. Under 3.x the fields changed to `id$lzy1` and `0bitmap$1`.
// and `bitmap$0`. Under 3.3.x the field changed to `id$lzy1`.
val lazyIdFields =
try {
classOf[TimeSeriesBuffer].getField("id$lzy1")
Array("id$lzy1", "0bitmap$1")
classOf[TimeSeriesBuffer].getDeclaredField("id$lzy1")
Array("id$lzy1")
} catch {
case _: Exception => Array("id", "bitmap$0")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ package com.netflix.atlas.eval.graph

import java.util.concurrent.TimeUnit
import java.util.regex.Pattern
import akka.http.scaladsl.model.ContentType

import org.apache.pekko.http.scaladsl.model.ContentType
import com.netflix.atlas.chart.GraphEngine
import com.netflix.atlas.core.model.CustomVocabulary
import com.netflix.atlas.core.stacklang.Interpreter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package com.netflix.atlas.eval.graph

import java.time.Instant
import java.time.ZoneId
import akka.http.scaladsl.model.ContentType
import org.apache.pekko.http.scaladsl.model.ContentType
import com.netflix.atlas.chart.GraphEngine
import com.netflix.atlas.chart.model.GraphDef
import com.netflix.atlas.chart.model.LegendType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ package com.netflix.atlas.eval.graph
import java.awt.Color
import java.io.ByteArrayOutputStream
import java.time.Duration
import akka.http.scaladsl.model.HttpRequest
import akka.http.scaladsl.model.Uri
import com.netflix.atlas.akka.Cors
import org.apache.pekko.http.scaladsl.model.HttpRequest
import org.apache.pekko.http.scaladsl.model.Uri
import com.netflix.atlas.chart.Colors
import com.netflix.atlas.chart.model.GraphDef
import com.netflix.atlas.chart.model.Layout
Expand All @@ -43,6 +42,7 @@ import com.netflix.atlas.core.util.Features
import com.netflix.atlas.core.util.Strings
import com.netflix.atlas.core.util.UnitPrefix
import com.netflix.atlas.eval.util.IdParamSanitizer
import com.netflix.atlas.pekko.Cors
import com.typesafe.config.Config

import java.util.Locale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package com.netflix.atlas.eval.model

import com.netflix.atlas.akka.DiagnosticMessage
import com.netflix.atlas.json.JsonSupport
import com.netflix.atlas.pekko.DiagnosticMessage

/**
* Diagnostic message for a particular expression.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*/
package com.netflix.atlas.eval.model

import akka.util.ByteString
import org.apache.pekko.util.ByteString
import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.core.JsonToken
import com.netflix.atlas.akka.ByteStringInputStream
import com.netflix.atlas.akka.DiagnosticMessage
import com.netflix.atlas.core.util.SmallHashMap
import com.netflix.atlas.core.util.SortedTagMap
import com.netflix.atlas.json.Json
import com.netflix.atlas.json.JsonParserHelper.*
import com.netflix.atlas.pekko.ByteStringInputStream
import com.netflix.atlas.pekko.DiagnosticMessage

import java.io.ByteArrayOutputStream

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
*/
package com.netflix.atlas.eval.stream

import akka.NotUsed
import akka.http.scaladsl.model.Uri
import akka.stream.Attributes
import akka.stream.FlowShape
import akka.stream.Inlet
import akka.stream.Outlet
import akka.stream.scaladsl.Source
import akka.stream.stage.GraphStage
import akka.stream.stage.GraphStageLogic
import akka.stream.stage.InHandler
import akka.stream.stage.OutHandler
import com.netflix.atlas.akka.DiagnosticMessage
import org.apache.pekko.NotUsed
import org.apache.pekko.http.scaladsl.model.Uri
import org.apache.pekko.stream.Attributes
import org.apache.pekko.stream.FlowShape
import org.apache.pekko.stream.Inlet
import org.apache.pekko.stream.Outlet
import org.apache.pekko.stream.scaladsl.Source
import org.apache.pekko.stream.stage.GraphStage
import org.apache.pekko.stream.stage.GraphStageLogic
import org.apache.pekko.stream.stage.InHandler
import org.apache.pekko.stream.stage.OutHandler
import com.netflix.atlas.eval.stream.EurekaSource.GroupResponse
import com.netflix.atlas.eval.stream.EurekaSource.Groups
import com.netflix.atlas.eval.stream.Evaluator.DataSources
import com.netflix.atlas.pekko.DiagnosticMessage
import com.typesafe.scalalogging.StrictLogging

import scala.concurrent.duration.FiniteDuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@
*/
package com.netflix.atlas.eval.stream

import akka.NotUsed
import akka.http.scaladsl.model.HttpMethods
import akka.http.scaladsl.model.HttpRequest
import akka.http.scaladsl.model.HttpResponse
import akka.http.scaladsl.model.MediaTypes
import akka.http.scaladsl.model.StatusCodes
import akka.http.scaladsl.model.headers.*
import akka.stream.scaladsl.Compression
import akka.stream.scaladsl.Flow
import akka.stream.scaladsl.Source
import akka.util.ByteString
import org.apache.pekko.NotUsed
import org.apache.pekko.http.scaladsl.model.HttpMethods
import org.apache.pekko.http.scaladsl.model.HttpRequest
import org.apache.pekko.http.scaladsl.model.HttpResponse
import org.apache.pekko.http.scaladsl.model.MediaTypes
import org.apache.pekko.http.scaladsl.model.StatusCodes
import org.apache.pekko.http.scaladsl.model.headers.*
import org.apache.pekko.stream.scaladsl.Compression
import org.apache.pekko.stream.scaladsl.Flow
import org.apache.pekko.stream.scaladsl.Source
import org.apache.pekko.util.ByteString
import com.fasterxml.jackson.annotation.JsonProperty
import com.netflix.atlas.akka.ByteStringInputStream
import com.netflix.atlas.json.Json
import com.netflix.atlas.pekko.ByteStringInputStream
import com.typesafe.scalalogging.StrictLogging

import scala.util.Failure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
*/
package com.netflix.atlas.eval.stream

import akka.Done
import akka.NotUsed
import akka.stream.KillSwitches
import akka.stream.Materializer
import akka.stream.ThrottleMode
import akka.stream.scaladsl.Flow
import akka.stream.scaladsl.Framing
import akka.stream.scaladsl.Keep
import akka.stream.scaladsl.Sink
import akka.stream.scaladsl.Source
import akka.util.ByteString
import org.apache.pekko.Done
import org.apache.pekko.NotUsed
import org.apache.pekko.stream.KillSwitches
import org.apache.pekko.stream.Materializer
import org.apache.pekko.stream.ThrottleMode
import org.apache.pekko.stream.scaladsl.Flow
import org.apache.pekko.stream.scaladsl.Framing
import org.apache.pekko.stream.scaladsl.Keep
import org.apache.pekko.stream.scaladsl.Sink
import org.apache.pekko.stream.scaladsl.Source
import org.apache.pekko.util.ByteString
import com.netflix.spectator.api.Counter

import scala.concurrent.Promise
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*/
package com.netflix.atlas.eval.stream;

import akka.actor.ActorSystem;
import akka.http.javadsl.model.Uri;
import akka.stream.Materializer;
import akka.stream.ThrottleMode;
import akka.stream.javadsl.Flow;
import akka.stream.javadsl.Framing;
import akka.stream.javadsl.Source;
import akka.stream.javadsl.StreamConverters;
import akka.util.ByteString;
import org.apache.pekko.actor.ActorSystem;
import org.apache.pekko.http.javadsl.model.Uri;
import org.apache.pekko.stream.Materializer;
import org.apache.pekko.stream.ThrottleMode;
import org.apache.pekko.stream.javadsl.Flow;
import org.apache.pekko.stream.javadsl.Framing;
import org.apache.pekko.stream.javadsl.Source;
import org.apache.pekko.stream.javadsl.StreamConverters;
import org.apache.pekko.util.ByteString;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,27 @@ import java.time.Duration
import java.util.UUID
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeoutException
import akka.NotUsed
import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.Uri
import akka.http.scaladsl.model.ws.BinaryMessage
import akka.http.scaladsl.model.ws.TextMessage
import akka.http.scaladsl.model.ws.WebSocketRequest
import akka.stream.FlowShape
import akka.stream.Materializer
import akka.stream.OverflowStrategy
import akka.stream.ThrottleMode
import akka.stream.scaladsl.Broadcast
import akka.stream.scaladsl.BroadcastHub
import akka.stream.scaladsl.FileIO
import akka.stream.scaladsl.Flow
import akka.stream.scaladsl.GraphDSL
import akka.stream.scaladsl.Keep
import akka.stream.scaladsl.Merge
import akka.stream.scaladsl.Sink
import akka.stream.scaladsl.Source
import akka.util.ByteString
import com.netflix.atlas.akka.ClusterOps
import com.netflix.atlas.akka.StreamOps
import com.netflix.atlas.akka.ThreadPools
import org.apache.pekko.NotUsed
import org.apache.pekko.actor.ActorSystem
import org.apache.pekko.http.scaladsl.Http
import org.apache.pekko.http.scaladsl.model.Uri
import org.apache.pekko.http.scaladsl.model.ws.BinaryMessage
import org.apache.pekko.http.scaladsl.model.ws.TextMessage
import org.apache.pekko.http.scaladsl.model.ws.WebSocketRequest
import org.apache.pekko.stream.FlowShape
import org.apache.pekko.stream.Materializer
import org.apache.pekko.stream.OverflowStrategy
import org.apache.pekko.stream.ThrottleMode
import org.apache.pekko.stream.scaladsl.Broadcast
import org.apache.pekko.stream.scaladsl.BroadcastHub
import org.apache.pekko.stream.scaladsl.FileIO
import org.apache.pekko.stream.scaladsl.Flow
import org.apache.pekko.stream.scaladsl.GraphDSL
import org.apache.pekko.stream.scaladsl.Keep
import org.apache.pekko.stream.scaladsl.Merge
import org.apache.pekko.stream.scaladsl.Sink
import org.apache.pekko.stream.scaladsl.Source
import org.apache.pekko.util.ByteString
import com.netflix.atlas.core.model.DataExpr
import com.netflix.atlas.core.model.Query
import com.netflix.atlas.eval.model.AggrDatapoint
Expand All @@ -61,6 +58,9 @@ import com.netflix.atlas.eval.stream.Evaluator.DatapointGroup
import com.netflix.atlas.eval.stream.Evaluator.MessageEnvelope
import com.netflix.atlas.json.Json
import com.netflix.atlas.json.JsonSupport
import com.netflix.atlas.pekko.ClusterOps
import com.netflix.atlas.pekko.StreamOps
import com.netflix.atlas.pekko.ThreadPools
import com.netflix.spectator.api.Registry
import com.typesafe.config.Config
import org.reactivestreams.Processor
Expand Down Expand Up @@ -124,7 +124,7 @@ private[stream] abstract class EvaluatorImpl(

protected def writeInputToFileImpl(uri: Uri, file: Path, duration: FiniteDuration): Unit = {
// Explicit type needed in 2.5.2, but not 2.5.0. Likely related to:
// https://github.com/akka/akka/issues/22666
// https://github.com/pekko/pekko/issues/22666
val options = Set[OpenOption](
StandardOpenOption.WRITE,
StandardOpenOption.CREATE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.netflix.atlas.eval.stream

import akka.http.scaladsl.model.Uri
import org.apache.pekko.http.scaladsl.model.Uri
import com.netflix.atlas.core.model.CustomVocabulary
import com.netflix.atlas.core.model.DataExpr
import com.netflix.atlas.core.model.Expr
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
*/
package com.netflix.atlas.eval.stream

import akka.stream.Attributes
import akka.stream.FlowShape
import akka.stream.Inlet
import akka.stream.Outlet
import akka.stream.stage.GraphStage
import akka.stream.stage.GraphStageLogic
import akka.stream.stage.InHandler
import akka.stream.stage.OutHandler
import org.apache.pekko.stream.Attributes
import org.apache.pekko.stream.FlowShape
import org.apache.pekko.stream.Inlet
import org.apache.pekko.stream.Outlet
import org.apache.pekko.stream.stage.GraphStage
import org.apache.pekko.stream.stage.GraphStageLogic
import org.apache.pekko.stream.stage.InHandler
import org.apache.pekko.stream.stage.OutHandler

import scala.collection.Map

Expand Down
Loading

0 comments on commit fe2fa1a

Please sign in to comment.