Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix database upgrade paths for iOS #7567

Merged
merged 1 commit into from
Jan 12, 2021
Merged

Fix database upgrade paths for iOS #7567

merged 1 commit into from
Jan 12, 2021

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Jan 12, 2021

Resolves brave/brave-browser#13495

Submitter Checklist:

  • There is a ticket for my issue.
  • Used Github auto-closing keywords in the commit message.
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed).
  • Requested a security/privacy review as needed.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

  • See Fix database upgrade paths for iOS brave-browser#13495 for iOS
  • Confirm Brave ads are delivered on iOS
  • Confirm upgrade paths for desktop from 1.17.x to 1.20.x
  • Confirm upgrade paths for desktop from 1.18.x to 1.20.x
  • Confirm upgrade paths for desktop from 1.19.x to 1.20.x

Copy link
Contributor

@moritzhaller moritzhaller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM++

@tmancey tmancey merged commit ade0c03 into master Jan 12, 2021
@tmancey tmancey deleted the issues/13495 branch January 12, 2021 20:12
@tmancey tmancey added this to the 1.20.x - Nightly milestone Jan 12, 2021
@kjozwiak
Copy link
Member

Verification PASSED on Win 10 x64 using the following STR/Cases:

Test Case 1 (ensuring rewards working on 1.21.x)

  • ensured that both NTP SI/Ad notifications are working and brave://rewards is being updated
  • ensured that connecting a KYC's/Verified account worked without any issues
  • ensured that tipping was working as expected

Build being used:

Brave | 1.21.28 Chromium: 88.0.4324.96 (Official Build) nightly (64-bit)
-- | --
Revision | 68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS | Windows 10 OS Version 2009 (Build 19042.746)

Test Case 2 (upgrading from 1.17.x to 1.20.x)

Ads Enabled

  • downloaded/installed 1.17.75 CR: 87.0.4280.88 and enabled ads via brave://rewards
  • viewed both a NTP SI & ad notification and ensured that Estimated pending rewards, Ads received this month and 7-day Ads History were being updated
  • installed 1.20.90 CR: 88.0.4324.96
  • renamed \AppData\Local\BraveSoftware\Brave-Browser to \AppData\Local\BraveSoftware\Brave-Browser-Dev
  • launched 1.20.90 CR: 88.0.4324.96
  • ensured that the data from 1.17.75 CR: 87.0.4280.88 was still present
    • Estimated pending rewards, Ads received this month and 7-day Ads History
  • ensured that viewing a NTP SI ad was working and brave://rewards was being updated
  • ensured that viewing an ad notification was working and brave://rewards was being updated
