Details
-
Type: Task
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.1.0
-
Fix Version/s: Apponaug
-
Component/s: None
-
Labels:None
-
Sprint:Sprint 5
Description
This task is to test the work-around for AML-1231. The workaround is being tracked in a separate issue in the platform team's rapid board. This is the testing task for that issue.
Here are the details of the issue:
History of this bug in AML-1064
--------------------------------
All campaigns are NOT accruing budget regardless of state (paused/active) on deployment.
Testing steps:
1. Deployed a new account/merchant with one campaign and no errors. Check the account in adwords, the campaigns are active as expected.
2. Check st-tracker.admaxCampaignBudgetAccrualStatus for an active status on the newly deployed campaign. The status is set to active as expected.
3. Create an error in the keywords. I have added a ',' to a keyword in the existing campaign, expecting it to fail on redeloy.
4. In AML UI, update the account with a redeploy, using the existing campaign (now with the broken keyword) and a new campaign that you expect to work. This will get the partial failure. Request deployment on that.
Results: Once the deployment is complete, the AML UI goes to ERROR, and the adwords UI, is active for the old campaign and paused for the new campaign (AML-1064).
The budget accrual status for the new campaign is PAUSED, while the first campaign is still listed as ACTIVE.
Expected result for budget accrual status: Both campaigns should be ACTIVE in admaxCampaignBudgetAccrualStatus.
Here are the details for the workaround:
Created a python script [1] to do the following:
1. Set status to active in admaxCampaignBudgetAccrualStatus table for all non-deleted campaigns in admaxCampaign.
2. Insert new record in admaxCampaignBudgetAccrualStatus table for all non-deleted campaigns in admaxCampaign if no record exists for an update.
Tester Notes:
1. Execute the following query to see if there are any records to update, if not then change the status in admaxCampaignBudgetAccrualStatus to 'pause' and then run the script. After the successful run, output should show the exact number of rows updated.
select s.* from admaxCampaigns c, admaxCampaignBudgetAccrualStatus s where c.id = s.admaxCampaignID and s.status = 'paused' and c.status not in ('Deleted');
2. Insert new records in admaxCampaigns table and see if running the script inserts same number of records in admaxCampaignBudgetAccrualStatus table.
3. When there is nothing to update and add in admaxCampaignBudgetAccrualStatus table, running the script should print '0' count for both updates and inserts.
[1] https://github.com/thesearchagency/core/blob/2.1.0-RELEASE/releases/Cumberland/CampaignBudgetAccrualDiscrepency.py