Closed
Bug 918408
Opened 11 years ago
Closed 11 years ago
marionette.log file created in users' profile folder
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox26 wontfix, firefox27 wontfix, firefox28 fixed, b2g-v1.2 fixed)
RESOLVED
FIXED
mozilla28
People
(Reporter: Dolske, Assigned: mdas)
Details
Attachments
(2 files, 3 obsolete files)
2.40 KB,
patch
|
mdas
:
review+
|
Details | Diff | Splinter Review |
2.43 KB,
patch
|
mdas
:
review+
|
Details | Diff | Splinter Review |
Running a Firefox with a new profile creates a marionette.log file there. Deleting the log file and running Firefox again recreates it.
Why is marionette being initialized and creating this file? These are end-user systems, not test boxes. I'd expect this test framework to be checking a pref or environment variable, and only enabling itself if explicitly needed.
Assignee | ||
Comment 1•11 years ago
|
||
Thanks for noticing this, we shouldn't create that file if the marionette server isn't meant to run.
tested this locally and it won't drop the file unless the marionette-server is supposed to start via --marionette cli arg or by the pref.
Attachment #807809 -
Flags: review?(jgriffin)
Comment 2•11 years ago
|
||
Comment on attachment 807809 [details] [diff] [review]
remove log lines when marionette is not going to be running
Review of attachment 807809 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm
Attachment #807809 -
Flags: review?(jgriffin) → review+
Comment 3•11 years ago
|
||
Why does marionette log to file at all?
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #3)
> Why does marionette log to file at all?
We can remove the file now too, since no one is using it anymore.
So if it's not a debug build (or a b2g build), do we want to have any log output? If we remove the file logging, then we won't have any stdout (dump appenders) for any build other than these two build types. Should we output to stdout for any type of build? I'm not sure what we want here.
Flags: needinfo?(jgriffin)
Comment 5•11 years ago
|
||
Can this also be back-ported to Firefox 25, 26 ?
Comment 6•11 years ago
|
||
(In reply to Malini Das [:mdas] from comment #4)
> (In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment
> #3)
> > Why does marionette log to file at all?
>
> We can remove the file now too, since no one is using it anymore.
>
> So if it's not a debug build (or a b2g build), do we want to have any log
> output? If we remove the file logging, then we won't have any stdout (dump
> appenders) for any build other than these two build types. Should we output
> to stdout for any type of build? I'm not sure what we want here.
We should probably default to not dumping anything on opt Firefox builds, but have a preference that can be set to enable this, so that we can still get meaningful debug information from TBPL jobs. We can set that preference in http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/geckoinstance.py.
Flags: needinfo?(jgriffin)
Comment 7•11 years ago
|
||
(In reply to Jim Jeffery not reading bug-mail 1/2/11 from comment #5)
> Can this also be back-ported to Firefox 25, 26 ?
Yes, if this is useful we can back-port it.
Assignee | ||
Comment 8•11 years ago
|
||
Tested locally for debug/non-debug builds.
This adds support for a pref called 'marionette.logging' which controls marionette logging for non-debug/non-b2g builds.
Attachment #807809 -
Attachment is obsolete: true
Attachment #823480 -
Flags: review?(jgriffin)
Comment 9•11 years ago
|
||
Comment on attachment 823480 [details] [diff] [review]
remove marionette.log file, and enable stdout logging via pref for non-debug/non-b2g builds
Review of attachment 823480 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/marionette/components/marionettecomponent.js
@@ +38,5 @@
> #endif
> #ifdef MOZ_B2G
> dumper = true;
> #endif
> + if (dumper || Services.prefs.getBoolPref(MARIONETTE_LOG_PREF)) {
getBoolPref will throw an exception when this pref doesn't exist, so it needs to be inside a try/catch block.
Attachment #823480 -
Flags: review?(jgriffin) → review-
Assignee | ||
Comment 10•11 years ago
|
||
Thanks, I didn't get any error output in the minimal gecko log in the non-debug build so I didn't realize that was an issue. Fixed in this patch and tested.
Attachment #823480 -
Attachment is obsolete: true
Attachment #823587 -
Flags: review?(jgriffin)
Updated•11 years ago
|
Attachment #823587 -
Attachment is patch: true
Comment 11•11 years ago
|
||
Comment on attachment 823587 [details] [diff] [review]
remove marionette.log file, and enable stdout logging via pref for non-debug/non-b2g builds v2.0
Review of attachment 823587 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks.
::: testing/marionette/components/marionettecomponent.js
@@ +42,5 @@
> + try {
> + if (dumper || Services.prefs.getBoolPref(MARIONETTE_LOG_PREF)) {
> + let formatter = new Log.BasicFormatter();
> + this.logger.addAppender(new Log.DumpAppender(formatter));
> + this.logger.info("MDAS: bool pref: " + Services.prefs.getBoolPref(MARIONETTE_LOG_PREF));
Can delete this line :)
Attachment #823587 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 12•11 years ago
|
||
Hah whoops. Carrying r+ forward, and testing out on try first before landing:
https://tbpl.mozilla.org/?tree=Try&rev=5e5ab351669a
Attachment #823587 -
Attachment is obsolete: true
Attachment #824023 -
Flags: review+
Assignee | ||
Comment 13•11 years ago
|
||
looked good on try, pushing to m-i:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8a9d5e3bcc6b
Assignee: nobody → mdas
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Assignee | ||
Updated•11 years ago
|
status-b2g-v1.2:
--- → affected
Whiteboard: [checkin-needed-b2g26]
Comment 15•11 years ago
|
||
This doesn't apply very well to b2g26 due to bug 451283 landing on Gecko 27. Please post a branch patch :)
Whiteboard: [checkin-needed-b2g26]
Assignee | ||
Comment 16•11 years ago
|
||
This patch should apply cleanly to mozilla-b2g26
Attachment #826907 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Whiteboard: [checkin-needed-b2g26]
Comment 17•11 years ago
|
||
Not sure from this patch if the intention was to not create the log.file at all for end-users, or.. to remove the marionette.log.
In my test profiles after this landed the marionette.log file remains in my profiles.
Manually removing them works and they are not re-created...
At any rate it may not be a big deal to have it linger around, but could perhaps raise questions again down the road when someone else discovers the file.
Assignee | ||
Comment 18•11 years ago
|
||
(In reply to Jim Jeffery not reading bug-mail 1/2/11 from comment #17)
> Not sure from this patch if the intention was to not create the log.file at
> all for end-users, or.. to remove the marionette.log.
>
> In my test profiles after this landed the marionette.log file remains in my
> profiles.
> Manually removing them works and they are not re-created...
This was to prevent the marionette.log file from being written to a file, and does not remove existing marionette.log files.
>
> At any rate it may not be a big deal to have it linger around, but could
> perhaps raise questions again down the road when someone else discovers the
> file.
This is a good point though...
Comment 19•11 years ago
|
||
status-firefox26:
--- → wontfix
status-firefox27:
--- → wontfix
status-firefox28:
--- → fixed
Whiteboard: [checkin-needed-b2g26]
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•