NTP SI logs
[20932:8960:0126/154146.829:VERBOSE3:new_tab_page_ad_event_viewed.cc(26)] Viewed new tab page ad with uuid b78a1d71-75da-44f1-bd9b-f9ac856be170 and creative instance id 57808fc0-567b-4617-9dc9-cf7bf5d23db7
[20932:8960:0126/154146.830:VERBOSE1:confirmations.cc(90)] Confirming view ad for creative instance id 57808fc0-567b-4617-9dc9-cf7bf5d23db7
[20932:8960:0126/154146.833:VERBOSE6:new_tab_page_ad_event_viewed.cc(35)] Successfully logged new tab page ad viewed event
Ad notification logs
[20932:8960:0126/154541.714:VERBOSE1:ads_impl.cc(178)] Browser state changed to idle
[20932:8960:0126/154617.104:VERBOSE1:ads_impl.cc(186)] Browser state changed to unidle
[20932:8960:0126/154617.105:INFO:notification_helper_win.cc(171)] Focus Assist is disabled
[20932:8960:0126/154617.112:INFO:notification_helper_win.cc(208)] Notifications are enabled
[20932:8960:0126/154617.112:VERBOSE1:ad_notification_serving.cc(165)] Serve ad for segments:
[20932:8960:0126/154617.112:VERBOSE1:ad_notification_serving.cc(167)]   technology & computing-software
[20932:8960:0126/154617.112:VERBOSE1:ad_notification_serving.cc(167)]   personal finance-personal finance
[20932:8960:0126/154617.112:VERBOSE1:ad_notification_serving.cc(167)]   home-appliances
[20932:8960:0126/154617.113:VERBOSE1:ad_notification_serving.cc(182)] No eligible ads found for segments
[20932:8960:0126/154617.113:VERBOSE1:ad_notification_serving.cc(197)] Serve ad for parent segments:
[20932:8960:0126/154617.113:VERBOSE1:ad_notification_serving.cc(199)]   technology & computing
[20932:8960:0126/154617.113:VERBOSE1:ad_notification_serving.cc(199)]   personal finance
[20932:8960:0126/154617.113:VERBOSE1:ad_notification_serving.cc(199)]   home
[20932:8960:0126/154617.119:VERBOSE2:ad_notification_serving.cc(273)] 154 eligible ads before pacing
[20932:8960:0126/154617.119:VERBOSE2:eligible_ads_priority_filter.cc(81)] 72 eligible ads with a priority of 1
[20932:8960:0126/154617.119:VERBOSE3:eligible_ads_priority_filter.cc(89)] 82 ads with a lower priority of 2
[20932:8960:0126/154617.119:VERBOSE2:ad_notification_serving.cc(278)] 72 eligible ads after pacing
[20932:8960:0126/154617.119:VERBOSE1:ad_notification_serving.cc(264)] Found 72 eligible ads
[20932:8960:0126/154617.119:VERBOSE1:ads_service_impl.cc(1769)] Timeout ad notification with uuid 69a81ed3-fd7b-4257-952a-68677e8e2931 in 120 seconds
[20932:8960:0126/154617.120:VERBOSE1:ad_notification_serving.cc(101)] Ad notification delivered:
  uuid: 69a81ed3-fd7b-4257-952a-68677e8e2931
  creativeInstanceId: 6019dacb-5f76-4ad5-9197-a2db5160f7c1
  creativeSetId: 72bfaae5-a70a-46f9-b9d8-60c80dfbcca9
  campaignId: d386c57d-44a3-4444-8be2-207ad7ae088a
  segment: technology & computing
  title: Coinberry
  body: Buy Bitcoin in Canada. 0% Funding, 0% Withdrawal Fees.
  targetUrl: https://www.coinberry.com/

Ads Disabled

  • installed 1.17.75 CR: 87.0.4280.88 and disabled ads via brave://rewards
  • renamed \AppData\Local\BraveSoftware\Brave-Browser to \AppData\Local\BraveSoftware\Brave-Browser-Dev
  • launched 1.20.90 CR: 88.0.4324.96
  • ensured that ads were still disabled via brave://rewards
  • enabled ads via brave://rewards
  • ensured that viewing a NTP SI ad was working and brave://rewards was being updated
  • ensured that viewing an ad notification was working and brave://rewards was being updated
