Bug 107775

Summary: QueueStatusServer crashes in production on next-patch
Product: WebKit Reporter: Alan Cutter <alancutter>
Component: Tools / TestsAssignee: Alan Cutter <alancutter>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric, ossy, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 107612    
Attachments:
Description Flags
Patch none

Description Alan Cutter 2013-01-23 19:36:36 PST
[From https://bugs.webkit.org/show_bug.cgi?id=107612#c17]

> (In reply to comment #15)
> > (From update of attachment 184154 [details] [details])
> > Clearing flags on attachment: 184154
> > 
> > Committed r140513: <http://trac.webkit.org/changeset/140513>
> 
> It seems it broke all EWS bots somehow. For example Qt EWS bots 
> are stucked in the following exception when they try to fetch http://queues.webkit.org/next-patch/qt-ews:
> 
> Traceback (most recent call last):
>   File "/storage/WebKit-qt-ews/Tools/Scripts/webkitpy/tool/bot/queueengine.py", line 96, in run
>     work_item = self._delegate.next_work_item()
>   File "/storage/WebKit-qt-ews/Tools/Scripts/webkitpy/tool/commands/queues.py", line 419, in next_work_item
>     return self._next_patch()
>   File "/storage/WebKit-qt-ews/Tools/Scripts/webkitpy/tool/commands/queues.py", line 216, in _next_patch
>     patch_id = self._tool.status_server.next_work_item(self.name)
>   File "/storage/WebKit-qt-ews/Tools/Scripts/webkitpy/common/net/statusserver.py", line 128, in next_work_item
>     return self._fetch_url(next_patch_url)
>   File "/storage/WebKit-qt-ews/Tools/Scripts/webkitpy/common/net/statusserver.py", line 162, in _fetch_url
>     raise e
> HTTPError: HTTP Error 500: Internal Server Error
> 
> 
> I tried to fetch this URL from the browser and I got this exception:
> Traceback (most recent call last):
>   File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 714, in __call__
>     handler.get(*groups)
>   File "/base/data/home/apps/webkit-commit-queue/107612.364787856447592722/handlers/nextpatch.py", line 51, in get
>     RecordPatchEvent.started(patch_id, queue_name)
>   File "/base/data/home/apps/webkit-commit-queue/107612.364787856447592722/loggers/recordpatchevent.py", line 63, in started
>     patch_log.calculate_wait_duration()
>   File "/base/data/home/apps/webkit-commit-queue/107612.364787856447592722/model/patchlog.py", line 52, in calculate_wait_duration
>     self.wait_duration = int(time_delta.total_seconds())
> AttributeError: 'datetime.timedelta' object has no attribute 'total_seconds'
> 
> Could you guys check it, please?

The QSS server is running on Python 2.5 which does not have timedelta.total_seconds.
Unfortunately the local dev_server used for testing was using Python 2.7 and did not catch this.
Comment 1 Alan Cutter 2013-01-23 19:45:59 PST
Created attachment 184383 [details]
Patch
Comment 2 Adam Barth 2013-01-23 21:32:48 PST
I think AppEngine supports Python 2.7.  I'm not sure what's involved in upgrading.
Comment 3 Eric Seidel (no email) 2013-01-23 21:42:49 PST
Mostly just have to change app.yaml. :-)
Comment 4 Alan Cutter 2013-01-23 21:44:30 PST
(In reply to comment #3)
> Mostly just have to change app.yaml. :-)

I hope it will be that simple!
Comment 5 WebKit Review Bot 2013-01-23 21:51:00 PST
Comment on attachment 184383 [details]
Patch

Clearing flags on attachment: 184383

Committed r140652: <http://trac.webkit.org/changeset/140652>
Comment 6 WebKit Review Bot 2013-01-23 21:51:04 PST
All reviewed patches have been landed.  Closing bug.