Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: recipe_modules/bot_update/resources/bot_update.py

Issue 2022453003: bot_update: remove activation check for non-masters (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/bot_update/resources/bot_update.py
diff --git a/recipe_modules/bot_update/resources/bot_update.py b/recipe_modules/bot_update/resources/bot_update.py
index 906d9099f7be77c9a4b3acff3fe5a1f48ab2a53b..897642f438051ba31b00b2687b06915611739ae9 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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698