NTP SI logs
[29668:23428:0126/155054.032:VERBOSE3:new_tab_page_ad_event_viewed.cc(26)] Viewed new tab page ad with uuid a40c10d9-08f4-47ca-afa0-174faea5426d and creative instance id 57808fc0-567b-4617-9dc9-cf7bf5d23db7
[29668:23428:0126/155054.032:VERBOSE1:confirmations.cc(90)] Confirming view ad for creative instance id 57808fc0-567b-4617-9dc9-cf7bf5d23db7
[29668:23428:0126/155054.040:VERBOSE6:new_tab_page_ad_event_viewed.cc(35)] Successfully logged new tab page ad viewed event
Ad notification logs
[29668:23428:0126/155220.420:VERBOSE1:ads_impl.cc(178)] Browser state changed to idle
[29668:23428:0126/155352.278:VERBOSE1:ads_impl.cc(186)] Browser state changed to unidle
[29668:23428:0126/155352.279:INFO:notification_helper_win.cc(171)] Focus Assist is disabled
[29668:23428:0126/155352.285:INFO:notification_helper_win.cc(208)] Notifications are enabled
[29668:23428:0126/155352.286:VERBOSE1:ad_notification_serving.cc(165)] Serve ad for segments:
[29668:23428:0126/155352.286:VERBOSE1:ad_notification_serving.cc(167)]   technology & computing-software
[29668:23428:0126/155352.286:VERBOSE1:ad_notification_serving.cc(167)]   personal finance-personal finance
[29668:23428:0126/155352.286:VERBOSE1:ad_notification_serving.cc(167)]   home-appliances
[29668:23428:0126/155352.287:VERBOSE1:ad_notification_serving.cc(182)] No eligible ads found for segments
[29668:23428:0126/155352.287:VERBOSE1:ad_notification_serving.cc(197)] Serve ad for parent segments:
[29668:23428:0126/155352.287:VERBOSE1:ad_notification_serving.cc(199)]   technology & computing
[29668:23428:0126/155352.287:VERBOSE1:ad_notification_serving.cc(199)]   personal finance
[29668:23428:0126/155352.287:VERBOSE1:ad_notification_serving.cc(199)]   home
[29668:23428:0126/155352.295:VERBOSE2:ad_notification_serving.cc(273)] 158 eligible ads before pacing
[29668:23428:0126/155352.295:VERBOSE2:eligible_ads_priority_filter.cc(81)] 76 eligible ads with a priority of 1
[29668:23428:0126/155352.295:VERBOSE3:eligible_ads_priority_filter.cc(89)] 82 ads with a lower priority of 2
[29668:23428:0126/155352.295:VERBOSE2:ad_notification_serving.cc(278)] 76 eligible ads after pacing
[29668:23428:0126/155352.295:VERBOSE1:ad_notification_serving.cc(264)] Found 76 eligible ads
[29668:23428:0126/155352.296:VERBOSE1:ads_service_impl.cc(1769)] Timeout ad notification with uuid cb0ecbb8-ad0f-4bdb-9df5-3657044b698a in 120 seconds
[29668:23428:0126/155352.296:VERBOSE1:ad_notification_serving.cc(101)] Ad notification delivered:
  uuid: cb0ecbb8-ad0f-4bdb-9df5-3657044b698a
  creativeInstanceId: 1631fbc6-fb20-4ed1-a144-0f63d9cb96e9
  creativeSetId: 6b869181-7330-4b9c-80b7-d33c50493b22
  campaignId: 37d14e05-fa1f-4730-8fd0-fa44a5ea41b3
  segment: technology & computing
  title: Gala Games: Land Sale with $BAT
  body: Use $BAT to buy Epic MMORPG NFTs from Gala Games!
  targetUrl: https://gala.games/gala-games-and-brave-present-mirandus-shops/

Test Case 3 (upgrading from 1.18.x to 1.20.x)

Ads Enabled

  • downloaded/installed 1.18.78 CR: 87.0.4280.141 and enabled ads via brave://rewards
  • viewed both a NTP SI & ad notification and ensured that Estimated pending rewards, Ads received this month and 7-day Ads History were being updated
  • installed 1.20.90 CR: 88.0.4324.96
  • renamed \AppData\Local\BraveSoftware\Brave-Browser to \AppData\Local\BraveSoftware\Brave-Browser-Dev
  • launched 1.20.90 CR: 88.0.4324.96
  • ensured that the data from 1.18.78 CR: 87.0.4280.141 was still present
    • Estimated pending rewards, Ads received this month and 7-day Ads History
  • ensured that viewing a NTP SI ad was working and brave://rewards was being updated
  • ensured that viewing an ad notification was working and brave://rewards was being updated
