Title: [281660] trunk/Tools
Revision
281660
Author
[email protected]
Date
2021-08-26 15:07:13 -0700 (Thu, 26 Aug 2021)

Log Message

[EWS] compile-webkit-without-patch failed, but bot ran layout tests anyway and blamed the patch for a pre-existing failure
https://bugs.webkit.org/show_bug.cgi?id=229533

Reviewed by Jonathan Bedard.

When the compile-webkit-without-patch step fails, instead of running further layout-tests, retry the build and email
bot watcher's. The retried build will hopefully be picked up by other bot eventually. This is similar to what we do
in case of other infrastructure issues like kill-old-processes step failure.
* CISupport/ews-build/steps.py:
(CompileWebKitWithoutPatch.__init__): Added retry_build_on_failure parameter.
(CompileWebKitWithoutPatch.evaluateCommand): If build failed unexpectedly, retry it and email bot watchers.
(CompileWebKitWithoutPatch.send_email_for_unexpected_build_failure):
(ReRunWebKitTests.evaluateCommand):
(ReRunAPITests.evaluateCommand):

Modified Paths

Diff

Modified: trunk/Tools/CISupport/ews-build/steps.py (281659 => 281660)


--- trunk/Tools/CISupport/ews-build/steps.py	2021-08-26 22:05:54 UTC (rev 281659)
+++ trunk/Tools/CISupport/ews-build/steps.py	2021-08-26 22:07:13 UTC (rev 281660)
@@ -1632,6 +1632,10 @@
     name = 'compile-webkit-without-patch'
     haltOnFailure = False
 
+    def __init__(self, retry_build_on_failure=False, **kwargs):
+        self.retry_build_on_failure = retry_build_on_failure
+        super(CompileWebKitWithoutPatch, self).__init__(**kwargs)
+
     def doStepIf(self, step):
         return self.getProperty('patchFailedToBuild') or self.getProperty('patchFailedTests')
 
@@ -1639,9 +1643,28 @@
         return not self.doStepIf(step)
 
     def evaluateCommand(self, cmd):
-        return shell.Compile.evaluateCommand(self, cmd)
+        rc = shell.Compile.evaluateCommand(self, cmd)
+        if rc == FAILURE and self.retry_build_on_failure:
+            message = 'Unable to build WebKit without patch, retrying build'
+            self.descriptionDone = message
+            self.send_email_for_unexpected_build_failure()
+            self.build.buildFinished([message], RETRY)
+        return rc
 
+    def send_email_for_unexpected_build_failure(self):
+        try:
+            builder_name = self.getProperty('buildername', '')
+            worker_name = self.getProperty('workername', '')
+            build_url = '{}#/builders/{}/builds/{}'.format(self.master.config.buildbotURL, self.build._builderid, self.build.number)
+            email_subject = '{} might be in bad state, unable to build WebKit'.format(worker_name)
+            email_text = '{} might be in bad state. It is unable to build WebKit.'.format(worker_name)
+            email_text += ' Same patch was built successfuly on builder queue previously.\n\nBuild: {}\n\nBuilder: {}'.format(build_url, builder_name)
+            reference = 'build-failure-{}'.format(worker_name)
+            send_email_to_bot_watchers(email_subject, email_text, builder_name, reference)
+        except Exception as e:
+            print('Error in sending email for unexpected build failure: {}'.format(e))
 
+
 class AnalyzeCompileWebKitResults(buildstep.BuildStep, BugzillaMixin):
     name = 'analyze-compile-webkit-results'
     description = ['analyze-compile-webkit-results']
@@ -2388,7 +2411,7 @@
                                                 ExtractTestResults(identifier='rerun'),
                                                 UnApplyPatchIfRequired(),
                                                 ValidatePatch(verifyBugClosed=False, addURLs=False),
-                                                CompileWebKitWithoutPatch(),
+                                                CompileWebKitWithoutPatch(retry_build_on_failure=True),
                                                 ValidatePatch(verifyBugClosed=False, addURLs=False),
                                                 KillOldProcesses(),
                                                 RunWebKitTestsWithoutPatch()])
@@ -2856,7 +2879,7 @@
                 steps_to_add.append(InstallWpeDependencies())
             elif platform == 'gtk':
                 steps_to_add.append(InstallGtkDependencies())
-            steps_to_add.append(CompileWebKitWithoutPatch())
+            steps_to_add.append(CompileWebKitWithoutPatch(retry_build_on_failure=True))
             steps_to_add.append(ValidatePatch(verifyBugClosed=False, addURLs=False))
             steps_to_add.append(KillOldProcesses())
             steps_to_add.append(RunAPITestsWithoutPatch())

Modified: trunk/Tools/ChangeLog (281659 => 281660)


--- trunk/Tools/ChangeLog	2021-08-26 22:05:54 UTC (rev 281659)
+++ trunk/Tools/ChangeLog	2021-08-26 22:07:13 UTC (rev 281660)
@@ -1,3 +1,20 @@
+2021-08-26  Aakash Jain  <[email protected]>
+
+        [EWS] compile-webkit-without-patch failed, but bot ran layout tests anyway and blamed the patch for a pre-existing failure
+        https://bugs.webkit.org/show_bug.cgi?id=229533
+
+        Reviewed by Jonathan Bedard.
+
+        When the compile-webkit-without-patch step fails, instead of running further layout-tests, retry the build and email
+        bot watcher's. The retried build will hopefully be picked up by other bot eventually. This is similar to what we do
+        in case of other infrastructure issues like kill-old-processes step failure.
+        * CISupport/ews-build/steps.py:
+        (CompileWebKitWithoutPatch.__init__): Added retry_build_on_failure parameter.
+        (CompileWebKitWithoutPatch.evaluateCommand): If build failed unexpectedly, retry it and email bot watchers.
+        (CompileWebKitWithoutPatch.send_email_for_unexpected_build_failure):
+        (ReRunWebKitTests.evaluateCommand):
+        (ReRunAPITests.evaluateCommand):
+
 2021-08-26  Simon Fraser  <[email protected]>
 
         Add to run-webkit-tests a --expect-pass argument as a synonym for --force
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to