Bug 1306421 - Don't use proxxy if running in TaskCluster; r=armenzg
authorGregory Szorc <gps@mozilla.com>
Thu, 29 Sep 2016 13:05:57 -0700
changeset 315801 7de011ec6e45a2e5019ecae87acacb8bb2a8f381
parent 315800 dcd89f87bf8601e6c40f2a361edc92c5d95b15e8
child 315802 42722bb6b23c21a26dd80b59289f4cca05b701e8
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarmenzg
bugs1306421
milestone52.0a1
Bug 1306421 - Don't use proxxy if running in TaskCluster; r=armenzg Proxxy is only configured in buildbot land. Don't enable it in TaskCluster. Ideally, we'd only enable proxxy if we detect we're in a buildbot environment. But the change in this commit is more conservative and aligns with existing behavior. MozReview-Commit-ID: HBCdQ6MkYGa
testing/mozharness/mozharness/base/script.py
testing/mozharness/mozharness/mozilla/proxxy.py
--- a/testing/mozharness/mozharness/base/script.py
+++ b/testing/mozharness/mozharness/base/script.py
@@ -1664,17 +1664,18 @@ class ScriptMixin(PlatformMixin):
                 self.log('%s (%s)' % (e.message, filename),
                          level=error_level, exit_code=fatal_exit_code)
         else:
             self.log('No extraction method found for: %s' % filename,
                      level=error_level, exit_code=fatal_exit_code)
 
     def is_taskcluster(self):
         """Returns boolean indicating if we're running in TaskCluster."""
-        return 'TASKCLUSTER_INSTANCE_TYPE' in os.environ
+        # This may need expanding in the future to work on
+        return 'TASKCLUSTER_WORKER_TYPE' in os.environ
 
 
 def PreScriptRun(func):
     """Decorator for methods that will be called before script execution.
 
     Each method on a BaseScript having this decorator will be called at the
     beginning of BaseScript.run().
 
--- a/testing/mozharness/mozharness/mozilla/proxxy.py
+++ b/testing/mozharness/mozharness/mozilla/proxxy.py
@@ -42,17 +42,18 @@ class Proxxy(ScriptMixin, LogMixin):
         "regions": [".use1.", ".usw2.", ".scl3"],
     }
 
     def __init__(self, config, log_obj):
         # proxxy does not need the need the full configuration,
         # just the 'proxxy' element
         # if configuration has no 'proxxy' section use the default
         # configuration instead
-        self.config = config.get('proxxy', self.PROXXY_CONFIG)
+        default_config = {} if self.is_taskcluster() else self.PROXXY_CONFIG
+        self.config = config.get('proxxy', default_config)
         self.log_obj = log_obj
 
     def get_proxies_for_url(self, url):
         """Maps url to its proxxy urls
 
            Args:
                url (str): url to be proxxied
            Returns: