Bug 196216

Summary: [ews-build] Gracefully handle missing patch_id in events
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, commit-queue, dewei_zhu, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Aakash Jain 2019-03-25 14:17:26 PDT
If the patch_id is missing in a build, following exception is generated while generate events. We should handle it gracefully.

2019-03-25 14:10:02-0700 [-] while invoking <bound method Events.buildFinished of <events.Events object at 0x7fc1a2c8d210>>
	Traceback (most recent call last):
	  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 393, in callback
	    self._startRunCallbacks(result)
	  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 501, in _startRunCallbacks
	    self._runCallbacks()
	  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 587, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 1241, in gotResult
	    _inlineCallbacks(r, g, deferred)
	--- <exception caught here> ---
	  File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 1185, in _inlineCallbacks
	    result = g.send(result)
	  File "events.py", line 148, in buildFinished
	    "patch_id": self.getPatchID(build),
	  File "events.py", line 106, in getPatchID
	    return build.get('properties').get('patch_id')[0]
	exceptions.TypeError: 'NoneType' object has no attribute '__getitem__'
Comment 1 Aakash Jain 2019-03-25 14:21:09 PDT
Created attachment 365899 [details]
Patch
Comment 2 WebKit Commit Bot 2019-03-25 15:04:56 PDT
Comment on attachment 365899 [details]
Patch

Clearing flags on attachment: 365899

Committed r243464: <https://trac.webkit.org/changeset/243464>
Comment 3 WebKit Commit Bot 2019-03-25 15:04:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2019-03-25 15:08:11 PDT
<rdar://problem/49231513>