[Thunderbird Telemetry] collect number of calendars + types
Categories
(Calendar :: General, task)
Tracking
(thunderbird78 fixed)
Tracking | Status | |
---|---|---|
thunderbird78 | --- | fixed |
People
(Reporter: mkmelin, Assigned: rnons)
References
Details
Attachments
(1 file, 2 obsolete files)
5.91 KB,
patch
|
darktrojan
:
review+
darktrojan
:
approval-calendar-beta+
|
Details | Diff | Splinter Review |
It would be useful for product design to understand how many calendars people typically have set up, and what type those calendars are. Readonly status would also be of interest.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Report calendar count and read only calendar count in loadCalendarManager
.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
Reporter | ||
Comment 4•5 years ago
|
||
(In reply to Paul Morris [:pmorris] from comment #3)
So this telemetry code runs even if the user has opted out of telemetry?
The calls just add the collection. Enabled/disabled is just handled later on. If disabled the data will just be ignored.
We usually use Mozilla Public License, so I'd want to confirm that Public
Domain is acceptable. I guess that's a question for Magnus.
Some tests are public domain. But I guess we could use MPL.
Just a nit: we would typically phrase this like "Count of calendars is
correct." so better to go with that for consistency, here and below.
The problem with this is, then when you get an assertion it says "Count of calendars is correct." - but it's wrong!
Comment 5•5 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #4)
The calls just add the collection. Enabled/disabled is just handled later on. If disabled the data will just be ignored.
I thought that was likely the case. (It would be nicer if the code wouldn't run at all when the data wasn't going to be reported, but oh well...)
Some tests are public domain. But I guess we could use MPL.
Okay, just wanted to check what our stance was on that. I don't have a strong opinion either way.
The problem with this is, then when you get an assertion it says "Count of calendars is correct." - but it's wrong!
Good point! We should probably use "must be correct" and similar phrasing, as that would be clearer when you get a failure.
Assignee | ||
Comment 6•5 years ago
|
||
Updated scalar key names as suggested.
About the license, I just copied it from other test files. After your comment, I did some search and found https://bugzilla.mozilla.org/show_bug.cgi?id=1073556 and https://www.mozilla.org/en-US/MPL/license-policy/. Seems it's recommend to use public domain for test files.
Trivial bits of Mozilla Code, such as testcases or snippets of code used in documentation, should be put in the public domain in order to facilitate re-use.
Comment 7•5 years ago
•
|
||
Assignee | ||
Comment 8•5 years ago
|
||
Thanks. The failing test is from bug 1615981, I'm still investigating.
Comment 9•5 years ago
|
||
Okay, since the test failure is related to another bug, then this should be ready to land. Usually we put a link to a successful try run here in the bug.
Assignee | ||
Comment 10•5 years ago
|
||
This is a try run https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=3f0bb17850de33fa8c18062f73ee179617cec6a2. Not quite sure, but seems the oranges are not related to this patch.
Assignee | ||
Comment 11•5 years ago
|
||
I found the failing tests in the Try run are all from comm/calendar/test/browser/
, so maybe related to this patch. Then I tried on my local, but even without applying this patch, ./mach test comm/calendar/test/browser/browser_calendarList.js
failed with time out.
...
0:12.58 INFO New window opened: chrome://calendar/content/calendar-properties-dialog.xhtml
0:12.58 PASS undefined assertion name -
0:12.58 PASS undefined assertion name -
0:12.90 PASS undefined assertion name -
0:12.90 PASS undefined assertion name -
0:12.90 PASS undefined assertion name -
0:12.90 PASS undefined assertion name -
0:56.40 INFO Failed to retrieve MOZ_UPLOAD_DIR env var
0:56.39 FAIL Test timed out -
0:56.42 PASS calendar tab is not open -
0:56.51 PASS tasks tab is not open -
...
0:56.54 TEST_END: Test OK. Subtests passed 90/91. Unexpected 1
Will investigate tomorrow.
Comment 12•5 years ago
|
||
(In reply to Ping Chen (:rnons) from comment #10)
This is a try run https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=3f0bb17850de33fa8c18062f73ee179617cec6a2. Not quite sure, but seems the oranges are not related to this patch.
I just took a look, and those oranges do appear to be unrelated to this patch. So I'd say this is ready to check in.
Assignee | ||
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/6602b6ca210f
Collect number of calendars with types and readonly status. r=mkmelin,pmorris
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
Sorry, but I've backed this out. It was causing the failures you saw on your Try run. (Do Try runs on two or more platforms so you can be more certain whether failures are your fault or just noise.)
Also I'm not happy with the patch itself. This telemetry should be in the back-end CalCalendarManager.jsm (and probably take into account the addition/removal of calendars once the program's running – not sure how that sort of thing is meant to be handled in telemetry) instead of in the front-end code. As it is the code runs for every Thunderbird main window that opens (probably not desired) and before your test runs, which is why you're having to call loadCalendarManager
in the test.
Assignee | ||
Comment 17•5 years ago
|
||
Thanks, I will take care.
probably take into account the addition/removal of calendars once the program's running
Maybe I'm wrong, but I think telemetry reports don't need to reflect the real-time status, they give us general idea of how users are using TB. Perhaps it's good enough that the reports are updated when TB is restarted next time. I can change it if you think that's better.
which is why you're having to call
loadCalendarManager
in the test.
I didn't find a way to inject mock data (calendars) before the mochitest browser starts. I was calling loadCalendarManager
to run the telemetry probe. I will split it out to a reportCalendars
function and call it directly in the test.
Reporter | ||
Comment 18•5 years ago
|
||
Correct, Telemetry is not real-time status. It just accumulates and usually sent off like once a day, so I don't think we need to worry about added/removed calendars, which will be rare. Chances are that intermittent state would never make it to the server anyway.
Assignee | ||
Comment 19•5 years ago
|
||
- Split out
reportCalendars
function to be called directly in test
Assignee | ||
Updated•5 years ago
|
Comment 20•5 years ago
|
||
Yeah, you're right, I was thinking about what the test was trying to do at the time.
Comment 21•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 22•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/5537fe1e0145
Collect number of calendars with types and readonly status. r=mkmelin,pmorris,darktrojan DONTBUILD
Reporter | ||
Comment 23•5 years ago
|
||
Updated•5 years ago
|
Comment 24•5 years ago
|
||
bugherder uplift |
Thunderbird 78.0b2:
https://hg.mozilla.org/releases/comm-beta/rev/3d89c61c6302
Updated•5 years ago
|
Comment 25•5 years ago
|
||
Correction to the previous uplift which Hg somehow messed up:
https://hg.mozilla.org/releases/comm-beta/rev/d2d84ac207536f6f672b861964909d1c70d46da0
Reporter | ||
Updated•5 years ago
|
Description
•