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

Non-referral downloads should use generic refcode #1982

Merged
merged 2 commits into from
Apr 2, 2019

Conversation

emerick
Copy link
Contributor

@emerick emerick commented Mar 16, 2019

Fixes brave/brave-browser#2547

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests) on
    • Windows
    • macOS
    • Linux
  • Verified that all lint errors/warnings are resolved (npm run lint)
  • Ran git rebase master (if needed).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

  • Download a non-referral stub installer (i.e., no referral code embedded in its filename)

  • Delete existing profile

  • Run the installer

  • After the installer completes, launch Brave and wait ~10 seconds

  • Confirm that Local State file (e.g., /c/Users/emerick/AppData/Local/BraveSoftware/Brave-Browser-Development/User Data/Local State) contains "promo_code":"BRV001" entry

  • Confirm with server team that daily ping for this run looked similar to this (in particular, ref is BRV001):

    https://laptop-updates.brave.com/1/usage/brave-core?platform=winx64-bc&channel=release&version=0.64.4&daily=true&weekly=true&monthly=true&first=true&w oi=2019-03-11&ref=BRV001

  • Should also confirm that regular referral downloads continue to work as normal

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

@emerick emerick self-assigned this Mar 16, 2019
@emerick
Copy link
Contributor Author

emerick commented Mar 16, 2019

@bbondy Two things to note here:

  1. The default referral code will revert to none 90 days after first run, just like normal referral codes.
  2. Since the referral code check is only performed on first run after install, pre-existing non-referral installations will continue to send none.

My reading of brave/brave-browser#2547 is that this is the expected/intended behavior, but if not please let me know!

@emerick emerick requested a review from bbondy March 16, 2019 11:45
@bbondy
Copy link
Member

bbondy commented Mar 16, 2019

Yes reset after 90 days is expect. Thanks so much!

bbondy
bbondy previously approved these changes Mar 19, 2019
Copy link
Member

@bbondy bbondy left a comment

Choose a reason for hiding this comment

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

Approving but wait for security sign off.

@diracdeltas
Copy link
Member

if i'm not mistaken, this should be blocked on brave/vault-updater#90 and also https://github.com/brave/internal/issues/542#issuecomment-473574540, the latter of which i am working on

@fmarier fmarier removed their request for review March 20, 2019 22:04
@fmarier
Copy link
Member

fmarier commented Mar 20, 2019

@diracdeltas said she will take care of reviewing this.

@diracdeltas
Copy link
Member

looks good to go as soon as brave/vault-updater#90 is closed

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

Successfully merging this pull request may close these issues.

Non-referral downloads should use generic refcode
4 participants