Bug 1375044: remove temporary load-balancing check; r?wcosta
MozReview-Commit-ID: 7oy5C9KSpvR
--- a/taskcluster/taskgraph/transforms/tests.py
+++ b/taskcluster/taskgraph/transforms/tests.py
@@ -30,18 +30,16 @@ from taskgraph.util.schema import (
from voluptuous import (
Any,
Optional,
Required,
)
import copy
import logging
-import requests
-from collections import defaultdict
# default worker types keyed by instance-size
LINUX_WORKER_TYPES = {
'large': 'aws-provisioner-v1/gecko-t-linux-large',
'xlarge': 'aws-provisioner-v1/gecko-t-linux-xlarge',
'legacy': 'aws-provisioner-v1/gecko-t-linux-medium',
'default': 'aws-provisioner-v1/gecko-t-linux-large',
}
@@ -721,43 +719,16 @@ def set_worker_type(config, tests):
test['worker-type'] = LINUX_WORKER_TYPES[test['instance-size']]
else:
raise Exception("unknown test_platform {}".format(test_platform))
yield test
@transforms.add
-def allocate_to_bbb(config, tests):
- """Make the load balancing between taskcluster and buildbot"""
- j = get_load_balacing_settings()
-
- tests_set = defaultdict(list)
- for test in tests:
- tests_set[test['test-platform']].append(test)
-
- # Make the load balancing between taskcluster and buildbot
- for test_platform, t in tests_set.iteritems():
- # We sort the list to make the order of the tasks deterministic
- t.sort(key=lambda x: (x['test-name'], x.get('this_chunk', 1)))
- # The json file tells the percentage of tasks that run on
- # taskcluster. The logic here is inverted, as tasks have been
- # previously assigned to taskcluster. Therefore we assign the
- # 1-p tasks to buildbot-bridge.
- n = j.get(test_platform, 1.0)
- if not (test_platform.startswith('mac')
- and config.config['args'].taskcluster_worker):
- for i in range(int(n * len(t)), len(t)):
- t[i]['worker-type'] = 'buildbot-bridge/buildbot-bridge'
-
- for y in t:
- yield y
-
-
-@transforms.add
def make_job_description(config, tests):
"""Convert *test* descriptions to *job* descriptions (input to
taskgraph.transforms.job)"""
for test in tests:
label = '{}-{}-{}'.format(config.kind, test['test-platform'], test['test-name'])
if test['chunks'] > 1:
label += '-{}'.format(test['this-chunk'])
@@ -835,16 +806,8 @@ def make_job_description(config, tests):
def normpath(path):
return path.replace('/', '\\')
def get_firefox_version():
with open('browser/config/version.txt', 'r') as f:
return f.readline().strip()
-
-
-def get_load_balacing_settings():
- url = "https://s3.amazonaws.com/taskcluster-graph-scheduling/tests-load.json"
- try:
- return requests.get(url).json()
- except Exception:
- return {}