Title: [265614] trunk/Tools
Revision
265614
Author
[email protected]
Date
2020-08-13 11:16:21 -0700 (Thu, 13 Aug 2020)

Log Message

[ews] email notifications should include Bugzilla link to the patch
https://bugs.webkit.org/show_bug.cgi?id=215455

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(Bugzilla):
(Bugzilla.patch_url): Method to generate patch url.
(AnalyzeCompileWebKitResults.send_email_for_new_build_failure): Added link to the patch id.
(AnalyzeLayoutTestsResults.send_email_for_new_test_failures): Ditto.
(ConfigureBuild.add_patch_id_url):
(ConfigureBuild.getPatchURL): Deleted.

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2020-08-13 17:56:06 UTC (rev 265613)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2020-08-13 18:16:21 UTC (rev 265614)
@@ -89,14 +89,9 @@
     def add_patch_id_url(self):
         patch_id = self.getProperty('patch_id', '')
         if patch_id:
-            self.addURL('Patch {}'.format(patch_id), self.getPatchURL(patch_id))
+            self.addURL('Patch {}'.format(patch_id), Bugzilla.patch_url(patch_id))
 
-    def getPatchURL(self, patch_id):
-        if not patch_id:
-            return None
-        return '{}attachment.cgi?id={}&action="" patch_id)
 
-
 class CheckOutSource(git.Git):
     name = 'clean-and-update-working-directory'
     CHECKOUT_DELAY_AND_MAX_RETRIES_PAIR = (0, 2)
@@ -374,7 +369,13 @@
             return ''
         return '{}show_bug.cgi?id={}'.format(BUG_SERVER_URL, bug_id)
 
+    @classmethod
+    def patch_url(cls, patch_id):
+        if not patch_id:
+            return ''
+        return '{}attachment.cgi?id={}&action="" patch_id)
 
+
 class BugzillaMixin(object):
     addURLs = False
     bug_open_statuses = ['UNCONFIRMED', 'NEW', 'ASSIGNED', 'REOPENED']
@@ -1481,7 +1482,8 @@
                 logs = self.filter_logs_containing_error(logs)
 
             email_subject = 'Build failure for Patch {}: {}'.format(patch_id, bug_title)
-            email_text = 'EWS has detected build failure on {} while testing Patch {}'.format(builder_name, patch_id)
+            email_text = 'EWS has detected build failure on {}'.format(builder_name)
+            email_text += ' while testing <a href="" {}</a>'.format(Bugzilla.patch_url(patch_id), patch_id)
             email_text += ' for <a href="" {}</a>.'.format(Bugzilla.bug_url(bug_id), bug_id)
             email_text += '\n\nFull details are available at: {}\n\nPatch author: {}'.format(build_url, patch_author)
             if logs:
@@ -2156,7 +2158,8 @@
 
             pluralSuffix = 's' if len(test_names) > 1 else ''
             email_subject = 'Layout test failure for Patch {}: {} '.format(patch_id, bug_title)
-            email_text = 'EWS has detected layout test failure{} on {} while testing Patch {}'.format(pluralSuffix, builder_name, patch_id)
+            email_text = 'EWS has detected layout test failure{} on {}'.format(pluralSuffix, builder_name)
+            email_text += ' while testing <a href="" {}</a>'.format(Bugzilla.patch_url(patch_id), patch_id)
             email_text += ' for <a href="" {}</a>.'.format(Bugzilla.bug_url(bug_id), bug_id)
             email_text += '\n\nFull details are available at: {}\n\nPatch author: {}'.format(build_url, patch_author)
             email_text += '\n\nLayout test failure{}:\n{}'.format(pluralSuffix, test_names_string)

Modified: trunk/Tools/ChangeLog (265613 => 265614)


--- trunk/Tools/ChangeLog	2020-08-13 17:56:06 UTC (rev 265613)
+++ trunk/Tools/ChangeLog	2020-08-13 18:16:21 UTC (rev 265614)
@@ -1,5 +1,20 @@
 2020-08-13  Aakash Jain  <[email protected]>
 
+        [ews] email notifications should include Bugzilla link to the patch
+        https://bugs.webkit.org/show_bug.cgi?id=215455
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (Bugzilla):
+        (Bugzilla.patch_url): Method to generate patch url.
+        (AnalyzeCompileWebKitResults.send_email_for_new_build_failure): Added link to the patch id.
+        (AnalyzeLayoutTestsResults.send_email_for_new_test_failures): Ditto.
+        (ConfigureBuild.add_patch_id_url):
+        (ConfigureBuild.getPatchURL): Deleted.
+
+2020-08-13  Aakash Jain  <[email protected]>
+
         [ews] test names in ews notification email should be in sorted order
         https://bugs.webkit.org/show_bug.cgi?id=215446
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to