From 7ae58956f6a27ffb184cd61ac079fdf3b49eb187 Mon Sep 17 00:00:00 2001 From: "nodir@chromium.org" Date: Fri, 27 May 2016 22:12:22 +0000 Subject: [PATCH] bot_update: remove activation check for non-masters Cherry-pick https://codereview.chromium.org/2000403004/ to depot_tools's bot_update.py R=hinoka@chromium.org BUG=613641 Review-Url: https://codereview.chromium.org/2022453003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300670 0039d316-1c4b-4281-b951-d872f2087c98 --- recipe_modules/bot_update/resources/bot_update.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/recipe_modules/bot_update/resources/bot_update.py b/recipe_modules/bot_update/resources/bot_update.py index 906d9099f..897642f43 100755 --- a/recipe_modules/bot_update/resources/bot_update.py +++ b/recipe_modules/bot_update/resources/bot_update.py @@ -1457,7 +1457,9 @@ def parse_args(): parse.add_option('--gerrit_no_reset', action='store_true', help='Bypass calling reset after applying a gerrit ref.') parse.add_option('--specs', help='Gcilent spec.') - parse.add_option('--master', help='Master name.') + parse.add_option('--master', + help='Master name. If specified and it is not in ' + 'bot_update\'s whitelist, bot_update will be noop.') parse.add_option('-f', '--force', action='store_true', help='Bypass check to see if we want to be run. ' 'Should ONLY be used locally or by smart recipes.') @@ -1725,8 +1727,13 @@ def main(): slave = options.slave_name master = options.master + if not master: + # bot_update activation whitelist is checked only on buildbot masters. + # If there is no master, bot_update is always active. + options.force = True + # Check if this script should activate or not. - active = check_valid_host(master, builder, slave) or options.force or False + active = options.force or check_valid_host(master, builder, slave) # Print a helpful message to tell developers whats going on with this step. print_help_text(