Bug 1589706: Add support worker worker-manager pool aliases; r=Callek
authorTom Prince <mozilla@hocat.ca>
Fri, 18 Oct 2019 16:04:30 +0000
changeset 555688 62f9b9b6937012b9f364712c1efd133be52226cd
parent 555687 e4d97579fc7940d76627098056c28d31cfca3b9a
child 555689 9c0e044e27e9d85225e300bf90f46766169c83bc
push id2188
push usermozilla@hocat.ca
push dateSat, 09 Nov 2019 00:47:50 +0000
treeherdermozilla-release@964ff679f60d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1589706
milestone70.0.2
Bug 1589706: Add support worker worker-manager pool aliases; r=Callek Differential Revision: https://phabricator.services.mozilla.com/D49763
taskcluster/taskgraph/config.py
taskcluster/taskgraph/util/workertypes.py
--- a/taskcluster/taskgraph/config.py
+++ b/taskcluster/taskgraph/config.py
@@ -74,17 +74,17 @@ graph_config_schema = Schema({
                                 Any(basestring, None)),
         Required('release-eme-free-repack'):
             optionally_keyed_by('release-product', 'release-level', 'release-type',
                                 Any(basestring, None)),
     },
     Required('workers'): {
         Required('aliases'): {
             text_type: {
-                Required('provisioner'): text_type,
+                Required('provisioner'): optionally_keyed_by('level', text_type),
                 Required('implementation'): text_type,
                 Required('os'): text_type,
                 Required('worker-type'): optionally_keyed_by('level', text_type),
             }
         },
     },
     Required('mac-notarization'): {
         Required('mac-behavior'):
--- a/taskcluster/taskgraph/util/workertypes.py
+++ b/taskcluster/taskgraph/util/workertypes.py
@@ -57,16 +57,20 @@ def _get(graph_config, alias, level):
 
     matches = keymatch(graph_config['workers']['aliases'], alias)
     if len(matches) > 1:
         raise KeyError("Multiple matches for worker-type alias " + alias)
     elif not matches:
         raise KeyError("No matches for worker-type alias " + alias)
     worker_config = matches[0].copy()
 
+    worker_config['provisioner'] = evaluate_keyed_by(
+        worker_config['provisioner'],
+        "worker-type alias {} field provisioner".format(alias),
+        {"level": level}).format(level=level, alias=alias)
     worker_config['worker-type'] = evaluate_keyed_by(
         worker_config['worker-type'],
         "worker-type alias {} field worker-type".format(alias),
         {"level": level}).format(level=level, alias=alias)
 
     return worker_config