Skip to content

Commit

Permalink
Merge pull request #26204 from guardian/revert-26203-clj/downgrade-df…
Browse files Browse the repository at this point in the history
…p-api

Revert "Downgrade DFP API to test alarm"
  • Loading branch information
chrislomaxjones authored Jun 8, 2023
2 parents ded8724 + a57fc5d commit d6fe041
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion admin/app/dfp/AdUnitAgent.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dfp

import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder
import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder
import common.dfp.GuAdUnit
import conf.Configuration
import ApiHelper.toSeq
Expand Down
2 changes: 1 addition & 1 deletion admin/app/dfp/ApiHelper.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dfp

import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.v202208._
import common.GuLogging
import org.joda.time.{DateTime => JodaDateTime, DateTimeZone}

Expand Down
4 changes: 2 additions & 2 deletions admin/app/dfp/CustomFieldAgent.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dfp

import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder
import com.google.api.ads.admanager.axis.v202108.{CustomFieldValue, LineItem, TextValue}
import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder
import com.google.api.ads.admanager.axis.v202208.{CustomFieldValue, LineItem, TextValue}
import common.dfp.GuCustomField
import concurrent.BlockingOperations

Expand Down
4 changes: 2 additions & 2 deletions admin/app/dfp/CustomTargetingAgent.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dfp

import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder
import com.google.api.ads.admanager.axis.v202108.{CustomTargetingKey, CustomTargetingValue}
import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder
import com.google.api.ads.admanager.axis.v202208.{CustomTargetingKey, CustomTargetingValue}
import common.GuLogging
import common.dfp.{GuCustomTargeting, GuCustomTargetingValue}
import concurrent.BlockingOperations
Expand Down
2 changes: 1 addition & 1 deletion admin/app/dfp/DataMapper.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dfp

import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.v202208._
import common.dfp._
import dfp.ApiHelper.{isPageSkin, optJavaInt, toJodaTime, toSeq}

Expand Down
2 changes: 1 addition & 1 deletion admin/app/dfp/DataValidation.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dfp

import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.v202208._
import common.dfp._
import dfp.ApiHelper.toSeq

Expand Down
4 changes: 2 additions & 2 deletions admin/app/dfp/DfpApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package dfp

// StatementBuilder query language is PQL defined here:
// https://developers.google.com/ad-manager/api/pqlreference
import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder
import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder
import com.google.api.ads.admanager.axis.v202208._
import com.madgag.scala.collection.decorators.MapDecorator
import common.GuLogging
import common.dfp._
Expand Down
2 changes: 1 addition & 1 deletion admin/app/dfp/PlacementAgent.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dfp

import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder
import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder
import common.dfp.GuAdUnit
import concurrent.BlockingOperations

Expand Down
6 changes: 3 additions & 3 deletions admin/app/dfp/Reader.scala
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package dfp

import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder
import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder.SUGGESTED_PAGE_LIMIT
import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder
import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder.SUGGESTED_PAGE_LIMIT
import com.google.api.ads.admanager.axis.v202208._

import scala.annotation.tailrec

Expand Down
2 changes: 1 addition & 1 deletion admin/app/dfp/ServicesWrapper.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dfp

import com.google.api.ads.admanager.axis.factory.AdManagerServices
import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.v202208._
import com.google.api.ads.admanager.lib.client.AdManagerSession

private[dfp] class ServicesWrapper(session: AdManagerSession) {
Expand Down
4 changes: 2 additions & 2 deletions admin/app/dfp/SessionLogger.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dfp

import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder
import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder
import com.google.api.ads.admanager.axis.v202208._
import common.GuLogging

import scala.util.control.NonFatal
Expand Down
5 changes: 2 additions & 3 deletions admin/app/dfp/SessionWrapper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package dfp

import com.google.api.ads.common.lib.auth.OfflineCredentials
import com.google.api.ads.common.lib.auth.OfflineCredentials.Api
import com.google.api.ads.admanager.axis.utils.v202108.{ReportDownloader, StatementBuilder}
import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.utils.v202208.{ReportDownloader, StatementBuilder}
import com.google.api.ads.admanager.axis.v202208._
import com.google.api.ads.admanager.lib.client.AdManagerSession
import com.google.common.io.CharSource
import common.GuLogging
Expand Down Expand Up @@ -226,7 +226,6 @@ object SessionWrapper extends GuLogging {
} catch {
case NonFatal(e) =>
log.error(s"Building DFP session failed.", e)
println(s"Building DFP session failed.", e)
DfpSessionErrors.increment();
None
}
Expand Down
8 changes: 4 additions & 4 deletions admin/app/jobs/CommercialDfpReporting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package jobs
import java.time.{LocalDate, LocalDateTime}

import app.LifecycleComponent
import com.google.api.ads.admanager.axis.v202108.Column.{AD_SERVER_IMPRESSIONS, AD_SERVER_WITHOUT_CPD_AVERAGE_ECPM}
import com.google.api.ads.admanager.axis.v202108.DateRangeType.CUSTOM_DATE
import com.google.api.ads.admanager.axis.v202108.Dimension.{CUSTOM_CRITERIA, DATE}
import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.v202208.Column.{AD_SERVER_IMPRESSIONS, AD_SERVER_WITHOUT_CPD_AVERAGE_ECPM}
import com.google.api.ads.admanager.axis.v202208.DateRangeType.CUSTOM_DATE
import com.google.api.ads.admanager.axis.v202208.Dimension.{CUSTOM_CRITERIA, DATE}
import com.google.api.ads.admanager.axis.v202208._
import common.{AkkaAsync, Box, JobScheduler, GuLogging}
import dfp.DfpApi
import play.api.inject.ApplicationLifecycle
Expand Down
2 changes: 1 addition & 1 deletion admin/test/dfp/DfpApiValidationTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dfp

import concurrent.BlockingOperations
import common.dfp.{GuAdUnit, GuLineItem, GuTargeting, Sponsorship}
import com.google.api.ads.admanager.axis.v202108._
import com.google.api.ads.admanager.axis.v202208._
import org.joda.time.DateTime
import akka.actor.ActorSystem
import org.scalatest.flatspec.AnyFlatSpec
Expand Down
2 changes: 1 addition & 1 deletion admin/test/dfp/ReaderTest.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dfp

import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder
import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder
import dfp.Reader.read
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object Dependencies {
val commonsIo = "commons-io" % "commons-io" % "2.5"
val cssParser = "net.sourceforge.cssparser" % "cssparser" % "0.9.23"
val contentApiClient = "com.gu" %% "content-api-client" % capiVersion
val dfpAxis = "com.google.api-ads" % "dfp-axis" % "4.15.1"
val dfpAxis = "com.google.api-ads" % "dfp-axis" % "4.20.0"
val faciaFapiScalaClient = "com.gu" %% "fapi-client-play27" % faciaVersion
val identityCookie = "com.gu.identity" %% "identity-cookie" % identityLibVersion
val identityModel = "com.gu.identity" %% "identity-model" % identityLibVersion
Expand Down

0 comments on commit d6fe041

Please sign in to comment.