Bug 93789 - REGRESSION(r125153): It broke the 'Unexpected no expected results' case
Summary: REGRESSION(r125153): It broke the 'Unexpected no expected results' case
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Critical
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 93537
  Show dependency treegraph
 
Reported: 2012-08-12 16:18 PDT by Csaba Osztrogonác
Modified: 2012-11-07 07:01 PST (History)
6 users (show)

See Also:


Attachments
regex fix (1.54 KB, patch)
2012-08-13 00:31 PDT, Peter Gal
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2012-08-12 16:18:03 PDT
After this change if there is 'Unexpected no expected results',
_parseNewRunWebKitTestsOutput dies with exception:


 (view as text)

Traceback (most recent call last):
  File "/var/python/lib/python2.6/site-packages/twisted/internet/defer.py", line 290, in addCallbacks
    self._runCallbacks()
  File "/var/python/lib/python2.6/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/var/python/lib/python2.6/site-packages/twisted/internet/defer.py", line 368, in callback
    self._startRunCallbacks(result)
  File "/var/python/lib/python2.6/site-packages/twisted/internet/defer.py", line 464, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/var/python/lib/python2.6/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/var/python/lib/python2.6/site-packages/buildbot/process/buildstep.py", line 800, in <lambda>
    d.addCallback(lambda res: self.commandComplete(cmd))
  File "/var/buildbot/master.cfg", line 382, in commandComplete
    self._parseNewRunWebKitTestsOutput(logText)
  File "/var/buildbot/master.cfg", line 367, in _parseNewRunWebKitTestsOutput
    testFailures[name] = testFailures.get(name, 0) + int(match.group(1))
exceptions.ValueError: invalid literal for int() with base 10: 'no expected results found'


It seems the regexp is broken. Could you check it, please?
Comment 1 Peter Gal 2012-08-13 00:07:06 PDT
This regex is the culprit

re.compile(r'(no expected results found|missing results)\s*:\s+\((\d+)\)')

Because of the new parentheses the text is the first matching group. The text should be a non-capturing group, like this:

re.compile(r'(?:no expected results found|missing results)\s*:\s+\((\d+)\)')
Comment 2 Csaba Osztrogonác 2012-08-13 00:18:17 PDT
(In reply to comment #1)
> This regex is the culprit
> 
> re.compile(r'(no expected results found|missing results)\s*:\s+\((\d+)\)')
> 
> Because of the new parentheses the text is the first matching group. The text should be a non-capturing group, like this:
> 
> re.compile(r'(?:no expected results found|missing results)\s*:\s+\((\d+)\)')

Could you upload a patch for it? ;-)
Comment 3 Peter Gal 2012-08-13 00:31:40 PDT
Created attachment 157932 [details]
regex fix

Should fix it (TM) :)
Comment 4 Csaba Osztrogonác 2012-08-13 01:09:27 PDT
Comment on attachment 157932 [details]
regex fix

LGTM,r=me.
Comment 5 Csaba Osztrogonác 2012-08-13 01:11:58 PDT
Comment on attachment 157932 [details]
regex fix

Clearing flags on attachment: 157932

Committed r125396: <http://trac.webkit.org/changeset/125396>
Comment 6 Csaba Osztrogonác 2012-08-13 01:12:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Csaba Osztrogonác 2012-08-13 01:23:59 PDT
Lucas or Bill, could you restart the buildmaster again, please?
(It seems automatic restart still doesn't work.)
Comment 8 Csaba Osztrogonác 2012-08-14 02:09:50 PDT
(In reply to comment #7)
> Lucas or Bill, could you restart the buildmaster again, please?
> (It seems automatic restart still doesn't work.)

ping? 

It is very important to restart the master, because now all bots 
throw exception when somebody lands a new test without expected file.

And are you planning to enable automatic master 
restarting after a master.cfg change?
Comment 9 Lucas Forschler 2012-08-14 11:29:20 PDT
Restarted master but ran into this issue:

2012-08-14 11:27:16-0700 [-] Unhandled Error
	Traceback (most recent call last):
	  File "/var/python/lib/python2.6/site-packages/twisted/internet/defer.py", line 551, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "/var/python/lib/python2.6/site-packages/twisted/internet/defer.py", line 916, in gotResult
	    _deferGenerator(g, deferred)
	  File "/var/python/lib/python2.6/site-packages/twisted/internet/defer.py", line 891, in _deferGenerator
	    result = g.next()
	  File "/var/python/lib/python2.6/site-packages/buildbot/master.py", line 166, in startService
	    self.configFileName)
	--- <exception caught here> ---
	  File "/var/python/lib/python2.6/site-packages/buildbot/config.py", line 144, in loadConfig
	    exec f in localDict
	  File "/var/buildbot/master.cfg", line 921, in <module>
	    loadBuilderConfig(c)
	  File "/var/buildbot/master.cfg", line 847, in loadBuilderConfig
	    c['slaves'] = [BuildSlave(slave['name'], passwords[slave['name']], max_builds=1) for slave in config['slaves']]
	exceptions.KeyError: u'indt-mountainlion'
Comment 10 Lucas Forschler 2012-08-14 11:30:22 PDT
I've rolled back until we can investigate the below.
I'm not sure why the build master isn't auto-restarting... maybe because it failed to start.  Hopefully Bill can investigate then when he returns from vacation.  I will also look into it as time allows.
Comment 11 Lucas Forschler 2012-08-14 11:39:36 PDT
it looks like we needed a passwords update.  I've fixed that and restarted the master.
Things appear to be running now.
Comment 12 Csaba Osztrogonác 2012-11-07 07:01:27 PST
It is fixed long time ago.