From 7d5eadb37d47a085a957b83bc3e56ebed1150d0d Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Mon, 31 Oct 2016 11:20:15 -0400 Subject: [PATCH 1/2] Clean up indentation This style avoid spurious line diff noise, since all indents are multiples of 4. --- buildbot/master/files/config/factories.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/buildbot/master/files/config/factories.py b/buildbot/master/files/config/factories.py index 277f4685..97e8c237 100644 --- a/buildbot/master/files/config/factories.py +++ b/buildbot/master/files/config/factories.py @@ -25,8 +25,10 @@ def __init__(self, build_steps): Prefer using DynamicServoFactory to using this class directly. """ all_steps = [ - steps.Git(repourl=SERVO_REPO, - mode="full", method="fresh", retryFetch=True), + steps.Git( + repourl=SERVO_REPO, + mode="full", method="fresh", retryFetch=True + ), ] + build_steps # util.BuildFactory is an old-style class so we cannot use super() # but must hardcode the superclass here @@ -76,8 +78,9 @@ def run(self): else: builder_steps = yaml.safe_load(cmd.stdout) commands = builder_steps[self.builder_name] - dynamic_steps = [self.make_step(command) - for command in commands] + dynamic_steps = [ + self.make_step(command) for command in commands + ] except Exception as e: # Bad step configuration, fail build # Capture the exception and re-raise with a friendly message raise Exception("Bad step configuration for {}: {}".format( From 37f946f7f05aebf85d7eeadda9eb7a29c31ff4ec Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Mon, 31 Oct 2016 11:20:46 -0400 Subject: [PATCH 2/2] Re-add logic to provide Homebrew upload token This was added to the previous `make_step` implementation, but apparently was not copied over to this implementation, causing our Homebrew uploads to fail for the last 4 days. Re-add this logic. Note that because adding the token to the environment and telling Buildbot not to log the environment are configured together, the token was not leaked during this time. --- buildbot/master/files/config/factories.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildbot/master/files/config/factories.py b/buildbot/master/files/config/factories.py index 97e8c237..38a2b7ae 100644 --- a/buildbot/master/files/config/factories.py +++ b/buildbot/master/files/config/factories.py @@ -195,6 +195,11 @@ def make_step(self, command): r'C:\Program Files\Amazon\cfn-bootstrap', ]) + # Set token for homebrew repository + elif arg == './etc/ci/update_brew.sh': + step_kwargs['logEnviron'] = False + step_env += envs.update_brew + else: step_desc += [arg]