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

Retrieve promotions from db when fetched recently #5760

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

emerick
Copy link
Contributor

@emerick emerick commented Jun 6, 2020

Resolves brave/brave-browser#9513

Submitter Checklist:

Test Plan:

  • Clean profile
  • Enable rewards
  • Claim grant
  • Open Rewards panel a few times
  • Consult log and verify that a line such as the following appears once:
[21444:3352:0606/145536.946:VERBOSE1:network_delegate.cc(32)] NetworkDelegate::NotifyBeforeURLRequest: https://grant.rewards.brave.com/v1/promotions?migrate=true&paymentId=538d2a76-7ebc-427d-bc0e-f1d73865f768&platform=windows
  • Wait > 10 minutes
  • Open Rewards panel a few times
  • Verify that the above log is shown a single time again, as it will need to ping the server again since cache is old now

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.

@emerick emerick requested a review from NejcZdovc as a code owner June 6, 2020 19:31
@emerick emerick self-assigned this Jun 6, 2020
@emerick emerick requested a review from zenparsing June 6, 2020 19:33
@emerick emerick force-pushed the rewards-fetch-promotions-from-cache branch from cc7bb55 to 6c74432 Compare June 6, 2020 23:44
@emerick emerick requested a review from NejcZdovc June 6, 2020 23:44
@emerick emerick force-pushed the rewards-fetch-promotions-from-cache branch from 6c74432 to 774a5b1 Compare June 7, 2020 21:37
@emerick emerick force-pushed the rewards-fetch-promotions-from-cache branch from 774a5b1 to 7ee9849 Compare June 8, 2020 12:33
@emerick emerick force-pushed the rewards-fetch-promotions-from-cache branch from 7ee9849 to 8e7b4d4 Compare June 8, 2020 14:46
@emerick emerick requested a review from zenparsing June 8, 2020 14:46
@emerick emerick force-pushed the rewards-fetch-promotions-from-cache branch from 8e7b4d4 to 44ea744 Compare June 8, 2020 17:16
@emerick emerick force-pushed the rewards-fetch-promotions-from-cache branch from 44ea744 to f38c5ed Compare June 8, 2020 17:17
@emerick
Copy link
Contributor Author

emerick commented Jun 8, 2020

Rerunning CI for Android.

@emerick emerick added CI/skip-ios Do not run CI builds for iOS CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 labels Jun 8, 2020
@emerick
Copy link
Contributor Author

emerick commented Jun 8, 2020

Android completed successfully.

@emerick emerick merged commit 666e3ab into master Jun 8, 2020
@emerick emerick deleted the rewards-fetch-promotions-from-cache branch June 8, 2020 23:57
@emerick emerick removed CI/skip-ios Do not run CI builds for iOS CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 labels Jun 8, 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.

Promotions are fetched too often
3 participants