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

Fixed contribution queue not being deleted (1.2.x) #4303

Merged
merged 1 commit into from
Jan 3, 2020

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Jan 3, 2020

Resolves brave/brave-browser#7579

Submitter Checklist:

Test Plan:

covered with unit tests

plan for QA

  • enable rewards
  • claim grant
  • close browser
  • copy db from corrupted profile (ask @NejcZdovc for it) into current profile
  • start the browser
  • make sure that no contribution is made
  • open db and make sure that contribution_queue and contribution_queue_publishers is empty

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@NejcZdovc NejcZdovc self-assigned this Jan 3, 2020
@NejcZdovc NejcZdovc marked this pull request as ready for review January 3, 2020 11:10
@NejcZdovc NejcZdovc force-pushed the contribution-queue branch 2 times, most recently from 43b16f0 to 2b753c4 Compare January 3, 2020 11:11
@NejcZdovc NejcZdovc requested a review from a team January 3, 2020 11:11
@NejcZdovc NejcZdovc added this to the 1.2.x - Release milestone Jan 3, 2020
@tmancey tmancey self-requested a review January 3, 2020 14:23
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

++

@kjozwiak
Copy link
Member

kjozwiak commented Jan 3, 2020

Verification PASSED on macOS 10.15.2 x64 & Windows 10 x64. Went through the following:

Went through the STR outlined via #4303 (comment) and reproduced the issue using 1.1.23 Chromium: 79.0.3945.88. Once the publisher_info_db was replaced with the one that @NejcZdovc provided, the a-c automatically launched and the grant was drained from the account. Once the a-c went through, Rewards kept trying to contribute as per the following:

[9645:775:0103/142308.479053:WARNING:contribution.cc(683)] You do not have enough funds for auto contribution
[9640:115379:0103/142308.479373:ERROR:database.cc(1584)] publisher_info_db sqlite error 1, errno 0: no such table: main.publisher_info_old, sql: DELETE FROM contribution_queue WHERE contribution_queue_id = ?

Using the 1.2.40 Chromium: 79.0.3945.88 (PR build that includes the fix), that the a-c didn't occur once the build was relaunched and that both contribution_queue and contribution_queue_publishers were empty. Left Brave sitting there for ~10min and didn't see any errors regarding Brave trying to auto-contribute.

  • Reproduced the issue on 1.1.23 CR: 79.0.3945.88 using the steps from description and the DB provided by @NejcZdovc. Confirmed that AC occurred and kept attempting to contribute after wallet was drained (saw messages in logs from above). Upgraded this profile to the PR build for this issue and confirmed that no additional attempts to contribute occurred and logs did not show previous messages. Additionally, confirmed in the db that contribution_queue and contribution_queue_publishers were empty.

Also went through the upgrade cases that @LaurenWags mentioned ☝️ on Windows 10 x64 without any issues.

Verification PASSED with macOS 10.14.6 x64

  • Reproduced the issue on 1.1.23 CR: 79.0.3945.88 using the steps from description and the DB provided by @NejcZdovc. Confirmed that AC occurred and kept attempting to contribute after wallet was drained (saw messages in logs from above). Upgraded this profile to the PR build for this issue and confirmed that no additional attempts to contribute occurred and logs did not show previous messages. Additionally, confirmed in the db that contribution_queue and contribution_queue_publishers were empty.
  • Also, verified on a clean profile using the test plan from Fixed contribution queue not being deleted (1.2.x) #4303 (comment). Confirmed that no auto contribute occurred and contribution_queue and contribution_queue_publishers were empty in the db.

@kjozwiak
Copy link
Member

kjozwiak commented Jan 3, 2020

Uplift into 1.2.x approved after deliberating with @brave/uplift-approvers. Please make sure that all the correct labels are being used and the associated issue is moved into the correct milestone.

@kjozwiak kjozwiak merged commit 8fbba9c into 1.2.x Jan 3, 2020
@kjozwiak kjozwiak deleted the contribution-queue branch January 3, 2020 20:08
@bsclifton
Copy link
Member

@NejcZdovc don't forget to down-drop (opposite of uplift?) this to 1.3 also 😄 And then I'm not sure if a refactor issue was created for Dev/Nightly regarding a solution which would be allowed to make schema changes

@NejcZdovc
Copy link
Contributor Author

@bsclifton 1.3 PR created #4307 and issue for 1.4 brave/brave-browser#7593

@NejcZdovc NejcZdovc changed the title Fixed contribution queue not being deleted Fixed contribution queue not being deleted (1.2.x) Jan 4, 2020
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.

4 participants