Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '11'
distribution: 'corretto'
cache: 'sbt'

Expand Down
35 changes: 22 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
addCommandAlias("dist", ";riffRaffArtifact")

import play.sbt.PlayImport.PlayKeys._

name := "path-manager"
Expand All @@ -8,19 +6,33 @@ resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releas

version := "1.0"

val awsVersion = "1.12.129"
val awsVersion = "1.12.583"

lazy val dependencies = Seq(
"com.amazonaws" % "aws-java-sdk-dynamodb" % awsVersion,
"com.amazonaws" % "aws-java-sdk-cloudwatch" % awsVersion,
"com.amazonaws" % "aws-java-sdk-ec2" % awsVersion,
"org.apache.commons" % "commons-lang3" % "3.11",
"net.logstash.logback" % "logstash-logback-encoder" % "6.6",
"ch.qos.logback" % "logback-core" % "1.2.7",
"ch.qos.logback" % "logback-classic" % "1.2.7",
"org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % "test",
"org.apache.commons" % "commons-lang3" % "3.14.0",
"net.logstash.logback" % "logstash-logback-encoder" % "7.3",
"org.scalatestplus.play" %% "scalatestplus-play" % "7.0.1" % "test",
"com.whisk" %% "docker-testkit-scalatest" % "0.9.9" % "test",
"com.whisk" %% "docker-testkit-impl-spotify" % "0.9.9" % "test"

// By default, logstash-logback-encoder will tell jackson to dynamically discover all available jackson modules
// on the classpath by calling objectMapper.findAndRegisterModules()
// If jackson-module-jaxb-annotations is on the classpath, jackson will try to register it and fail because
// javax.xml.bind:jaxb-api is missing. This was not an issue before Java 9, because javax.xml.bind:jaxb-api was
// included in the JDK
//
// The options to solve this were either to add javaxb-api as a dependency, or to exclude jackson-module-jaxb-annotations.
// We chose the latter because it is a smaller change and does not introduce a new dependency.
//
// See https://github.com/logfellow/logstash-logback-encoder/issues/1005

"com.whisk" %% "docker-testkit-impl-spotify" % "0.9.9" % "test" exclude("com.fasterxml.jackson.module", "jackson-module-jaxb-annotations"),

// docker-testkit-impl-spotif depends on jnr-unixsocket:0.18, which doesn't support M1 silicon
// see https://github.com/spotify/docker-client/pull/1221 (unmerged at present)
"com.github.jnr" % "jnr-unixsocket" % "0.38.22" % "test" exclude("com.fasterxml.jackson.module", "jackson-module-jaxb-annotations")
)

enablePlugins(DockerCompose)
Expand All @@ -41,10 +53,9 @@ lazy val pathManager = project.in(file("path-manager"))
"-J-XX:MaxMetaspaceSize=500m",
"-J-XX:+UseConcMarkSweepGC",
"-J-XX:+PrintGCDetails",
"-J-XX:+PrintGCDateStamps",
s"-J-Xloggc:/var/log/${packageName.value}/gc.log"
),
debianPackageDependencies := Seq("openjdk-8-jre-headless"),
debianPackageDependencies := Seq("java11-runtime-headless"),
maintainer := "Editorial Tools Developers <digitalcms.dev@theguardian.com>",
packageSummary := description.value,
packageDescription := description.value,
Expand All @@ -56,8 +67,6 @@ lazy val pathManager = project.in(file("path-manager"))
name := "path-manager",
playDefaultPort := 10000,
libraryDependencies ++= dependencies,
//Necessary to override jackson-databind versions due to AWS and Play incompatibility
dependencyOverrides += "com.fasterxml.jackson.core" % "jackson-databind" % "2.11.4",
Universal / packageName := normalizedName.value,
Universal/ topLevelDirectory := Some(normalizedName.value),
)
2 changes: 1 addition & 1 deletion path-manager/app/services/Dynamo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration
import com.amazonaws.services.dynamodbv2.document.{DynamoDB, Item}
import com.amazonaws.services.dynamodbv2.model._
import com.amazonaws.services.dynamodbv2.{AmazonDynamoDB, AmazonDynamoDBClientBuilder}
import play.api.{Logger, Logging}
import play.api.Logging

object Dynamo extends AwsInstanceTags with Logging {

Expand Down
2 changes: 1 addition & 1 deletion path-manager/app/services/Metrics.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package services
import java.util.Date
import java.util.concurrent.atomic.{AtomicLong, AtomicReference}

import akka.actor.{Actor, ActorSystem, Props}
import org.apache.pekko.actor.{Actor, ActorSystem, Props}
import com.amazonaws.services.cloudwatch.model._

import scala.concurrent.ExecutionContext.Implicits.global
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.7.3
sbt.version=1.9.6
18 changes: 2 additions & 16 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
// The Typesafe repository
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.11")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.2")

addSbtPlugin("com.github.ehsanyou" % "sbt-docker-compose" % "2.0.0")

libraryDependencies += "org.vafer" % "jdeb" % "1.3" artifacts Artifact("jdeb", "jar", "jar")

/*
Because scala-xml has not be updated to 2.x in sbt yet but has in sbt-native-packager
See: https://github.com/scala/bug/issues/12632

This effectively overrides the safeguards (early-semver) put in place by the library authors ensuring binary compatibility.
We consider this a safe operation because it only affects the compilation of build.sbt, not of the application build itself
*/
libraryDependencySchemes ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
)
libraryDependencies += "org.vafer" % "jdeb" % "1.3" artifacts Artifact("jdeb", "jar", "jar")
2 changes: 1 addition & 1 deletion riff-raff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ deployments:
app: path-manager
parameters:
amiTags:
Recipe: editorial-tools-focal-java8-ARM-WITH-cdk-base
Recipe: editorial-tools-focal-java11-ARM-WITH-cdk-base
AmigoStage: PROD
BuiltBy: amigo
amiEncrypted: true
Expand Down