[ews-build] Do not print worker environment variables in each build step
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Jun 2019 16:10:01 +0000 (16:10 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Jun 2019 16:10:01 +0000 (16:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197319

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(CheckOutSource.__init__): Disabled logging of environment variables.
(ApplyPatch.__init__): Ditto.
(KillOldProcesses.__init__): Ditto.
(ArchiveBuiltProduct.__init__): Ditto.
(DownloadBuiltProduct.__init__): Ditto.
(ExtractBuiltProduct.__init__): Ditto.
(RunAPITests.__init__): Ditto.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests accordingly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246882 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-build/steps.py
Tools/BuildSlaveSupport/ews-build/steps_unittest.py
Tools/ChangeLog

index 5c68940..a3fd7ea 100644 (file)
@@ -96,6 +96,7 @@ class CheckOutSource(git.Git):
                                                 retry=self.CHECKOUT_DELAY_AND_MAX_RETRIES_PAIR,
                                                 timeout=2 * 60 * 60,
                                                 alwaysUseLatest=True,
+                                                logEnviron=False,
                                                 method='clean',
                                                 progress=True,
                                                 **kwargs)
@@ -141,6 +142,9 @@ class ApplyPatch(shell.ShellCommand, CompositeStepMixin):
     haltOnFailure = True
     command = ['Tools/Scripts/svn-apply', '--force', '.buildbot-diff']
 
+    def __init__(self, **kwargs):
+        super(ApplyPatch, self).__init__(timeout=5 * 60, logEnviron=False, **kwargs)
+
     def _get_patch(self):
         sourcestamp = self.build.getSourceStamp(self.getProperty('codebase', ''))
         if not sourcestamp or not sourcestamp.patch:
@@ -761,7 +765,7 @@ class KillOldProcesses(shell.Compile):
     command = ['python', 'Tools/BuildSlaveSupport/kill-old-processes', 'buildbot']
 
     def __init__(self, **kwargs):
-        super(KillOldProcesses, self).__init__(timeout=60, **kwargs)
+        super(KillOldProcesses, self).__init__(timeout=60, logEnviron=False, **kwargs)
 
 
 class RunWebKitTests(shell.Test):
@@ -841,6 +845,9 @@ class ArchiveBuiltProduct(shell.ShellCommand):
     descriptionDone = ['Archived built product']
     haltOnFailure = True
 
+    def __init__(self, **kwargs):
+        super(ArchiveBuiltProduct, self).__init__(logEnviron=False, **kwargs)
+
 
 class UploadBuiltProduct(transfer.FileUpload):
     name = 'upload-built-product'
@@ -920,6 +927,9 @@ class DownloadBuiltProduct(shell.ShellCommand):
             return {u'step': u'Failed to download built product from S3'}
         return super(DownloadBuiltProduct, self).getResultSummary()
 
+    def __init__(self, **kwargs):
+        super(DownloadBuiltProduct, self).__init__(logEnviron=False, **kwargs)
+
 
 class ExtractBuiltProduct(shell.ShellCommand):
     command = ['python', 'Tools/BuildSlaveSupport/built-product-archive',
@@ -930,6 +940,9 @@ class ExtractBuiltProduct(shell.ShellCommand):
     haltOnFailure = True
     flunkOnFailure = True
 
+    def __init__(self, **kwargs):
+        super(ExtractBuiltProduct, self).__init__(logEnviron=False, **kwargs)
+
 
 class RunAPITests(TestWithFailureCount):
     name = 'run-api-tests'
@@ -941,6 +954,9 @@ class RunAPITests(TestWithFailureCount):
                WithProperties('--%(configuration)s'), '--verbose', '--json-output={0}'.format(jsonFileName)]
     failedTestsFormatString = '%d api test%s failed or timed out'
 
+    def __init__(self, **kwargs):
+        super(RunAPITests, self).__init__(logEnviron=False, **kwargs)
+
     def start(self):
         appendCustomBuildFlags(self, self.getProperty('platform'), self.getProperty('fullPlatform'))
         return TestWithFailureCount.start(self)
index cf0b144..6417f69 100644 (file)
@@ -413,6 +413,7 @@ class TestKillOldProcesses(BuildStepMixinAdditions, unittest.TestCase):
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         command=['python', 'Tools/BuildSlaveSupport/kill-old-processes', 'buildbot'],
+                        logEnviron=False,
                         timeout=60,
                         )
             + 0,
