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
--- 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: