Bug 1374940 - Cleanup how toolchain names are derived from task labels. r?dustin
We don't need to hardcode that they are prefixed with "toolchain-", when
they, in fact, are prefixed with the name of the kind being handled.
Also, we used to need to remove a /opt suffix, but
bug 1345863 removed
those suffixes, so we don't need to remove it anymore.
--- a/taskcluster/taskgraph/transforms/job/toolchain.py
+++ b/taskcluster/taskgraph/transforms/job/toolchain.py
@@ -46,17 +46,17 @@ def add_optimizations(config, run, taskd
files = list(run.get('resources', []))
# This file
files.append('taskcluster/taskgraph/transforms/job/toolchain.py')
# The script
files.append('taskcluster/scripts/misc/{}'.format(run['script']))
label = taskdesc['label']
subs = {
- 'name': label.replace('toolchain-', '').split('/')[0],
+ 'name': label.replace('%s-' % config.kind, ''),
'digest': hash_paths(GECKO, files),
}
optimizations = taskdesc.setdefault('optimizations', [])
# We'll try to find a cached version of the toolchain at levels above
# and including the current level, starting at the highest level.
for level in reversed(range(int(config.params['level']), 4)):