Title: [240128] trunk/Tools
Revision
240128
Author
aakash_j...@apple.com
Date
2019-01-17 13:28:19 -0800 (Thu, 17 Jan 2019)

Log Message

[ews-build] validate-patch should handle the case when bug_id is None
https://bugs.webkit.org/show_bug.cgi?id=193547

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(ValidatePatch._is_bug_closed): Gracefully handle the case when bug_id is None.
(ValidatePatch.start): If bug_id is set as None in build properties, fetch it from the patch.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (240127 => 240128)


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2019-01-17 21:24:44 UTC (rev 240127)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2019-01-17 21:28:19 UTC (rev 240128)
@@ -305,6 +305,10 @@
         return 0
 
     def _is_bug_closed(self, bug_id):
+        if not bug_id:
+            self._addToLog('stdio', 'Skipping bug status validation since bug id is None.\n')
+            return -1
+
         bug_json = self.get_bug_json(bug_id)
         if not bug_json or not bug_json.get('status'):
             self._addToLog('stdio', 'Unable to fetch bug {}.\n'.format(bug_id))
@@ -329,7 +333,7 @@
             self.finished(FAILURE)
             return None
 
-        bug_id = self.getProperty('bug_id', self.get_bug_id_from_patch(patch_id))
+        bug_id = self.getProperty('bug_id', '') or self.get_bug_id_from_patch(patch_id)
 
         bug_closed = self._is_bug_closed(bug_id)
         if bug_closed == 1:

Modified: trunk/Tools/ChangeLog (240127 => 240128)


--- trunk/Tools/ChangeLog	2019-01-17 21:24:44 UTC (rev 240127)
+++ trunk/Tools/ChangeLog	2019-01-17 21:28:19 UTC (rev 240128)
@@ -1,5 +1,16 @@
 2019-01-17  Aakash Jain  <aakash_j...@apple.com>
 
+        [ews-build] validate-patch should handle the case when bug_id is None
+        https://bugs.webkit.org/show_bug.cgi?id=193547
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (ValidatePatch._is_bug_closed): Gracefully handle the case when bug_id is None.
+        (ValidatePatch.start): If bug_id is set as None in build properties, fetch it from the patch.
+
+2019-01-17  Aakash Jain  <aakash_j...@apple.com>
+
         [ews-build] Add patch author information in build
         https://bugs.webkit.org/show_bug.cgi?id=193465
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to