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

Unified Diff: scripts/slave/recipe_modules/perf_dashboard/api.py

Issue 2427763002: Remove use of "use_mirror" recipe property. (Closed)
Patch Set: Created 4 years, 2 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 | scripts/slave/recipe_modules/perf_dashboard/example.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/perf_dashboard/api.py
diff --git a/scripts/slave/recipe_modules/perf_dashboard/api.py b/scripts/slave/recipe_modules/perf_dashboard/api.py
index 8caa6250f033ce9e3a565d909a08a1b3e2e502f6..df4e9d5ba4fe622947cd662c4e5b9506b9fe304c 100644
--- a/scripts/slave/recipe_modules/perf_dashboard/api.py
+++ b/scripts/slave/recipe_modules/perf_dashboard/api.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import os
import urllib
from recipe_engine import recipe_api
@@ -55,7 +56,14 @@ class PerfDashboardApi(recipe_api.RecipeApi):
def set_default_config(self):
"""If in golo, use real perf server, otherwise use testing perf server."""
- if self.m.properties.get('use_mirror', True): # We're on a bot
+ # TODO: This property should be passed explicitly supplied by the recipe
+ # scheduler, not inferred from arbitrary bot environment.
+ on_production_bot = self.m.properties.get('perf_production',
+ not any(v in os.environ for v in (
+ 'TESTING_MASTERNAME',
+ 'TESTING_SLAVENAME',
+ )))
+ if on_production_bot: # We're on a bot
self.set_config('production')
else:
self.set_config('testing')
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/perf_dashboard/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698