Title: [271802] trunk/Tools
Revision
271802
Author
aakash_j...@apple.com
Date
2021-01-25 11:04:33 -0800 (Mon, 25 Jan 2021)

Log Message

[build.webkit.org] Download the build archive from master when download from S3 fails
https://bugs.webkit.org/show_bug.cgi?id=220932

Reviewed by Jonathan Bedard.

* CISupport/build-webkit-org/steps.py:
(DownloadBuiltProduct):
(DownloadBuiltProduct.evaluateCommand): If this fails, run DownloadBuiltProductFromMaster.
(DownloadBuiltProductFromMaster): Build step to download archive from master using buildbot FileDownload class.
(DownloadBuiltProductFromMaster.__init__):
(DownloadBuiltProductFromMaster.getResultSummary): Custom failure message.

Modified Paths

Diff

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (271801 => 271802)


--- trunk/Tools/CISupport/build-webkit-org/steps.py	2021-01-25 18:52:52 UTC (rev 271801)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2021-01-25 19:04:33 UTC (rev 271802)
@@ -414,8 +414,8 @@
     name = "download-built-product"
     description = ["downloading built product"]
     descriptionDone = ["downloaded built product"]
-    haltOnFailure = True
-    flunkOnFailure = True
+    haltOnFailure = False
+    flunkOnFailure = False
 
     def start(self):
         if 'apple' in self.getProperty('buildername').lower():
@@ -425,7 +425,37 @@
                 self.slaveEnvironment['HTTPS_PROXY'] = APPLE_WEBKIT_AWS_PROXY  # curl env var to use a proxy
         return shell.ShellCommand.start(self)
 
+    def evaluateCommand(self, cmd):
+        rc = shell.ShellCommand.evaluateCommand(self, cmd)
+        if rc == FAILURE and USE_BUILDBOT_VERSION2:
+            self.build.addStepsAfterCurrentStep([DownloadBuiltProductFromMaster()])
+        return rc
 
+
+class DownloadBuiltProductFromMaster(transfer.FileDownload):
+    mastersrc = WithProperties('archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(got_revision)s.zip')
+    workerdest = WithProperties('WebKitBuild/%(configuration)s.zip')
+    name = 'download-built-product-from-master'
+    description = ['downloading built product from buildbot master']
+    descriptionDone = ['Downloaded built product']
+    haltOnFailure = True
+    flunkOnFailure = True
+
+    def __init__(self, **kwargs):
+        # Allow the unit test to override mastersrc
+        if 'mastersrc' not in kwargs:
+            kwargs['mastersrc'] = self.mastersrc
+        kwargs['workerdest'] = self.workerdest
+        kwargs['mode'] = 0o0644
+        kwargs['blocksize'] = 1024 * 256
+        transfer.FileDownload.__init__(self, **kwargs)
+
+    def getResultSummary(self):
+        if self.results != SUCCESS:
+            return {u'step': u'Failed to download built product from build master'}
+        return super(DownloadBuiltProductFromMaster, self).getResultSummary()
+
+
 class RunJavaScriptCoreTests(TestWithFailureCount):
     name = "jscore-test"
     description = ["jscore-tests running"]

Modified: trunk/Tools/ChangeLog (271801 => 271802)


--- trunk/Tools/ChangeLog	2021-01-25 18:52:52 UTC (rev 271801)
+++ trunk/Tools/ChangeLog	2021-01-25 19:04:33 UTC (rev 271802)
@@ -1,5 +1,19 @@
 2021-01-25  Aakash Jain  <aakash_j...@apple.com>
 
+        [build.webkit.org] Download the build archive from master when download from S3 fails
+        https://bugs.webkit.org/show_bug.cgi?id=220932
+
+        Reviewed by Jonathan Bedard.
+
+        * CISupport/build-webkit-org/steps.py:
+        (DownloadBuiltProduct):
+        (DownloadBuiltProduct.evaluateCommand): If this fails, run DownloadBuiltProductFromMaster.
+        (DownloadBuiltProductFromMaster): Build step to download archive from master using buildbot FileDownload class.
+        (DownloadBuiltProductFromMaster.__init__):
+        (DownloadBuiltProductFromMaster.getResultSummary): Custom failure message.
+
+2021-01-25  Aakash Jain  <aakash_j...@apple.com>
+
         layout-test results shouldn't be hosted on build.webkit.org server
         https://bugs.webkit.org/show_bug.cgi?id=220864
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to