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): |