Skip to content

Commit

Permalink
Merge branch 'main' into remove-user-benefits-abtest
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertbates authored Feb 4, 2025
2 parents f02a889 + 379308c commit 08e562f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
2 changes: 0 additions & 2 deletions admin/app/controllers/admin/SwitchboardController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import conf.switches.Switches
import http.GuardianAuthWithExemptions
import model.{ApplicationContext, NoCache}
import play.api.mvc._
import services.SwitchNotification
import tools.Store

import scala.concurrent.Future
Expand Down Expand Up @@ -87,7 +86,6 @@ class SwitchboardController(
log.info("switches successfully updated")

val changes = updates filterNot { current contains _ }
SwitchNotification.onSwitchChanges(pekkoAsync)(requester, Configuration.environment.stage, changes)
changes foreach { change =>
log.info(s"Switch change by $requester: $change")
}
Expand Down
11 changes: 0 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,6 @@ val sport = application("sport")

val discussion = application("discussion").dependsOn(commonWithTests).aggregate(common)

val diagnostics = application("diagnostics")
.dependsOn(commonWithTests)
.aggregate(common)
.settings(
libraryDependencies ++= Seq(
redisClient,
),
)

val admin = application("admin")
.dependsOn(commonWithTests)
.aggregate(common)
Expand Down Expand Up @@ -174,7 +165,6 @@ val dev = application("dev-build")
archive,
sport,
discussion,
diagnostics,
identity,
admin,
commercial,
Expand Down Expand Up @@ -209,7 +199,6 @@ val main = root()
applications,
sport,
discussion,
diagnostics,
admin,
identity,
commercial,
Expand Down
1 change: 0 additions & 1 deletion common/app/common/configuration.scala
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ class GuardianConfiguration extends GuLogging {
lazy val frontendStoreBucket = configuration.getMandatoryStringProperty("aws.bucket")
lazy val topMentionsStoreBucket =
configuration.getStringProperty("aws.topMentions.bucket")
lazy val notificationSns: String = configuration.getMandatoryStringProperty("sns.notification.topic.arn")
lazy val videoEncodingsSns: String =
configuration.getMandatoryStringProperty("sns.missing_video_encodings.topic.arn")
lazy val frontPressSns: Option[String] = configuration.getStringProperty("frontpress.sns.topic")
Expand Down
19 changes: 0 additions & 19 deletions common/app/services/Notification.scala
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,6 @@ trait Notification extends GuLogging {
}
}

object SwitchNotification extends Notification {
lazy val topic: String = Configuration.aws.notificationSns

def onSwitchChanges(
pekkoAsync: PekkoAsync,
)(requester: String, stage: String, changes: Seq[String])(implicit executionContext: ExecutionContext): Unit = {
val subject = s"${stage.toUpperCase}: Switch changes by $requester"
val message =
s"""
|The following updates have been made to the ${stage.toUpperCase} switches by $requester.
|
|${changes mkString "\n"}
|
""".stripMargin

send(pekkoAsync)(subject, message)
}
}

object FrontPressNotification extends Notification {
lazy val topic: String = Configuration.aws.frontPressSns.getOrElse("")
}
Expand Down

0 comments on commit 08e562f

Please sign in to comment.