Title: [288636] trunk/Tools
Revision
288636
Author
jbed...@apple.com
Date
2022-01-26 11:44:58 -0800 (Wed, 26 Jan 2022)

Log Message

[EWS] Support pull requests in built product management
https://bugs.webkit.org/show_bug.cgi?id=235589
<rdar://problem/88024098>

Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(ConfigureBuild.add_patch_id_url): Set change_id.
(ConfigureBuild.add_pr_details): Ditto.
(Trigger.propertiesToPassToTriggers): Pass change_id.
(UploadBuiltProduct): Use change_id instead of patch_id.
(TransferToS3): Ditto.
(DownloadBuiltProduct): Ditto.
(DownloadBuiltProductFromMaster): Ditto.
* Tools/CISupport/ews-build/steps_unittest.py:

Canonical link: https://commits.webkit.org/246450@main

Modified Paths

Diff

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


--- trunk/Tools/CISupport/ews-build/steps.py	2022-01-26 19:32:50 UTC (rev 288635)
+++ trunk/Tools/CISupport/ews-build/steps.py	2022-01-26 19:44:58 UTC (rev 288636)
@@ -310,6 +310,7 @@
     def add_patch_id_url(self):
         patch_id = self.getProperty('patch_id', '')
         if patch_id:
+            self.setProperty('change_id', patch_id, 'ConfigureBuild')
             self.addURL('Patch {}'.format(patch_id), Bugzilla.patch_url(patch_id))
 
     def add_pr_details(self):
@@ -316,11 +317,14 @@
         pr_number = self.getProperty('github.number')
         if not pr_number:
             return
+
         repository_url = self.getProperty('repository', '')
         title = self.getProperty('github.title', '')
         owners = self.getProperty('owners', [])
         revision = self.getProperty('github.head.sha')
 
+        self.setProperty('change_id', revision, 'ConfigureBuild')
+
         if title:
             self.addURL('PR {}: {}'.format(pr_number, title), GitHub.pr_url(pr_number, repository_url))
         if owners:
@@ -1496,11 +1500,11 @@
             ]
         if self.triggers:
             property_names.append('triggers')
-        if self.include_revision and pull_request:
-            properties_to_pass['ews_revision'] = properties.Property('got_revision')
 
         properties_to_pass = {prop: properties.Property(prop) for prop in property_names}
         properties_to_pass['retry_count'] = properties.Property('retry_count', default=0)
+        if self.include_revision and patch:
+            properties_to_pass['ews_revision'] = properties.Property('got_revision')
         return properties_to_pass
 
 
@@ -3351,7 +3355,7 @@
 class UploadBuiltProduct(transfer.FileUpload):
     name = 'upload-built-product'
     workersrc = WithProperties('WebKitBuild/%(configuration)s.zip')
-    masterdest = WithProperties('public_html/archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(patch_id)s.zip')
+    masterdest = WithProperties('public_html/archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(change_id)s.zip')
     descriptionDone = ['Uploaded built product']
     haltOnFailure = True
 
@@ -3372,10 +3376,10 @@
     name = 'transfer-to-s3'
     description = ['transferring to s3']
     descriptionDone = ['Transferred archive to S3']
-    archive = WithProperties('public_html/archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(patch_id)s.zip')
+    archive = WithProperties('public_html/archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(change_id)s.zip')
     identifier = WithProperties('%(fullPlatform)s-%(architecture)s-%(configuration)s')
-    patch_id = WithProperties('%(patch_id)s')
-    command = ['python3', '../Shared/transfer-archive-to-s3', '--patch_id', patch_id, '--identifier', identifier, '--archive', archive]
+    change_id = WithProperties('%(change_id)s')
+    command = ['python3', '../Shared/transfer-archive-to-s3', '--patch_id', change_id, '--identifier', identifier, '--archive', archive]
     haltOnFailure = False
     flunkOnFailure = False
 
@@ -3411,7 +3415,7 @@
 class DownloadBuiltProduct(shell.ShellCommand):
     command = ['python3', 'Tools/CISupport/download-built-product',
                WithProperties('--%(configuration)s'),
-               WithProperties(S3URL + 'ews-archives.webkit.org/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(patch_id)s.zip')]
+               WithProperties(S3URL + 'ews-archives.webkit.org/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(change_id)s.zip')]
     name = 'download-built-product'
     description = ['downloading built product']
     descriptionDone = ['Downloaded built product']
@@ -3441,7 +3445,7 @@
 
 
 class DownloadBuiltProductFromMaster(transfer.FileDownload):
-    mastersrc = WithProperties('public_html/archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(patch_id)s.zip')
+    mastersrc = WithProperties('public_html/archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(change_id)s.zip')
     workerdest = WithProperties('WebKitBuild/%(configuration)s.zip')
     name = 'download-built-product-from-master'
     description = ['downloading built product from buildbot master']

Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (288635 => 288636)


--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-01-26 19:32:50 UTC (rev 288635)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2022-01-26 19:44:58 UTC (rev 288636)
@@ -3441,7 +3441,7 @@
         self.setProperty('fullPlatform', 'mac-sierra')
         self.setProperty('configuration', 'release')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '1234')
+        self.setProperty('change_id', '1234')
         self.expectHidden(False)
         self.expectRemoteCommands(
             Expect('uploadFile', dict(workersrc='WebKitBuild/release.zip', workdir='wkdir',
@@ -3460,7 +3460,7 @@
         self.setProperty('fullPlatform', 'mac-sierra')
         self.setProperty('configuration', 'release')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '1234')
+        self.setProperty('change_id', '1234')
         self.expectHidden(False)
         self.expectRemoteCommands(
             Expect('uploadFile', dict(workersrc='WebKitBuild/release.zip', workdir='wkdir',
@@ -3488,7 +3488,7 @@
         self.setProperty('fullPlatform', 'ios-simulator-12')
         self.setProperty('configuration', 'release')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '1234')
+        self.setProperty('change_id', '1234')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         logEnviron=False,
@@ -3505,7 +3505,7 @@
         self.setProperty('fullPlatform', 'mac-sierra')
         self.setProperty('configuration', 'debug')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '123456')
+        self.setProperty('change_id', '123456')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         logEnviron=False,
@@ -3523,7 +3523,7 @@
         self.setProperty('fullPlatform', 'gtk')
         self.setProperty('configuration', 'release')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '123456')
+        self.setProperty('change_id', '123456')
         self.expectOutcome(result=SKIPPED)
         with current_hostname('test-ews-deployment.igalia.com'):
             return self.runStep()
@@ -3554,7 +3554,7 @@
         self.setProperty('fullPlatform', 'ios-simulator-12')
         self.setProperty('configuration', 'release')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '1234')
+        self.setProperty('change_id', '1234')
         self.expectHidden(False)
         buf = []
         self.expectRemoteCommands(
@@ -3583,7 +3583,7 @@
         self.setProperty('fullPlatform', 'mac-sierra')
         self.setProperty('configuration', 'debug')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '123456')
+        self.setProperty('change_id', '123456')
         buf = []
         self.expectRemoteCommands(
             Expect('downloadFile', dict(
@@ -3664,7 +3664,7 @@
         self.setProperty('fullPlatform', 'mac-highsierra')
         self.setProperty('configuration', 'release')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '1234')
+        self.setProperty('change_id', '1234')
         self.expectLocalCommands(
             ExpectMasterShellCommand(command=['python3',
                                               '../Shared/transfer-archive-to-s3',
@@ -3683,7 +3683,7 @@
         self.setProperty('fullPlatform', 'ios-simulator-12')
         self.setProperty('configuration', 'debug')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '1234')
+        self.setProperty('change_id', '1234')
         self.expectLocalCommands(
             ExpectMasterShellCommand(command=['python3',
                                               '../Shared/transfer-archive-to-s3',
@@ -3702,7 +3702,7 @@
         self.setProperty('fullPlatform', 'mac-highsierra')
         self.setProperty('configuration', 'release')
         self.setProperty('architecture', 'x86_64')
-        self.setProperty('patch_id', '1234')
+        self.setProperty('change_id', '1234')
         self.expectOutcome(result=SKIPPED, state_string='Transferred archive to S3 (skipped)')
         with current_hostname('something-other-than-steps.EWS_BUILD_HOSTNAME'):
             return self.runStep()

Modified: trunk/Tools/ChangeLog (288635 => 288636)


--- trunk/Tools/ChangeLog	2022-01-26 19:32:50 UTC (rev 288635)
+++ trunk/Tools/ChangeLog	2022-01-26 19:44:58 UTC (rev 288636)
@@ -1,3 +1,21 @@
+2022-01-25  Jonathan Bedard  <jbed...@apple.com>
+
+        [EWS] Support pull requests in built product management
+        https://bugs.webkit.org/show_bug.cgi?id=235589
+        <rdar://problem/88024098>
+
+        Reviewed by Aakash Jain.
+
+        * CISupport/ews-build/steps.py:
+        (ConfigureBuild.add_patch_id_url): Set change_id.
+        (ConfigureBuild.add_pr_details): Ditto.
+        (Trigger.propertiesToPassToTriggers): Pass change_id.
+        (UploadBuiltProduct): Use change_id instead of patch_id.
+        (TransferToS3): Ditto.
+        (DownloadBuiltProduct): Ditto.
+        (DownloadBuiltProductFromMaster): Ditto.
+        * CISupport/ews-build/steps_unittest.py:
+
 2022-01-26  Elliott Williams  <e...@apple.com>
 
         Support workspace builds in build-webkit
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to