Bug 193547 - [ews-build] validate-patch should handle the case when bug_id is None
Summary: [ews-build] validate-patch should handle the case when bug_id is None
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-01-17 12:11 PST by Aakash Jain
Modified: 2019-01-17 13:34 PST (History)
5 users (show)

See Also:


Attachments
Proposed patch (1.82 KB, patch)
2019-01-17 12:17 PST, Aakash Jain
lforschler: review+
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-01-17 12:11:33 PST
If bug_id is None for any reason (e.g.: EWS web-app did not passed bug_id to buildbot), it should be handled properly. Note that EWS doesn't need bug_id to process the patch, it is needed only to validate if the bug is still open or already closed.
Comment 1 Aakash Jain 2019-01-17 12:17:20 PST
Created attachment 359403 [details]
Proposed patch
Comment 2 Lucas Forschler 2019-01-17 12:57:32 PST
Comment on attachment 359403 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=359403&action=review

r=me with typo fix.

> Tools/ChangeLog:10
> +        (ValidatePatch.start): If bug_id is set as None in build propeties, fetch it from the patch.

typo: properties
Comment 3 Jonathan Bedard 2019-01-17 13:03:17 PST
Comment on attachment 359403 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=359403&action=review

> Tools/BuildSlaveSupport/ews-build/steps.py:334
> +        bug_id = self.getProperty('bug_id', '') or self.get_bug_id_from_patch(patch_id)

Is self.get_bug_id_from_patch(patch_id) a network operation? That's the only reason I can think to change this.
Comment 4 Aakash Jain 2019-01-17 13:13:13 PST
> Is self.get_bug_id_from_patch(patch_id) a network operation?
Yes, it is a network operation. It fetches the patch using bugzilla REST API and reads bug id from it.
Comment 5 Aakash Jain 2019-01-17 13:28:48 PST
Committed r240128: <https://trac.webkit.org/changeset/240128>
Comment 6 Radar WebKit Bug Importer 2019-01-17 13:29:28 PST
<rdar://problem/47362136>