NTP SI logs
[16848:22380:0126/162431.797:VERBOSE3:new_tab_page_ad_event_viewed.cc(26)] Viewed new tab page ad with uuid bf0bfdab-73c2-4b31-ab36-190162805fbb and creative instance id c410cdd5-18ea-4bf1-96ac-753a72bcb869
[16848:22380:0126/162431.798:VERBOSE1:confirmations.cc(90)] Confirming view ad for creative instance id c410cdd5-18ea-4bf1-96ac-753a72bcb869
[16848:22380:0126/162431.801:VERBOSE6:new_tab_page_ad_event_viewed.cc(35)] Successfully logged new tab page ad viewed event
Ad notification logs
[16848:22380:0126/163732.224:VERBOSE1:ads_impl.cc(186)] Browser state changed to unidle
[16848:22380:0126/163732.225:INFO:notification_helper_win.cc(171)] Focus Assist is disabled
[16848:22380:0126/163732.231:INFO:notification_helper_win.cc(208)] Notifications are enabled
[16848:22380:0126/163732.232:VERBOSE1:ad_notification_serving.cc(165)] Serve ad for segments:
[16848:22380:0126/163732.232:VERBOSE1:ad_notification_serving.cc(167)]   technology & computing-software
[16848:22380:0126/163732.232:VERBOSE1:ad_notification_serving.cc(167)]   personal finance-personal finance
[16848:22380:0126/163732.232:VERBOSE1:ad_notification_serving.cc(167)]   home-appliances
[16848:22380:0126/163732.233:VERBOSE1:ad_notification_serving.cc(182)] No eligible ads found for segments
[16848:22380:0126/163732.233:VERBOSE1:ad_notification_serving.cc(197)] Serve ad for parent segments:
[16848:22380:0126/163732.233:VERBOSE1:ad_notification_serving.cc(199)]   technology & computing
[16848:22380:0126/163732.233:VERBOSE1:ad_notification_serving.cc(199)]   personal finance
[16848:22380:0126/163732.233:VERBOSE1:ad_notification_serving.cc(199)]   home
[16848:22380:0126/163732.241:VERBOSE2:ad_notification_serving.cc(273)] 148 eligible ads before pacing
[16848:22380:0126/163732.242:VERBOSE2:eligible_ads_priority_filter.cc(81)] 66 eligible ads with a priority of 1
[16848:22380:0126/163732.242:VERBOSE3:eligible_ads_priority_filter.cc(89)] 82 ads with a lower priority of 2
[16848:22380:0126/163732.242:VERBOSE2:ad_notification_serving.cc(278)] 66 eligible ads after pacing
[16848:22380:0126/163732.242:VERBOSE1:ad_notification_serving.cc(264)] Found 66 eligible ads
[16848:22380:0126/163732.242:VERBOSE1:ads_service_impl.cc(1769)] Timeout ad notification with uuid 3a1a32bf-db5b-48fe-98a7-dfe6156dee8c in 120 seconds
[16848:22380:0126/163732.243:VERBOSE1:ad_notification_serving.cc(101)] Ad notification delivered:
  uuid: 3a1a32bf-db5b-48fe-98a7-dfe6156dee8c
  creativeInstanceId: cac0f2de-9ab8-412a-8954-810ba90f4a73
  creativeSetId: 875e61df-fb14-455f-89ec-f50eeac8e5e7
  campaignId: 33b80374-e0a3-4460-8dd2-8463ad2f0975
  segment: technology & computing
  title: Buy with BAT
  body: Make purchases Brave Swag store with BAT! Learn more.
  targetUrl: https://basicattentiontoken.org/#participants?utility=ecom
