Bug 1359976: clean out un-handled optionally_keyed_by; r=wcosta draft
authorDustin J. Mitchell <dustin@mozilla.com>
Fri, 05 May 2017 19:04:48 +0000
changeset 586628 af4c1e3311035880a4d7e4515fa119cb0628dd7d
parent 586626 fbe0e3f31233cc7846a2168c613452a1d7147cc2
child 586629 56f69a946970e5c8c37b4aea1374e4ac31b48600
push id61474
push userdmitchell@mozilla.com
push dateTue, 30 May 2017 20:40:03 +0000
reviewerswcosta
bugs1359976
milestone55.0a1
Bug 1359976: clean out un-handled optionally_keyed_by; r=wcosta While this was allowed by the schema, it would never be resolved, and was unused. MozReview-Commit-ID: LIxJmr9ZSdK
taskcluster/taskgraph/transforms/job/__init__.py
--- a/taskcluster/taskgraph/transforms/job/__init__.py
+++ b/taskcluster/taskgraph/transforms/job/__init__.py
@@ -14,17 +14,16 @@ from __future__ import absolute_import, 
 import copy
 import logging
 import os
 
 from taskgraph.transforms.base import TransformSequence
 from taskgraph.util.schema import (
     validate_schema,
     Schema,
-    optionally_keyed_by,
 )
 from taskgraph.transforms.task import task_description_schema
 from voluptuous import (
     Any,
     Extra,
     Optional,
     Required,
 )
@@ -76,27 +75,24 @@ job_description_schema = Schema({
         # The key to a job implementation in a peer module to this one
         'using': basestring,
 
         # Any remaining content is verified against that job implementation's
         # own schema.
         Extra: object,
     },
 
-    Required('worker-type'): optionally_keyed_by(
-        'platform',
-        task_description_schema['worker-type']),
+    Required('worker-type'): task_description_schema['worker-type'],
 
     # for `worker`, all we need is the implementation; the rest will be verified
     # by the task description schema
-    Required('worker'): optionally_keyed_by(
-        'platform', {
-            Required('implementation'): basestring,
-            Extra: object,
-        }),
+    Required('worker'): {
+        Required('implementation'): basestring,
+        Extra: object,
+    },
 })
 
 transforms = TransformSequence()
 
 
 @transforms.add
 def validate(config, jobs):
     for job in jobs: