Closed Bug 1152255 Opened 9 years ago Closed 9 years ago

Telemetry.asyncFetchTelemetryData is called twice (TelemetrySession and TelemetryPing)

Categories

(Toolkit :: Telemetry, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox40 --- affected
firefox45 --- fixed

People

(Reporter: Dexter, Assigned: sanchit.nevgi, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [measurement:client][lang=js][good first bug])

Attachments

(1 file)

|Telemetry.asyncFetchTelemetryData| is being called in two different locations:

- https://hg.mozilla.org/mozilla-central/annotate/078128c2600a/toolkit/components/telemetry/TelemetrySession.jsm#l1572
- https://hg.mozilla.org/mozilla-central/annotate/078128c2600a/toolkit/components/telemetry/TelemetryPing.jsm#l812

We should be calling that initialisation function only from one location, removing the other call.
Blocks: 1122482
Note that due to the implementation the double call is not a problem right now.

The things collected are session related measurements, so we should probably keep the call in TelemetrySession.jsm only.
Blocks: 1201022
No longer blocks: 1122482
ni?dexter for setting it up as a mentored bug.
Flags: needinfo?(alessio.placitelli)
Flags: needinfo?(alessio.placitelli)
Priority: -- → P4
Whiteboard: [measurement:client]
Flags: needinfo?(alessio.placitelli)
We should remove the |Telemetry.asyncFetchTelemetryData| call in TelemetryController.jsm [0] and check that everything works as expected by running xpcshell tests for Telemetry as follows:

./mach xpcshell-test toolkit/components/telemetry

[0] - https://dxr.mozilla.org/mozilla-central/rev/f029ccdee154bdc2b49a1e0fcd5b0fa0397aa97b/toolkit/components/telemetry/TelemetryController.jsm#767
Mentor: alessio.placitelli
Flags: needinfo?(alessio.placitelli)
Whiteboard: [measurement:client] → [measurement:client][lang=js][good first bug]
Sanchit, would you be interested in working on this?
Flags: needinfo?(sanchit.nevgi)

(In reply to Georg Fritzsche [:gfritzsche] from comment #4)
> Sanchit, would you be interested in working on this?

Hi Georg! Sorry for the late response(My exams are going on). I would love to work on this bug. Thanks for the suggestion :)
Flags: needinfo?(sanchit.nevgi)
Great, assigning it to you :)
If you run into any problems, Alessio (Dexter on IRC) and i are happy to help.
Assignee: nobody → sanchit.nevgi
Status: NEW → ASSIGNED
Hi! I removed the call in TelemetryController.jsm and ran the xpcshell tests. They have all passed. Do I need to make any more changes? Thanks :)
Comment on attachment 8684553 [details] [diff] [review]
Removed Telemetry.asyncFetchTelemetryData call in TelemetryController.jsm

Review of attachment 8684553 [details] [diff] [review]:
-----------------------------------------------------------------

Sanchit, this looks good, thanks!
Attachment #8684553 - Flags: review?(alessio.placitelli) → review+
I've pushed this to the Try servers for you: https://treeherder.mozilla.org/#/jobs?repo=try&revision=70d0eca2c737

We'll land this as soon as the tests are done!
The tests look good, the failures seem to be unrelated. Marking this for check-in!
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/e402ff476e1b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: