Bug 196216 - [ews-build] Gracefully handle missing patch_id in events
Summary: [ews-build] Gracefully handle missing patch_id in events
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-25 14:17 PDT by Aakash Jain
Modified: 2019-03-25 15:08 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.20 KB, patch)
2019-03-25 14:21 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>