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

Unified Diff: appengine/findit/waterfall/waterfall_config.py

Issue 1497783003: [Findit] Use Findit's own versioned config. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@versioned_model
Patch Set: Created 5 years 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 | « appengine/findit/waterfall/test/waterfall_config_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/waterfall/waterfall_config.py
diff --git a/appengine/findit/waterfall/waterfall_config.py b/appengine/findit/waterfall/waterfall_config.py
index 899fdb53efc79544bd4ccdde993f5a2a1885169a..a9d0295a6ea5d2c3e73bd65ed4750e72530c0109 100644
--- a/appengine/findit/waterfall/waterfall_config.py
+++ b/appengine/findit/waterfall/waterfall_config.py
@@ -4,7 +4,7 @@
"""Determines support level for different steps for masters."""
-from model import wf_config
+from model.wf_config import FinditConfig
# Explicitly list unsupported masters. Additional work might be needed in order
# to support them.
@@ -21,7 +21,7 @@ _UNSUPPORTED_MASTERS = [
def MasterIsSupported(master_name):
"""Return True if the given master is supported, otherwise False."""
- return master_name in wf_config.Settings().masters_to_blacklisted_steps.keys()
+ return master_name in FinditConfig.Get().masters_to_blacklisted_steps.keys()
def StepIsSupportedForMaster(step_name, master_name):
@@ -35,8 +35,7 @@ def StepIsSupportedForMaster(step_name, master_name):
True if Findit supports analyzing the failure, False otherwise. If a master
is not supported, then neither are any of its steps.
"""
- config = wf_config.Settings()
- masters_to_blacklisted_steps = config.masters_to_blacklisted_steps
+ masters_to_blacklisted_steps = FinditConfig.Get().masters_to_blacklisted_steps
blacklisted_steps = masters_to_blacklisted_steps.get(master_name)
if blacklisted_steps is None:
return False
@@ -57,7 +56,6 @@ def GetTrybotForWaterfallBuilder(wf_mastername, wf_buildername):
configuration as the given waterfall builder. If the given waterfall builder
is not supported yet, (None, None) is returned instead.
"""
- config = wf_config.Settings()
- trybot_config = config.builders_to_trybots.get(
+ trybot_config = FinditConfig.Get().builders_to_trybots.get(
wf_mastername, {}).get(wf_buildername, {})
return trybot_config.get('mastername'), trybot_config.get('buildername')
« no previous file with comments | « appengine/findit/waterfall/test/waterfall_config_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698