Closed Bug 1221505 Opened 9 years ago Closed 9 years ago

Remove osfile.jsm dependency from TelemetrySession.jsm

Categories

(Toolkit :: Telemetry, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: Dexter, Assigned: bmanojkumar24, Mentored)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file, 2 obsolete files)

With bug 1190801 landing, TelemetrySession.jsm doesn't need to depend on osfile.jsm anymore.

In order to remove the dependency, we should:

1) Remove the FILE_PATH constant from _saveAbortedSessionPing in [0]
2) Drop FILE_PATH from the comment in [1]
3) Remove the osfile.jsm import in [2]

To test that everything works correctly after the changes, run the xpcshell tests with the following command:

./mach xpcshell-test toolkit/components/telemetry

[0] - https://dxr.mozilla.org/mozilla-central/rev/f742b9412ed5aace90ad863b276faae0641090a8/toolkit/components/telemetry/TelemetrySession.jsm#1975
[1] - https://dxr.mozilla.org/mozilla-central/rev/f742b9412ed5aace90ad863b276faae0641090a8/toolkit/components/telemetry/TelemetrySession.jsm#1977
[2] - https://dxr.mozilla.org/mozilla-central/rev/f742b9412ed5aace90ad863b276faae0641090a8/toolkit/components/telemetry/TelemetrySession.jsm#15
Blocks: 1201022
Priority: -- → P3
Whiteboard: [measurement:client][lang=js][good first bug]
Hi, I like to work on this bug,  can you please assign the bug to me. Thanks :)
Hi! I've assigned the bug to you. Please let me know if you have any doubts or questions about how to proceed!
Assignee: nobody → bmanojkumar24
Status: NEW → ASSIGNED
Attached patch 1221505.diff (obsolete) — Splinter Review
Hi,  I have attached the diff file of the changes that are specified.As you told i ran |./mach xpcshell-test toolkit/components/telemetry| to check if everything is looking good. But 6/234 tests failed. Can you point me in right direction on solving this.
Thank you! You should submit a patch file rather than a diff. You can generate it by following this guide: https://developer.mozilla.org/en-US/docs/Mercurial/Using_Mercurial#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F

That said, your changes look ok, but bug 1190801 took a bit longer and has not been merged yet (this will probably be done today).

So, if you create a patch using that guide, than pop it off ("hg qpop -a"), update the repository tomorrow/later today ("hg pull -u"), push the patch back ("hg qpush -a") and then build again, all the tests will probably pass.

If you have any problem, please post again here or get in touch over IRC in #introduction!
Hi there! Do you have any problem with the bug and need help?
Flags: needinfo?(bmanojkumar24)
Attached patch bug1221505.patch (obsolete) — Splinter Review
Hi,I have made the appropriate changes, and ran the tests.Everything seems ok. can you please review my patch. :)
Flags: needinfo?(bmanojkumar24)
Attachment #8688405 - Flags: review?(alessio.placitelli)
Attachment #8685568 - Attachment is obsolete: true
Comment on attachment 8688405 [details] [diff] [review]
bug1221505.patch

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

This looks good with the suggestion below addressed!

::: toolkit/components/telemetry/TelemetrySession.jsm
@@ +1838,5 @@
>     *                 session ping. The reason of this payload is changed to aborted-session.
>     *                 If not provided, a new payload is gathered.
>     */
>    _saveAbortedSessionPing: function(aProvidedPayload = null) {
> +    this._log.trace("_saveAbortedSessionPing - ping path: ");

Since you removed FILE_PATH, you should also remove the "- ping path: " part from the log line, as the path is no longer there ;)
Attachment #8688405 - Flags: review?(alessio.placitelli) → feedback+
Attached patch bug1221505.patchSplinter Review
Hi, I have made the changes as you suggested. :)  I think this looks good now
Attachment #8688405 - Attachment is obsolete: true
Attachment #8688407 - Flags: review?(alessio.placitelli)
Comment on attachment 8688407 [details] [diff] [review]
bug1221505.patch

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

This looks good now, thanks. Did you make sure there are no more errors locally when running the tests?
Attachment #8688407 - Flags: review?(alessio.placitelli) → review+
Yes, I ran the tests locally, and the tests ran fine, with no errors.
https://hg.mozilla.org/integration/fx-team/rev/929982f95a788e798b848da372725dd80cc44b36
Bug 1221505 - Remove osfile.jsm dependency from TelemetrySession.jsm. r=dexter
https://hg.mozilla.org/mozilla-central/rev/929982f95a78
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: