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

Unified Diff: infra/tools/builder_alerts/gatekeeper_extras.py

Issue 508873005: Reimplemented tree_for_master, which now uses gatekeeper config files to map master URLs to the tre… (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 6 years, 4 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
Index: infra/tools/builder_alerts/gatekeeper_extras.py
diff --git a/infra/tools/builder_alerts/gatekeeper_extras.py b/infra/tools/builder_alerts/gatekeeper_extras.py
index c0cd3f831cf932f3cd91a33de37a30c10ce0064e..45a8c924482169f3f7ae18615844818099a8b5cc 100644
--- a/infra/tools/builder_alerts/gatekeeper_extras.py
+++ b/infra/tools/builder_alerts/gatekeeper_extras.py
@@ -11,31 +11,14 @@ def excluded_builders(master_config):
return master_config[0].get('*', {}).get('excluded_builders', set())
-# pylint: disable=C0301
-# FIXME: This is currently baked into:
-# https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/slave/gatekeeper_launch.py
-# http://crbug.com/394961
-MASTER_CONFIG = {
- 'chromium-status': [
- 'chromium',
- 'chromium.chrome',
- 'chromium.chromiumos',
- 'chromium.gpu',
- 'chromium.linux',
- 'chromium.mac',
- 'chromium.memory',
- 'chromium.win',
- ],
- 'blink-status': [
- 'chromium.webkit',
- ],
-}
-
-
-def tree_for_master(master_name):
- for tree_name, master_names in MASTER_CONFIG.items():
- if master_name in master_names:
+def tree_for_master(master_url, gatekeeper_trees_config):
+ """Returns name of the tree for a given master or None if failed to detect."""
+ for tree_name, tree_config in gatekeeper_trees_config.iteritems():
+ if tree_name == 'non-closers':
ojan 2014/08/28 03:34:15 Lets include the non-closers as a tree name for no
Sergiy Byelozyorov 2014/08/28 17:45:58 Done.
+ continue
+ if master_url in tree_config['masters']:
return tree_name
+ return None
ojan 2014/08/28 03:34:15 Instead of returning None, lets return the last bi
Sergiy Byelozyorov 2014/08/28 17:45:58 Done.
def would_close_tree(master_config, builder_name, step_name):
« infra/tools/builder_alerts/__main__.py ('K') | « infra/tools/builder_alerts/__main__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698