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

Retry initialization requests for referral codes #7742

Closed
corymcdonald opened this issue Jan 15, 2020 · 8 comments · Fixed by brave/brave-core#5200 or brave/brave-core#5238
Closed

Comments

@corymcdonald
Copy link

corymcdonald commented Jan 15, 2020

Test plan

See #7742 (comment)

Description

During friday 1/10 to monday 1/13 the promo server's static IP was not routing correctly. Due to this referrals that were downloaded during that time would never get confirmed.

Expected result:

We should retry initialization requests so that if the promo server is down publishers will still get paid for those referrals.

Reproduces how often:

Anytime the promo server is down.

@emerick feel free to add more details :)

@bsclifton bsclifton added the priority/P2 A bad problem. We might uplift this to the next planned release. label Feb 27, 2020
@bsclifton
Copy link
Member

Marked as P2 since this can cause data loss - we'll definitely want to fix sooner than later. Would be good to harden that logic a bit

@kkuehlz
Copy link
Contributor

kkuehlz commented Apr 10, 2020

xposting the test plan cc @bsclifton

Test Plan

  1. Set "BRAVE_REFERRALS_SERVER" environment variable to point at a vault updater server. If you want to use staging or pre (probably the best idea) talk to @keur or @aubrey.
  2. Set BRAVE_REFERRALS_LOCAL, if testing locally
  3. Set "BRAVE_REFERRALS_API_KEY" corresponding to a valid promo services key (again, talk to @keur or @aubrey for more information).
  4. Set kReportInitializationFrequency to something reasonable for testing (< 1 minute).
  5. Make the testing vault updater either non-routeable or return a non 2xx code
  6. Wait for the browser to retry until it gets a download_id.
  7. Ensure the browser no longer sends out initialization requests.

@bsclifton
Copy link
Member

issue was resolved with brave/brave-core#5200 but reverted with brave/brave-core#5226

Needs re-implementation. Problem was with building on Android

@LaurenWags
Copy link
Member

@bsclifton @rebron is milestone for this issue correct?

@bsclifton
Copy link
Member

@LaurenWags yup, 1.9.x is correct; for some reason merging brave/brave-core#5238 didn't auto-close this issue. You're good to go! 😄

@LaurenWags
Copy link
Member

LaurenWags commented May 14, 2020

Marking as QA/Blocked pending #9783 and #9785

@srirambv
Copy link
Contributor

@LaurenWags Probably mark it as Windows/Mac OS only

@LaurenWags
Copy link
Member

LaurenWags commented May 19, 2020

Verified passed with

Brave | 1.9.66 Chromium: 81.0.4044.138 (Official Build) dev (64-bit)
-- | --
Revision | 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS | macOS Version 10.14.6 (Build 18G3020)
  • Used modified version of test plan from Retry initialization requests for referral codes #7742 (comment) since kReportInitializationFrequency cannot be set using a GH build. We did confirm that if the server is down/you do not get a download_id, that when you restart the browser, the server is pinged again and if the server is up at this time you do get the expected download_id (@keur confirmed my download_id on the server).

  • Confirmed no regressions when using macOS and a standard promoCode tagged .pkg (such as Brave-Browser-Dev-KAM253.pkg)

  • Note, there was an issue on macOS only where the profile folder could be created improperly if the .pkg was named like Brave-Browser-Dev-kam253.pkg, however this was logged with wrong folder created on macOS if refcode is lower case - follow up to 7742 #9785 and testing notes can be found on that issue.


Verification passed on

Brave 1.9.66 Chromium: 81.0.4044.138 (Official Build) dev (64-bit)
Revision 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS Windows 7 Service Pack 1 (Build 7601.24544)
  • Verified that if the server is down, you do not get a download_id, that when you restart the browser, the server is pinged again and if the server is up at this time you do get the expected download_id (@keur confirmed my download_id on the server).

  • Encountered a regression in promo code. Logged Refcode is preceded with equal sign on Windows #9783

Verification passed on


Brave | 1.9.66 Chromium: 81.0.4044.138 (Official Build) dev (64-bit)
-- | --
Revision | 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS | Windows 10 OS Version 1803 (Build 17134.1006)

  • Verified that if the server is down, you do not get a download_id, that when you restart the browser, the server is pinged again and if the server is up at this time you do get the expected download_id (@keur confirmed my download_id on the server).

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