diff --git a/common/app/common/CommercialBundle.scala b/common/app/common/CommercialBundle.scala index f0694bf61898..82ff273837c8 100644 --- a/common/app/common/CommercialBundle.scala +++ b/common/app/common/CommercialBundle.scala @@ -21,7 +21,14 @@ object CommercialBundle { private var cachedBundlePath: String = bundlePathFromParameterStore private var cachedTimestamp: Instant = Instant.now() - private def bundlePathFromParameterStore: String = parameterStore.get(bundlePathKey) + private def bundlePathFromParameterStore: String = { + if (stage == "devinfra" || stage == "localtest") { + // don't read from parameter store in these environments as there may not be any credentials + "commercial" + } else { + parameterStore.get(bundlePathKey) + } + } private def bundlePath: String = { if (Instant.now().isAfter(cachedTimestamp.plus(cacheDuration.toMillis))) { diff --git a/common/app/experiments/Experiments.scala b/common/app/experiments/Experiments.scala index 1e1d087ecb01..1148de6de788 100644 --- a/common/app/experiments/Experiments.scala +++ b/common/app/experiments/Experiments.scala @@ -12,7 +12,6 @@ object ActiveExperiments extends ExperimentsDefinition { override val allExperiments: Set[Experiment] = Set( EuropeBetaFront, - CommercialBundleUpdater, DCRCrosswords, DarkModeWeb, ) @@ -32,15 +31,6 @@ object EuropeBetaFront participationGroup = Perc0A, ) -object CommercialBundleUpdater - extends Experiment( - name = "commercial-bundle-updater", - description = "Enable the commercial bundle updater", - owners = Seq(Owner.withGithub("jakeii")), - sellByDate = LocalDate.of(2025, 1, 30), - participationGroup = Perc20A, - ) - object DCRCrosswords extends Experiment( name = "dcr-crosswords", diff --git a/common/app/views/support/JavaScriptPage.scala b/common/app/views/support/JavaScriptPage.scala index fa3386a92f9b..36a4aff577fe 100644 --- a/common/app/views/support/JavaScriptPage.scala +++ b/common/app/views/support/JavaScriptPage.scala @@ -14,7 +14,6 @@ import model.dotcomrendering.DotcomRenderingUtils.assetURL import play.api.mvc.RequestHeader import views.support.Commercial.isAdFree import common.CommercialBundle -import experiments.{ActiveExperiments, CommercialBundleUpdater} object JavaScriptPage { @@ -72,13 +71,8 @@ object JavaScriptPage { val ipsos = if (page.metadata.isFront) getScriptTag(page.metadata.id) else getScriptTag(page.metadata.sectionId) - val commercialBundleUrl = - if (ActiveExperiments.isParticipating(CommercialBundleUpdater)(request)) - Configuration.commercial.overrideCommercialBundleUrl - .getOrElse(CommercialBundle.bundleUrl) - else - Configuration.commercial.overrideCommercialBundleUrl - .getOrElse(assetURL("javascripts/commercial/graun.standalone.commercial.js")) + val commercialBundleUrl = Configuration.commercial.overrideCommercialBundleUrl + .getOrElse(CommercialBundle.bundleUrl) javascriptConfig ++ config ++ commercialMetaData ++ journalismMetaData ++ Map( ("edition", JsString(edition.id)),