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

Send dtoi param with usage ping #10061

Closed
kkuehlz opened this issue Jun 2, 2020 · 5 comments · Fixed by brave/brave-core#5720
Closed

Send dtoi param with usage ping #10061

kkuehlz opened this issue Jun 2, 2020 · 5 comments · Fixed by brave/brave-core#5720

Comments

@kkuehlz
Copy link
Contributor

kkuehlz commented Jun 2, 2020

Description

https://docs.google.com/document/d/1iSYi_i52dP6YGdrUhP7J7DMBzxyPf9x6nFpg422LfLo/edit?usp=sharing

Each browser will need to store the YYYY-MM-DD encoded local date of installation. For the 14 days after installation, the usage ping should include a ‘dtoi’ entry containing the date of installation. After the 14 day period is over the ‘dtoi’ should be sent as null.

Example: The browser is installed on May 1st, 2020

For the dates including May 1st to May 14th, the usage ping should include the attribute 'dtoi': '2020-05-01'. For all days after the 14th of May the usage ping should send 'dtoi': null. Nothing else in the existing usage request body should change.

Test Plan:

  1. Open network sniffing tool (Charles, Wireshark)
  2. Ensure that the browser sends a request to https://laptop-updates.brave.com/1/usage/brave_core with query parameter set to the current date
  3. Move system clock forward 14 days and see that this parameter is sent up as null.
@LaurenWags
Copy link
Member

Marking as QA/Blocked - need a new build to test, 1.11.92 or newer.

@LaurenWags
Copy link
Member

Removing QA/Blocked, https://github.com/brave/brave-browser/releases/tag/v1.11.92 is available

@LaurenWags
Copy link
Member

Re-adding QA/Blocked until #10610 is addressed.

@LaurenWags
Copy link
Member

LaurenWags commented Jul 17, 2020

Verified passed with

Brave | 1.12.92 Chromium: 84.0.4147.89 (Official Build) dev (64-bit)
-- | --
Revision | 19abfe7bcba9318a0b2a6bc6634a67fc834aa592-refs/branch-heads/4147@{#852}
OS | macOS Version 10.14.6 (Build 18G3020)
  • Verified test plan from description

Ping on initial install:
First Day

Moved computer date 15 days ahead:
15th Day


Verification passed on


Brave | 1.12.99 Chromium: 84.0.4147.89 (Official Build) dev (64-bit)
-- | --
Revision | 19abfe7bcba9318a0b2a6bc6634a67fc834aa592-refs/branch-heads/4147@{#852}
OS | Windows 10 OS Version 1903 (Build 18362.959)


Ping on initial install:
image

Moved computer date 15 days ahead:
image


Verification passed on

Brave 1.12.99 Chromium: 84.0.4147.89 (Official Build) dev (64-bit)
Revision 19abfe7bcba9318a0b2a6bc6634a67fc834aa592-refs/branch-heads/4147@{#852}
OS Ubuntu 18.04 LTS

Ping on initial install:
image

Moved computer date 15 days ahead:
image

@srirambv
Copy link
Contributor

Verification passed on OnePlus 6T with Android 10 running 1.12.112 x64 build

  • Verified dtoi param is set on install
{ “_id” : ObjectId(“5f33ef6be8dd460023eb6adb”), “daily” : true, “weekly” : true, “monthly” : true, “platform” : “android-bc”, “version” : “1.12.112, “first” : true, “channel” : “release”, “woi” : “2020-08-10", “ref” : “SRI318", “country_code” : “IN”, “dtoi” : “2020-08-12", “braveDataCenter” : false, “braveAPIKeyStatus” : “matched”, “ts” : 1597239147472, “year_month_day” : “2020-08-12" }
  • Verified moving device date ahead by 15 days dtoi is removed
{ “_id” : ObjectId(“5f33efc7e8dd460023eb6dce”), “daily” : true, “weekly” : true, “monthly” : false, “platform” : “android-bc”, “version” : “1.12.112, “first” : false, “channel” : “release”, “woi” : “2020-08-10", “ref” : “SRI318", “country_code” : “IN”, “braveDataCenter” : false, “braveAPIKeyStatus” : “matched”, “ts” : 1597239239922, “year_month_day” : “2020-08-12" }

Thanks to @aekeus for helping it verify with backend system

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

Successfully merging a pull request may close this issue.

8 participants