Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Matador
    • Fix Version/s: Rushmore
    • Component/s: Data Summarization
    • Labels:
    • Environment:

      aml10, all other other production clients

    • Sprint:
      Sprint 1

      Description

      Problem: SEUpdate is expecting UPPERCASE status values (ACTIVE, DELETED) but Google is returning uppercase first (Active, Deleted) status values for sync_google.googleKeywords.kwStatus (UserStatus).

      Solution: Make sure we can translate the keyword status Google gives back in the zero impression keyword report we download for seupdate correctly.

      Steps to reproduce:

      /usr/local/tsa/bidmgr/seupdate.sh -d 3 -a  <accountID> --accounts --groups --listings --inactive --deleted 
      

      Run this on all AML environments to find out the dates and environments affected.

          grep -c 'Could not create Criterion instance for AdGroup' /var/local/tsa/admaxlistener/job_logs/finished/2014-* | grep -v ':0'
      

      We will probably want to fix this ASAP, before discrepancies get worse. I don't know if this bug is related to the v201406 upgrade, or if Google decided to change the values for "kwStatus" that we download from the reports.

      Here is the full stack trace. The bug affects "seupdate" which inserts rows (keywords) in `st-tracker`.sources. Without those rows, the warehouse doesn't get the data.

      SEUpdate Stack Trace
      2014-11-20 03:04:42.700 (1) [P3T1]: Exception [Could not create Criterion instance for AdGroup:14362098392 CampaignId: 206872352  ]:java.lang.IllegalArgumentException
              at com.google.api.ads.adwords.axis.v201406.cm.UserStatus.fromValue(UserStatus.java:31)
              at com.google.api.ads.adwords.axis.v201406.cm.UserStatus.fromString(UserStatus.java:36)
              at com.thesearchagency.searchengines.google.GoogleAPISearchEngine$ListingChunk$TsaCriterionFactory.getInstance(GoogleAPISearchEngine.java:4628)
              at com.thesearchagency.searchengines.google.GoogleAPISearchEngine$ListingChunk.getListings(GoogleAPISearchEngine.java:3863)
              at com.thesearchagency.searchengines.SearchEngineUpdater$SearchEngineAccountWorker.syncListings(SearchEngineUpdater.java:1652)
              at com.thesearchagency.searchengines.SearchEngineUpdater$SearchEngineAccountWorker.call(SearchEngineUpdater.java:1573)
              at com.thesearchagency.searchengines.SearchEngineUpdater$SearchEngineAccountWorker.call(SearchEngineUpdater.java:1534)
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
              at java.util.concurrent.FutureTask.run(FutureTask.java:138)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      
      mysql> select count(1) from sync_google.googleKeywords where kwStatus='active' and kwIsNegative='false';
      +----------+
      | count(1) |
      +----------+
      |   798530 |
      +----------+
      
      select count(1) from `st-tracker`.sources;
      +----------+
      | count(1) |
      +----------+
      |   378058 |
      +----------+
      
      mysql> select startTime, count(1) from staging.googleMcc where startTime >= '2014-11-01' group by day(startTime);
      +------------+----------+
      | startTime  | count(1) |
      +------------+----------+
      | 2014-11-01 |     3021 |
      | 2014-11-02 |     3139 |
      | 2014-11-03 |     3320 |
      | 2014-11-04 |     3394 |
      | 2014-11-05 |     3114 |
      | 2014-11-06 |     2926 |
      | 2014-11-07 |     2927 |
      | 2014-11-08 |     2918 |
      | 2014-11-09 |     2824 |
      | 2014-11-10 |     3099 |
      | 2014-11-11 |     2774 |
      | 2014-11-12 |     2723 |
      | 2014-11-13 |     2796 |
      | 2014-11-14 |     2147 |
      | 2014-11-15 |     2361 |
      | 2014-11-16 |     2460 |
      | 2014-11-17 |      334 |
      | 2014-11-18 |      270 |
      | 2014-11-19 |      262 |
      +------------+----------+
      
      GoogleAPISearchEngine.java
                                  if (aResultSet.getString(GoogleKeywordTable.KW_STATUS).equals(GoogleKeywordTable.KwStatusValue.DISAPPROVED.toString())) {
                                      ((BiddableAdGroupCriterion) ret).setUserStatus(UserStatus.ACTIVE);
                                      ((BiddableAdGroupCriterion) ret).setApprovalStatus(ApprovalStatus.DISAPPROVED);
                                  }
                                  else if(aResultSet.getString(GoogleKeywordTable.KW_STATUS).equalsIgnoreCase("enabled"))
                                      ((BiddableAdGroupCriterion) ret).setUserStatus(UserStatus.ACTIVE);
                                  else {
                                      ((BiddableAdGroupCriterion) ret).setUserStatus(UserStatus.fromString(aResultSet.getString(GoogleKeywordTable.KW_STATUS).toUpperCase()));
                                  }
      

        Attachments

          Activity

            People

            • Assignee:
              varshini.padmanabhan Varshini Padmanabhan (Inactive)
              Reporter:
              therouxj Jeff Theroux
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: