⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 281660 in webkit


Ignore:
Timestamp:
Aug 26, 2021, 3:07:13 PM (5 years ago)
Author:
aakash_jain@apple.com
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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/CISupport/ews-build/steps.py

    r281586 r281660  
    16331633    haltOnFailure = False
    16341634
     1635    def __init__(self, retry_build_on_failure=False, **kwargs):
     1636        self.retry_build_on_failure = retry_build_on_failure
     1637        super(CompileWebKitWithoutPatch, self).__init__(**kwargs)
     1638
    16351639    def doStepIf(self, step):
    16361640        return self.getProperty('patchFailedToBuild') or self.getProperty('patchFailedTests')
     
    16401644
    16411645    def evaluateCommand(self, cmd):
    1642         return shell.Compile.evaluateCommand(self, cmd)
     1646        rc = shell.Compile.evaluateCommand(self, cmd)
     1647        if rc == FAILURE and self.retry_build_on_failure:
     1648            message = 'Unable to build WebKit without patch, retrying build'
     1649            self.descriptionDone = message
     1650            self.send_email_for_unexpected_build_failure()
     1651            self.build.buildFinished([message], RETRY)
     1652        return rc
     1653
     1654    def send_email_for_unexpected_build_failure(self):
     1655        try:
     1656            builder_name = self.getProperty('buildername', '')
     1657            worker_name = self.getProperty('workername', '')
     1658            build_url = '{}#/builders/{}/builds/{}'.format(self.master.config.buildbotURL, self.build._builderid, self.build.number)
     1659            email_subject = '{} might be in bad state, unable to build WebKit'.format(worker_name)
     1660            email_text = '{} might be in bad state. It is unable to build WebKit.'.format(worker_name)
     1661            email_text += ' Same patch was built successfuly on builder queue previously.\n\nBuild: {}\n\nBuilder: {}'.format(build_url, builder_name)
     1662            reference = 'build-failure-{}'.format(worker_name)
     1663            send_email_to_bot_watchers(email_subject, email_text, builder_name, reference)
     1664        except Exception as e:
     1665            print('Error in sending email for unexpected build failure: {}'.format(e))
    16431666
    16441667
     
    23892412                                                UnApplyPatchIfRequired(),
    23902413                                                ValidatePatch(verifyBugClosed=False, addURLs=False),
    2391                                                 CompileWebKitWithoutPatch(),
     2414                                                CompileWebKitWithoutPatch(retry_build_on_failure=True),
    23922415                                                ValidatePatch(verifyBugClosed=False, addURLs=False),
    23932416                                                KillOldProcesses(),
     
    28572880            elif platform == 'gtk':
    28582881                steps_to_add.append(InstallGtkDependencies())
    2859             steps_to_add.append(CompileWebKitWithoutPatch())
     2882            steps_to_add.append(CompileWebKitWithoutPatch(retry_build_on_failure=True))
    28602883            steps_to_add.append(ValidatePatch(verifyBugClosed=False, addURLs=False))
    28612884            steps_to_add.append(KillOldProcesses())
  • trunk/Tools/ChangeLog

    r281649 r281660  
     12021-08-26  Aakash Jain  <aakash_jain@apple.com>
     2
     3        [EWS] compile-webkit-without-patch failed, but bot ran layout tests anyway and blamed the patch for a pre-existing failure
     4        https://bugs.webkit.org/show_bug.cgi?id=229533
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        When the compile-webkit-without-patch step fails, instead of running further layout-tests, retry the build and email
     9        bot watcher's. The retried build will hopefully be picked up by other bot eventually. This is similar to what we do
     10        in case of other infrastructure issues like kill-old-processes step failure.
     11        * CISupport/ews-build/steps.py:
     12        (CompileWebKitWithoutPatch.__init__): Added retry_build_on_failure parameter.
     13        (CompileWebKitWithoutPatch.evaluateCommand): If build failed unexpectedly, retry it and email bot watchers.
     14        (CompileWebKitWithoutPatch.send_email_for_unexpected_build_failure):
     15        (ReRunWebKitTests.evaluateCommand):
     16        (ReRunAPITests.evaluateCommand):
     17
    1182021-08-26  Simon Fraser  <simon.fraser@apple.com>
    219
Note: See TracChangeset for help on using the changeset viewer.