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

Fixes Brave ads database migration from schema 10 #9589

Merged
merged 1 commit into from
Jul 31, 2021
Merged

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Jul 29, 2021

Resolves brave/brave-browser#17231

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • 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)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • 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 brave/brave-browser#17231

@tmancey tmancey requested review from moritzhaller and aseren July 29, 2021 16:37
@tmancey tmancey self-assigned this Jul 29, 2021
@tmancey tmancey requested a review from emerick July 29, 2021 16:49
@tmancey tmancey force-pushed the issues/17231 branch 2 times, most recently from 80bfecd to d97c69f Compare July 29, 2021 17:08
Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

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

LGTM

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 force-pushed the issues/17231 branch 9 times, most recently from 4aea37e to 20f6aaa Compare July 30, 2021 19:50
@tmancey tmancey force-pushed the issues/17231 branch 2 times, most recently from ef0abb9 to e363f6d Compare July 30, 2021 20:05
@tmancey tmancey merged commit d4a2625 into master Jul 31, 2021
@tmancey tmancey deleted the issues/17231 branch July 31, 2021 17:23
@tmancey tmancey added this to the 1.29.x - Nightly milestone Jul 31, 2021
@kjozwiak
Copy link
Member

kjozwiak commented Aug 3, 2021

Verification PASSED on Win 10 x64 using the following build:

Brave | 1.29.46 Chromium: 92.0.4515.115 (Official Build) nightly (64-bit)
--- | ---
Revision | 48cb2f4029b84b003719740a6cf9ca73f374a857-refs/branch-heads/4515_105@{#4}
OS | Windows 10 OS Version 2009 (Build 19042.1110)

Upgraded from 1.24.82 Chromium: 90.0.4430.93 to 1.29.46 Chromium: 92.0.4515.115 and ensured the following:

Ensured that ad rewards reconciled without any issues and the unlinded tokens were retrieved as per the following:

[20744:20048:0806/184933.936:VERBOSE1:ad_rewards.cc(250)] Successfully reconciled ad rewards
[24456:23824:0803/183153.803:VERBOSE1:refill_unblinded_tokens.cc(301)] Added 50 unblinded tokens, you now have 50 unblinded tokens

Ensured that both veiw & clicked worked as expected for NTP SI as per the following:

[25884:13192:0803/183821.911:VERBOSE1:confirmations.cc(250)] Successfully redeemed unblinded token with confirmation id 91979b19-23f3-4cf9-a7bf-490623cae49f, creative instance id e3af9ae9-b0a9-406d-b98f-ed506734aba7 and view
[25884:13192:0803/183821.911:VERBOSE1:confirmations.cc(273)] Added 1 unblinded payment token with an estimated redemption value of 0.01 BAT, you now have 2 unblinded payment tokens
[25884:13192:0803/183821.911:VERBOSE1:refill_unblinded_tokens.cc(66)] No need to refill unblinded tokens as we already have 48 unblinded tokens which is above the minimum threshold of 20
[25884:13192:0803/184018.534:VERBOSE1:confirmations.cc(250)] Successfully redeemed unblinded token with confirmation id 19fc4ec9-fd8c-4d0e-819c-a3a1cf74afc4, creative instance id e3af9ae9-b0a9-406d-b98f-ed506734aba7 and click
[25884:13192:0803/184018.535:VERBOSE1:confirmations.cc(273)] Added 1 unblinded payment token with an estimated redemption value of 0 BAT, you now have 3 unblinded payment tokens
[25884:13192:0803/184018.535:VERBOSE1:refill_unblinded_tokens.cc(66)] No need to refill unblinded tokens as we already have 47 unblinded tokens which is above the minimum threshold of 20

Ensured that website classification is working after upgrading as per the following:

  • [25884:13192:0803/184146.261:VERBOSE1:text_classification_processor.cc(62)] Classified text with the top segment as technology & computing-software - https://www.brave.com
  • [25884:13192:0803/184319.870:VERBOSE1:text_classification_processor.cc(62)] Classified text with the top segment as technology & computing-technology & computing - https://videocardz.com
  • [25884:13192:0803/184543.369:VERBOSE1:text_classification_processor.cc(62)] Classified text with the top segment as gaming-gaming - https://www.metacritic.com

Ensured that ad notifications are working as per the following:

[25884:13192:0803/184419.694:VERBOSE1:ad_notification_serving.cc(222)] Serving ad notification:
  uuid: 173d9559-c732-4fbd-96d1-4b1bc611ec98
  creativeInstanceId: 293642dd-9dae-4042-8232-f2db71e318fc
  creativeSetId: e3fa4776-d529-4ae9-9c6e-7741232ee1df
  campaignId: 399a5816-33b9-4167-b7c6-d8783ed9ddd8
  advertiserId: b6d581f3-cf2c-4422-a43c-75d4a675fe58
  segment: personal finance
  title: Bitbuy - Get Crypto In Canada
  body: Get a $20 free credit when you make your first deposit.
  targetUrl: https://bitbuy.ca/en/sign-up/?c=Brave

Moved the date ~3 days ahead and ensured that Brave successfully redeemed the unblinded payment tokens as per the following:

[20744:20048:0806/185033.946:VERBOSE1:account.cc(195)] Successfully redeemed unblinded payment tokens

Also ensured that:

  • ensured that Ads received this month is correctly being updated under brave://rewards
  • ensured that Current earnings this month (estimated) is correctly being updated under brave://rewards
  • ensured that 30-day ads history is correctly being updated under brave://rewards

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.

Brave ads database failing to migrate from schema 10 (v1.22.35)
4 participants