Closed Bug 1138322 Opened 11 years ago Closed 11 years ago

TelemetryEnvironment.jsm should not use |ProfileTimesAccessor|

Categories

(Firefox Health Report Graveyard :: Client: Desktop, defect)

defect
Not set
normal

Tracking

(firefox39 fixed)

RESOLVED FIXED
Firefox 39
Tracking Status
firefox39 --- fixed

People

(Reporter: Dexter, Assigned: mkmelin)

References

Details

Attachments

(1 file, 2 obsolete files)

test_TelemetryEnvironment.js fails for Thunderbird builds (see bug 1137412) because |ProfileTimesAccessor| [1] is not available. TelemetryEnvironment.jsm should not use that object or, better, ProfileTimesAccessor should be available when FHR is not built in: ProfileTimesAccessor falls back to profile age manual calculation if no "times.json" file is available. [1] https://hg.mozilla.org/mozilla-central/annotate/eea6188b9b05/services/healthreport/profile.jsm
Blocks: 1120356
Try is closed atm, works locally though.
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Attachment #8572180 - Flags: review?(gfritzsche)
|ProfileTimesAccessor| also computes the creation date of the profile if no "times.json" is available. It traverses the profile directory and looks for the oldest file available there [1]. I don't know how frequently that happens, but I think that behaviour should be preserved. Maybe it's better getting |ProfileTimesAccessor| out of FHR or creating a similar object in Telemetry? Also, as Georg will not be available before March 15th: maybe :vladan is the best person to review this. [1] - https://hg.mozilla.org/mozilla-central/annotate/44bcd21e59fe/services/healthreport/profile.jsm#l118
Flags: needinfo?(mkmelin+mozilla)
Yeah, might be better to just make it an independent component. https://treeherder.mozilla.org/#/jobs?repo=try&revision=b2d62a276830
Attachment #8572180 - Attachment is obsolete: true
Attachment #8572180 - Flags: review?(gfritzsche)
Flags: needinfo?(mkmelin+mozilla)
Attachment #8573460 - Flags: review?(vdjeric)
Attachment #8573460 - Flags: feedback?(alessio.placitelli)
Comment on attachment 8573460 [details] [diff] [review] bug1138322_move_ProfileTimesAccessor.patch Review of attachment 8573460 [details] [diff] [review]: ----------------------------------------------------------------- ::: services/healthreport/profile.jsm @@ +22,5 @@ > > Cu.import("resource://gre/modules/Promise.jsm"); > Cu.import("resource://gre/modules/osfile.jsm") > Cu.import("resource://gre/modules/Task.jsm"); > Cu.import("resource://gre/modules/Log.jsm"); doesn't FHR need to import ProfileTimesAccessor.jsm now as well? ::: toolkit/modules/ProfileTimesAccessor.jsm @@ +18,5 @@ > + * Profile access to times.json (eg, creation/reset time). > + * This is separate from the provider to simplify testing and enable extraction > + * to a shared location in the future. > + */ > +this.ProfileTimesAccessor = function(profile, log) { if we're gonna make this into a JSM, let's give it a more descriptive name.. how about ProfileAge?
Attachment #8573460 - Flags: review?(vdjeric)
Btw I think the profile age info should be cached, either in TelemetryEnvironment or ProfileAge.jsm (preferably the latter). That's work for another bug though
Attachment #8573460 - Flags: feedback?(alessio.placitelli)
(In reply to Magnus Melin from comment #3) > Created attachment 8573460 [details] [diff] [review] > bug1138322_move_ProfileTimesAccessor.patch > > Yeah, might be better to just make it an independent component. > > https://treeherder.mozilla.org/#/jobs?repo=try&revision=b2d62a276830 Nice work! There are some tests failing because FHR is not importing ProfileTimesAccessor.jsm as :vladan mentioned.
Make it ProfileAge.jsm and add the inclusion I missed earlier. https://treeherder.mozilla.org/#/jobs?repo=try&revision=0e080747bc72
Attachment #8573460 - Attachment is obsolete: true
Attachment #8574308 - Flags: review?(vdjeric)
Attachment #8574308 - Flags: review?(vdjeric) → review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 39
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: