Closed
Bug 1466857
Opened 6 years ago
Closed 6 years ago
UpdatePing.handleUpdateSuccess() does not respect toolkit.telemetry.updatePing.enabled
Categories
(Toolkit :: Telemetry, enhancement, P1)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: mcs, Assigned: janerik)
Details
(Whiteboard: [tor][tor 25909])
Attachments
(2 files)
After a successful application update, code inside browser/components/nsBrowserContentHandler.js directly calls UpdatePing.handleUpdateSuccess(). The handleUpdateSuccess() function should consult the toolkit.telemetry.updatePing.enabled preference but it does not.
When telemetry is disabled (as it is by default in Tor Browser), this leads to errors inside the telemetry code because it has not been initialized. If telemetry is enabled but toolkit.telemetry.updatePing.enabled = false, presumably a ping is sent that should not be.
For the corresponding Tor Browser bug report, see https://trac.torproject.org/projects/tor/ticket/25909
Reporter | ||
Comment 1•6 years ago
|
||
I attached the patch we are using in Tor Browser (mozilla-esr60 branch).
Updated•6 years ago
|
Component: Application Update → Telemetry
Comment 2•6 years ago
|
||
Comment on attachment 8983420 [details] [diff] [review]
UpdatePing.patch
Review of attachment 8983420 [details] [diff] [review]:
-----------------------------------------------------------------
This looks like exactly what we need. Thank you!
Attachment #8983420 -
Flags: review+
Updated•6 years ago
|
Comment 3•6 years ago
|
||
Annnd janerik points out it's just a patch, not a commit, so it'll need a commit message.
Assignee: chutten → jrediger
Keywords: checkin-needed
Comment 4•6 years ago
|
||
Comment 5•6 years ago
|
||
Comment on attachment 8984500 [details]
Bug 1466857 - Avoid sending an update ping if Telemetry is disabled. r?chutten
Chris H-C :chutten has approved the revision.
https://phabricator.services.mozilla.com/D1596
Attachment #8984500 -
Flags: review+
Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a5e6f8d6747c
Avoid sending an update ping if Telemetry is disabled. r=chutten
Comment 7•6 years ago
|
||
Backed out for browser-chrome failures on /browser_UpdatePingSuccess.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/6e8579d91075af8245af42f26beb7de23997e934
Push link: https://hg.mozilla.org/integration/autoland/rev/a5e6f8d6747cd421303eed6e7942d19b715fb125
Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=182558158&repo=autoland&lineNumber=4812
Flags: needinfo?(jrediger)
Assignee | ||
Comment 8•6 years ago
|
||
"toolkit.telemetry.enabled", which `isTelemetryEnabled` is querying, is a locked preference in the test (rowser_UpdatePingSuccess.js), so I can't set it to enabled to make the code work.
In addition the documentation [1] lists it as kinda deprecated, so I'm not even sure this would be the right preference to check.
Is there another of the preference we should use instead (e.g. `datareporting.healthreport.uploadEnabled`) or is `toolkit.telemetry.updatePing.enabled` all we actually want?
Flags: needinfo?(jrediger) → needinfo?(chutten)
Updated•6 years ago
|
Attachment #8983420 -
Flags: review+
Comment 9•6 years ago
|
||
Wait, isTelemetryEnabled is asking toolkit.telemetry.enabled? Eurgh. That's more or less fine, but we need to be careful about who uses this and what for, since it will be true in instances when you shouldn't send data and false in instances where we send limited data. (it isn't descriptively named)
Hrm, what do we want to actually query... It could be canRecordBase/canRecordPrereleaseData, it could be the pref datareporting.healthreport.uploadEnabled...
Actually, the bug is around the update ping being called when it isn't enabled (or possibly even init'd). We should ensure it is init and enabled before doing anything on this (or any other) API function.
Flags: needinfo?(chutten)
Assignee | ||
Comment 10•6 years ago
|
||
Usage of `isTelemetryEnabled` is nearly non-existent[1] (only Telemetry core-internal).
I'll check again what we need to check to make sure Telemetry is actually initialized.
Assignee | ||
Comment 11•6 years ago
|
||
[1]: https://searchfox.org/mozilla-central/search?q=isTelemetryEnabled&path=
(of course I forget the link...)
Assignee | ||
Comment 12•6 years ago
|
||
I am confused by phabricator and have no idea how to flag you for review again. I changed the code to only check the enabled flag. Please review again.
Flags: needinfo?(chutten)
Comment 14•6 years ago
|
||
Pushed by jrediger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0d0e171c6919
Avoid sending an update ping if Telemetry is disabled. r=chutten
Comment 15•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•