Bug 1589706: Add support worker worker-manager pool aliases; r=Callek

Differential Revision: https://phabricator.services.mozilla.com/D49763

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Prince 2019-10-18 16:04:30 +00:00
Родитель 628d9226b6
Коммит 0a330e3a6f
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -79,7 +79,7 @@ graph_config_schema = Schema({
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),

Просмотреть файл

@ -63,6 +63,10 @@ def _get(graph_config, alias, level):
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),