[16848:22380:0126/163732.243:VERBOSE3:ad_notification_event_viewed.cc(24)

Ads Disabled

  • installed 1.18.78 CR: 87.0.4280.141 and disabled ads via brave://rewards
  • renamed \AppData\Local\BraveSoftware\Brave-Browser to \AppData\Local\BraveSoftware\Brave-Browser-Dev
  • launched 1.20.90 CR: 88.0.4324.96
  • ensured that ads were still disabled via brave://rewards
  • enabled ads via brave://rewards
  • ensured that viewing a NTP SI ad was working and brave://rewards was being updated
  • ensured that viewing an ad notification was working and brave://rewards was being updated
NTP SI logs
[28572:21320:0126/164633.171:VERBOSE3:new_tab_page_ad_event_viewed.cc(26)] Viewed new tab page ad with uuid 9a9ac07d-44cd-4967-bf9a-bc1386bb4209 and creative instance id 57808fc0-567b-4617-9dc9-cf7bf5d23db7
[28572:21320:0126/164633.172:VERBOSE1:confirmations.cc(90)] Confirming view ad for creative instance id 57808fc0-567b-4617-9dc9-cf7bf5d23db7
[28572:21320:0126/164633.175:VERBOSE6:new_tab_page_ad_event_viewed.cc(35)] Successfully logged new tab page ad viewed event
Ad notification logs
[28572:21320:0126/164747.750:VERBOSE1:ads_impl.cc(178)] Browser state changed to idle
[28572:21320:0126/164808.957:VERBOSE1:ads_impl.cc(186)] Browser state changed to unidle
[28572:21320:0126/164808.958:INFO:notification_helper_win.cc(171)] Focus Assist is disabled
[28572:21320:0126/164808.964:INFO:notification_helper_win.cc(208)] Notifications are enabled
[28572:21320:0126/164808.965:VERBOSE1:ad_notification_serving.cc(165)] Serve ad for segments:
[28572:21320:0126/164808.965:VERBOSE1:ad_notification_serving.cc(167)]   technology & computing-software
[28572:21320:0126/164808.965:VERBOSE1:ad_notification_serving.cc(167)]   personal finance-personal finance
[28572:21320:0126/164808.965:VERBOSE1:ad_notification_serving.cc(167)]   home-appliances
[28572:21320:0126/164808.966:VERBOSE1:ad_notification_serving.cc(182)] No eligible ads found for segments
[28572:21320:0126/164808.966:VERBOSE1:ad_notification_serving.cc(197)] Serve ad for parent segments:
[28572:21320:0126/164808.966:VERBOSE1:ad_notification_serving.cc(199)]   technology & computing
[28572:21320:0126/164808.966:VERBOSE1:ad_notification_serving.cc(199)]   personal finance
[28572:21320:0126/164808.966:VERBOSE1:ad_notification_serving.cc(199)]   home
[28572:21320:0126/164808.972:VERBOSE2:ad_notification_serving.cc(273)] 158 eligible ads before pacing
[28572:21320:0126/164808.972:VERBOSE2:eligible_ads_priority_filter.cc(81)] 76 eligible ads with a priority of 1
[28572:21320:0126/164808.972:VERBOSE3:eligible_ads_priority_filter.cc(89)] 82 ads with a lower priority of 2
[28572:21320:0126/164808.972:VERBOSE2:ad_notification_serving.cc(278)] 76 eligible ads after pacing
[28572:21320:0126/164808.972:VERBOSE1:ad_notification_serving.cc(264)] Found 76 eligible ads
[28572:21320:0126/164808.973:VERBOSE1:ads_service_impl.cc(1769)] Timeout ad notification with uuid 22d40f0f-63d7-45cf-965b-cd0500dba732 in 120 seconds
[28572:21320:0126/164808.974:VERBOSE1:ad_notification_serving.cc(101)] Ad notification delivered:
  uuid: 22d40f0f-63d7-45cf-965b-cd0500dba732
  creativeInstanceId: a0d479d7-6455-4943-8729-941f26d847b1
  creativeSetId: fcaffdee-94de-48a2-83fc-4adcf7221ebd
  campaignId: 68ff17a3-0e84-467c-a511-78b95e662c46
  segment: technology & computing
  title: Forge of Empires ΓÇô Play Online
  body: Guide your empire through the ages
  targetUrl: https://om.forgeofempires.com/foe/us/?ref=brave_us_us&pid=Group2

@kjozwiak
Copy link
Member

Quick note: Won't be able to QA upgrades from 1.19.x --> 1.20.x until #7679 is merged. However, looks like everything is working as expected as per #7567 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix database upgrade paths for iOS
3 participants