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

referrals: stats: Always RETRY_ON_NETWORK_CHANGE #8396

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

kkuehlz
Copy link
Contributor

@kkuehlz kkuehlz commented Mar 31, 2021

Resolves brave/brave-browser#15034

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:

Go through the entire referral pipeline with @keur. Ensure stats usage pings work as expected.

@kkuehlz kkuehlz requested a review from simonhong as a code owner March 31, 2021 00:19
@kkuehlz kkuehlz self-assigned this Mar 31, 2021
@kkuehlz kkuehlz force-pushed the referrals_retry_net_change branch from b776573 to 2fd5f2e Compare March 31, 2021 02:23
@kkuehlz kkuehlz changed the title referrals: Always RETRY_ON_NETWORK_CHANGE referrals: stats: Always RETRY_ON_NETWORK_CHANGE Mar 31, 2021
@kkuehlz kkuehlz requested a review from emerick March 31, 2021 02:28
@kjozwiak
Copy link
Member

kjozwiak commented Mar 31, 2021

Verification PASSED on Win 10 x64 using the following build:

Brave | 1.24.38 Chromium: 90.0.4430.41 (Official Build) nightly (64-bit)
-- | --
Revision | e9c92b1eaca8487e212f3f6bc081fdb6d4863759-refs/branch-heads/4430@{#723}
OS | Windows 10 OS Version 2009 (Build 19042.868)
  • ensured that download_id appears under brave://local-state
  • ensured that the headers are appearing under brave://local-state
  • ensured that stats are appearing under brave://local-state
  • ensure that "promo_code": "WWK708" is correctly being used
  • @keur confirmed that the referral finalized via server side after moving date ~40 days ahead
Logs/Data from brave://local-state
```      "referral": {
         "download_id": "6d6083b1-07d8-430f-8459-144ff29568b8",
         "headers": [ {
            "cookieNames": [  ],
            "domains": [ "eaff.com", "stg.eaff.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "eaff"
            }
         }, {
            "cookieNames": [  ],
            "domains": [ "sandbox.uphold.com", "api-sandbox.uphold.com", "uphold.com", "api.uphold.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "uphold"
            }
         } ],
         "initialization": true,
         "promo_code": "WWK708"
      },
      "stats": {
         "first_check_made": true,
         "last_check_month": 3,
         "last_check_woy": 13,
         "last_check_ymd": "2021-03-31",
         "threshold_query": "https://laptop-updates.brave.com/1/usage/brave-core-threshold?platform=winx64-bc&channel=nightly&version=1.24.38&daily=true&weekly=true&monthly=true&first=true&woi=2021-03-29&dtoi=2021-03-31&ref=WWK708&adsEnabled=false&arch=",
         "week_of_installation": "2021-03-29"```

Verification PASSED on Samsung S10+ running Android 11 using the following build:

1.24.38 Chromium: 90.0.4430.41
  • ensured that download_id appears under brave://local-state
  • ensured that the headers are appearing under brave://local-state
  • ensured that stats are appearing under brave://local-state
  • ensure that "promo_code": "WWK708" is correctly being used
  • @keur confirmed that the referral finalized via server side after moving date ~40 days ahead
Logs/Data from brave://local-state
"referral": {
         "download_id": "5159a3cb-5ddb-4c09-8e8e-0ae07ccf0c14",
         "headers": [ {
            "cookieNames": [  ],
            "domains": [ "eaff.com", "stg.eaff.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "eaff"
            }
         }, {
            "cookieNames": [  ],
            "domains": [ "sandbox.uphold.com", "api-sandbox.uphold.com", "uphold.com", "api.uphold.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "uphold"
            }
         } ],
         "initialization": true,
         "promo_code": "WWK708",
         "referral_attempt_count": 1,
         "referral_attempt_timestamp": "13266434793315790"
      },
      "referral_android_first_run_timestamp": "13261682597806899",
      "stats": {
         "first_check_made": true,
         "last_check_month": 3,
         "last_check_woy": 13,
         "last_check_ymd": "2021-03-31",
         "threshold_query": "https://laptop-updates.brave.com/1/usage/brave-core-threshold?platform=android-bc&channel=canary&version=1.24.38&daily=true&weekly=true&monthly=true&first=true&woi=2021-03-29&dtoi=2021-03-31&ref=WWK708&adsEnabled=false&arch=",
         "week_of_installation": "2021-03-29"
      }

Verification passed on Brave v1.24.38 on Samsung Galaxy Tab S5e (Android 10.0)

1.24.38 Chromium: 90.0.4430.41
  • ensured that download_id appears under brave://local-state
  • ensured that the headers are appearing under brave://local-state
  • ensured that stats are appearing under brave://local-state
  • ensure that "promo_code": "WWK708" is correctly being used
  • @keur confirmed that the referral finalized via server side after moving date ~40 days ahead
Logs/Data from brave://local-state
referral": { "download_id": "6e11cc54-d1f1-43d3-8f3e-a5a69b71928d", "headers": [ { "cookieNames": [ ], "domains": [ "eaff.com", "stg.eaff.com" ], "expiration": 31536000000.0, "headers": { "X-Brave-Partner": "eaff" } }, { "cookieNames": [ ], "domains": [ "sandbox.uphold.com", "api-sandbox.uphold.com", "uphold.com", "api.uphold.com" ], "expiration": 31536000000.0, "headers": { "X-Brave-Partner": "uphold" } } ], "initialization": true, "promo_code": "WWK708" },

Verification PASSED on macOS 10.15.7 x64 using the following build:

Brave | 1.24.38 Chromium: 90.0.4430.41 (Official Build) nightly (x86_64)
-- | --
Revision | e9c92b1eaca8487e212f3f6bc081fdb6d4863759-refs/branch-heads/4430@{#723}
OS | macOS Version 10.15.7 (Build 19H524)
  • ensured that download_id appears under brave://local-state
  • ensured that the headers are appearing under brave://local-state
  • ensured that stats are appearing under brave://local-state
  • ensure that "promo_code": "WWK708" is correctly being used
  • @keur confirmed that the referral finalized via server side after moving date ~40 days ahead
Logs/Data from brave://local-state
referral": {
         "download_id": "07426b87-db05-4f14-80ac-6b7d15bf32f8",
         "headers": [ {
            "cookieNames": [  ],
            "domains": [ "eaff.com", "stg.eaff.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "eaff"
            }
         }, {
            "cookieNames": [  ],
            "domains": [ "sandbox.uphold.com", "api-sandbox.uphold.com", "uphold.com", "api.uphold.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "uphold"
            }
         } ],
         "initialization": true,
         "promo_code": "WWK708"
      },
      "stats": {
         "first_check_made": true,
         "last_check_month": 3,
         "last_check_woy": 13,
         "last_check_ymd": "2021-03-31",
         "threshold_query": "https://laptop-updates.brave.com/1/usage/brave-core-threshold?platform=osx-bc&channel=nightly&version=1.24.38&daily=true&weekly=true&monthly=true&first=true&woi=2021-03-29&dtoi=2021-03-31&ref=WWK708&adsEnabled=false&arch=",
         "week_of_installation": "2021-03-29"
      },

Verification PASSED on Asus Zenfone (x86) running Android 6 using the following build:

1.24.38 Chromium: 90.0.4430.41
  • ensured that download_id appears under brave://local-state
  • ensured that the headers are appearing under brave://local-state
  • ensured that stats are appearing under brave://local-state
  • ensure that "promo_code": "WWK708" is correctly being used
  • @keur confirmed that the referral finalized via server side after moving date ~40 days ahead
Logs/Data from brave://local-state
"referral": {
         "download_id": "c41ae6b7-12eb-4dbe-9007-b30a8558986c",
         "headers": [ {
            "cookieNames": [  ],
            "domains": [ "eaff.com", "stg.eaff.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "eaff"
            }
         }, {
            "cookieNames": [  ],
            "domains": [ "sandbox.uphold.com", "api-sandbox.uphold.com", "uphold.com", "api.uphold.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "uphold"
            }
         } ],
         "initialization": true,
         "promo_code": "WWK708"
      },
      "referral_android_first_run_timestamp": "13261683151793210",
      "stats": {
         "first_check_made": true,
         "last_check_month": 3,
         "last_check_woy": 13,
         "last_check_ymd": "2021-03-31",
         "threshold_query": "https://laptop-updates.brave.com/1/usage/brave-core-threshold?platform=android-bc&channel=canary&version=1.24.38&daily=true&weekly=true&monthly=true&first=true&woi=2021-03-29&dtoi=2021-03-31&ref=WWK708&adsEnabled=false&arch=",
         "week_of_installation": "2021-03-29"
      }

Verification PASSED using nightly build on macOS Big Sur (11.2.3)

Brave 1.24.38 Chromium: 90.0.4430.41 (Official Build) nightly (x86_64)
Revision e9c92b1eaca8487e212f3f6bc081fdb6d4863759-refs/branch-heads/4430@{#723}
OS macOS Version 11.2.3 (Build 20D91)
  • ensured that download_id appears under brave://local-state
  • ensured that the headers are appearing under brave://local-state
  • ensured that stats are appearing under brave://local-state
  • ensure that "promo_code": "WWK708" is correctly being used
Logs/Data from brave://local-state
"referral": {
         "download_id": "31cf162d-6cff-4c8e-b6d7-a9a854ce1025",
         "headers": [ {
            "cookieNames": [  ],
            "domains": [ "eaff.com", "stg.eaff.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "eaff"
            }
         }, {
            "cookieNames": [  ],
            "domains": [ "sandbox.uphold.com", "api-sandbox.uphold.com", "uphold.com", "api.uphold.com" ],
            "expiration": 31536000000.0,
            "headers": {
               "X-Brave-Partner": "uphold"
            }
         } ],
         "initialization": true,
         "promo_code": "WWK708"
 "stats": {
         "first_check_made": true,
         "last_check_month": 3,
         "last_check_woy": 13,
         "last_check_ymd": "2021-03-31",
         "threshold_check_made": true,
         "week_of_installation": "2021-03-29"
      },

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.

Add RETRY_ON_NETWORK_CHANGE to referrals and stats
4 participants