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