@@ -425,6 +426,7 @@ class TestKillOldProcesses(BuildStepMixinAdditions, unittest.TestCase):
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         command=['python', 'Tools/BuildSlaveSupport/kill-old-processes', 'buildbot'],
+                        logEnviron=False,
                         timeout=60,
                         )
             + ExpectShell.log('stdio', stdout='Unexpected error.')
@@ -1002,6 +1004,7 @@ class TestArchiveBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/BuildSlaveSupport/built-product-archive', '--platform=ios-simulator',  '--release', 'archive'],
                         )
             + 0,
@@ -1015,6 +1018,7 @@ class TestArchiveBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'debug')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/BuildSlaveSupport/built-product-archive', '--platform=mac-sierra',  '--debug', 'archive'],
                         )
             + ExpectShell.log('stdio', stdout='Unexpected failure.')
@@ -1091,6 +1095,7 @@ class TestDownloadBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('patch_id', '1234')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/BuildSlaveSupport/download-built-product', '--release', 'https://s3-us-west-2.amazonaws.com/ews-archives.webkit.org/ios-simulator-12-x86_64-release/1234.zip'],
                         )
             + 0,
@@ -1106,6 +1111,7 @@ class TestDownloadBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('patch_id', '123456')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/BuildSlaveSupport/download-built-product', '--debug', 'https://s3-us-west-2.amazonaws.com/ews-archives.webkit.org/mac-sierra-x86_64-debug/123456.zip'],
                         )
             + ExpectShell.log('stdio', stdout='Unexpected failure.')
@@ -1129,6 +1135,7 @@ class TestExtractBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/BuildSlaveSupport/built-product-archive', '--platform=ios-simulator',  '--release', 'extract'],
                         )
             + 0,
@@ -1142,6 +1149,7 @@ class TestExtractBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
         self.setProperty('configuration', 'debug')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/BuildSlaveSupport/built-product-archive', '--platform=mac-sierra',  '--debug', 'extract'],
                         )
             + ExpectShell.log('stdio', stdout='Unexpected failure.')
@@ -1213,6 +1221,7 @@ class TestRunAPITests(BuildStepMixinAdditions, unittest.TestCase):
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--release', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
                         logfiles={'json': self.jsonFileName},
                         )
@@ -1240,6 +1249,7 @@ All tests successfully passed!
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName), '--ios-simulator'],
                         logfiles={'json': self.jsonFileName},
                         )
@@ -1267,6 +1277,7 @@ All tests successfully passed!
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
                         logfiles={'json': self.jsonFileName},
                         )
@@ -1308,6 +1319,7 @@ Testing completed, Exit status: 3
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
                         logfiles={'json': self.jsonFileName},
                         )
@@ -1363,6 +1375,7 @@ Testing completed, Exit status: 3
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
                         logfiles={'json': self.jsonFileName},
                         )
@@ -1380,6 +1393,7 @@ Testing completed, Exit status: 3
 
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
+                        logEnviron=False,
                         command=['python', 'Tools/Scripts/run-api-tests', '--no-build', '--debug', '--verbose', '--json-output={0}'.format(self.jsonFileName)],
                         logfiles={'json': self.jsonFileName},
                         )
index 544e4a5..acaec8b 100644 (file)
@@ -1,3 +1,20 @@
+2019-06-27  Aakash Jain  <aakash_jain@apple.com>
+
+        [ews-build] Do not print worker environment variables in each build step
+        https://bugs.webkit.org/show_bug.cgi?id=197319
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (CheckOutSource.__init__): Disabled logging of environment variables.
+        (ApplyPatch.__init__): Ditto.
+        (KillOldProcesses.__init__): Ditto.
+        (ArchiveBuiltProduct.__init__): Ditto.
+        (DownloadBuiltProduct.__init__): Ditto.
+        (ExtractBuiltProduct.__init__): Ditto.
+        (RunAPITests.__init__): Ditto.
+        * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests accordingly.
+
 2019-06-26  Jiewen Tan  <jiewen_tan@apple.com>
 
         SubFrameSOAuthorizationSession should preserve the referrer header when fall back to web path