Closed
Bug 1006511
Opened 11 years ago
Closed 11 years ago
Marionette timeouts shouldn't print the ScriptTimeoutException traceback to the log
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(firefox30 wontfix, firefox31 wontfix, firefox32 fixed, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)
RESOLVED
FIXED
mozilla32
People
(Reporter: emorley, Assigned: automatedtester)
References
(Blocks 1 open bug)
Details
(Keywords: pi-marionette-runner, sheriffing-P1)
Attachments
(2 files)
2.17 KB,
patch
|
mdas
:
review+
|
Details | Diff | Splinter Review |
2.55 KB,
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
eg:
https://tbpl.mozilla.org/php/getParsedLog.php?id=39122484&tree=Mozilla-Inbound
{
04:16:29 INFO - ======================================================================
04:16:29 INFO - ERROR: None
04:16:29 INFO - ----------------------------------------------------------------------
04:16:29 INFO - Traceback (most recent call last):
04:16:29 INFO - File "/builds/slave/test/build/tests/marionette/marionette/marionette_test.py", line 170, in run
04:16:29 INFO - testMethod()
04:16:29 INFO - File "/builds/slave/test/build/tests/marionette/marionette/marionette_test.py", line 497, in runTest
04:16:29 INFO - filename=os.path.basename(self.jsFile))
04:16:29 INFO - File "/builds/slave/test/build/tests/marionette/marionette/marionette.py", line 1057, in execute_js_script
04:16:29 INFO - line=None)
04:16:29 INFO - File "/builds/slave/test/build/tests/marionette/marionette/decorators.py", line 35, in _
04:16:29 INFO - return func(*args, **kwargs)
04:16:29 INFO - File "/builds/slave/test/build/tests/marionette/marionette/marionette.py", line 631, in _send_message
04:16:29 INFO - self._handle_error(response)
04:16:29 INFO - File "/builds/slave/test/build/tests/marionette/marionette/marionette.py", line 690, in _handle_error
04:16:29 ERROR - raise ScriptTimeoutException(message=message, status=status, stacktrace=stacktrace)
04:16:29 ERROR - TEST-UNEXPECTED-FAIL | test_emergency_label.js | ScriptTimeoutException: ScriptTimeoutException: timed out
04:16:29 INFO - ----------------------------------------------------------------------
04:16:29 INFO - Ran 1 test in 61.776s
04:16:29 WARNING - FAILED (errors=1)
}
The ScriptTimeoutException is just a Pythonic way to handle the timeout internally - we shouldn't print the traceback to the log, since it's going to confuse parsers.
We're handling the exception by printing the timeout line, and so the traceback is both unnecessarily worrying to the lay-person reading the logs - and doesn't really add any content.
Comment 1•11 years ago
|
||
Excellent, Dave and I were just discussing this yesterday.
Reporter | ||
Updated•11 years ago
|
Keywords: ateam-marionette-runner,
sheriffing-P1
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(dburns)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8421939 -
Flags: review?(mdas)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dburns
Status: NEW → ASSIGNED
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(dburns)
Updated•11 years ago
|
Attachment #8421939 -
Flags: review?(mdas) → review+
Assignee | ||
Comment 3•11 years ago
|
||
Updated•11 years ago
|
Flags: needinfo?(ryanvm)
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Reporter | ||
Comment 5•11 years ago
|
||
Looking good - eg:
https://tbpl.mozilla.org/php/getParsedLog.php?id=39624242&tree=Mozilla-Inbound
Thank you :-)
Comment 6•11 years ago
|
||
Can we back this out?
On Gu this has caused the whole Traceback to disappear:
06:40:17 INFO - TEST-START test_homescreen_edit_mode.py
06:41:10 INFO - test_access_and_leave_edit_mode (test_homescreen_edit_mode.TestEditMode) ... ERROR
06:41:11 INFO - ======================================================================
06:41:11 INFO - ERROR: None
06:41:11 INFO - ----------------------------------------------------------------------
06:41:11 ERROR - TEST-UNEXPECTED-FAIL | test_homescreen_edit_mode.py test_homescreen_edit_mode.TestEditMode.test_access_and_leave_edit_mode | ScriptTimeoutException: ScriptTimeoutException: timed out
06:41:11 INFO - ----------------------------------------------------------------------
06:41:11 INFO - Ran 1 test in 54.008s
06:41:11 WARNING - FAILED (errors=1)
Reporter | ||
Comment 7•11 years ago
|
||
I'm happy to back this out temporarily, but we shouldn't be outputting a stacktrace anywhere IMO.
We should improve the content of the TEST-UNEXPECTED-FAIL line to include whatever line numbers amongst the rest of the stack that was useful for you - that way the info is more visible, since it will be in the log excerpt.
Comment 8•11 years ago
|
||
Thanks Ed.
We definitely need some information in there, we can't just have nothing!
Comment 9•11 years ago
|
||
In the case in the original description, the entire stack trace is useless, since JS files are executed using a single execute_async_script statement, and nothing in the traceback yields useful additional information.
In the case of Python tests, like gaia-ui-tests, the traceback points to which execute call is timing out, which is really important.
Assignee | ||
Comment 10•11 years ago
|
||
What I can do is have a it print the stack if it is a python test and ignore it if it is a JS test.
Is that a good compromise?
I do wonder if we should be better to raise a different exception for the JS tests
Flags: needinfo?(emorley)
Reporter | ||
Comment 11•11 years ago
|
||
wfm for now :-)
Status: RESOLVED → REOPENED
Flags: needinfo?(emorley)
Resolution: FIXED → ---
Assignee | ||
Comment 12•11 years ago
|
||
Comment 13•11 years ago
|
||
We also need to do the same for "TimeoutException: TimeoutException: Connection timed out"
Reporter | ||
Comment 14•11 years ago
|
||
I'm starring all Mnw "TimeoutException: TimeoutException: Connection timed out" failures generically (and have been since bug 948895 was resolved incomplete) due to this bug btw - since the bug suggestions list is too spammy to use in a timely manner. The try runs in comment 12 look good - let's get this landed! :-)
Assignee | ||
Comment 15•11 years ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #13)
> We also need to do the same for "TimeoutException: TimeoutException:
> Connection timed out"
Timeout is actually useful since its a specific operation like loading a page. Script is overloaded since it can be run this arbitary bit of code or run this entire test.
Assignee | ||
Comment 16•11 years ago
|
||
(In reply to Ed Morley [:edmorley UTC+0] from comment #14)
> I'm starring all Mnw "TimeoutException: TimeoutException: Connection timed
> out" failures generically (and have been since bug 948895 was resolved
> incomplete) due to this bug btw - since the bug suggestions list is too
> spammy to use in a timely manner. The try runs in comment 12 look good -
> let's get this landed! :-)
While this looks good for a sheriff it doesnt look good for anyone else and doesnt meet the compromise in comment 10.
New try
https://tbpl.mozilla.org/?tree=Try&rev=e7b98f18835e
https://tbpl.mozilla.org/?tree=Try&rev=50fc89334c88
Reporter | ||
Comment 17•11 years ago
|
||
(In reply to David Burns :automatedtester from comment #16)
> While this looks good for a sheriff it doesnt look good for anyone else and
> doesnt meet the compromise in comment 10.
Oh I thought I saw the tail end of a stack in the excerpt for gaia-ui tests; clearly not.
Reporter | ||
Comment 18•11 years ago
|
||
The try runs in comment 16 look better - is this ready to land now? :-)
Assignee | ||
Comment 19•11 years ago
|
||
Attachment #8429612 -
Flags: review?(jgriffin)
Comment 20•11 years ago
|
||
Comment on attachment 8429612 [details] [diff] [review]
Print script timeout stacks if they came from a python test
Review of attachment 8429612 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/marionette/client/marionette/runner/base.py
@@ +230,5 @@
> if 'TEST-UNEXPECTED-FAIL' in line:
> fail_present = True
> for line in err:
> if line != lastline or fail_present:
> + if re.match('.*\.js', test_name):
or just test_name.endswith('.js')?
Attachment #8429612 -
Flags: review?(jgriffin) → review+
Assignee | ||
Comment 21•11 years ago
|
||
Discussed with jgriffin on irc. We can have situations where it can be testFile.js testClass.testName which the regex would handle. The Python tests report like that so if we make them the same we dont need to worry
Assignee | ||
Comment 22•11 years ago
|
||
Comment 23•11 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Comment 24•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/rev/87a1b92e83dc
https://hg.mozilla.org/releases/mozilla-b2g30_v1_4/rev/43c35a6eddd1
https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/b9a78eeaa4fb
https://hg.mozilla.org/releases/mozilla-b2g28_v1_3/rev/a55e22f592ac
status-b2g-v1.3:
--- → fixed
status-b2g-v1.3T:
--- → affected
status-b2g-v1.4:
--- → fixed
status-b2g-v2.0:
--- → fixed
status-firefox30:
--- → wontfix
status-firefox31:
--- → wontfix
status-firefox32:
--- → fixed
Flags: needinfo?(ryanvm)
Updated•11 years ago
|
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
•