Bug 1337360: remove unnecessary schema for attributes; r?Callek
MozReview-Commit-ID: H3TXMIUn7OT
--- a/taskcluster/taskgraph/transforms/l10n.py
+++ b/taskcluster/taskgraph/transforms/l10n.py
@@ -19,17 +19,16 @@ from taskgraph.util.schema import (
optionally_keyed_by,
resolve_keyed_by,
Schema,
)
from taskgraph.util.treeherder import split_symbol, join_symbol
from taskgraph.transforms.job import job_description_schema
from voluptuous import (
Any,
- Extra,
Optional,
Required,
)
def _by_platform(arg):
return optionally_keyed_by('build-platform', arg)
@@ -98,27 +97,16 @@ l10n_description_schema = Schema({
Required('platform'): _by_platform(basestring),
# Symbol to use
Required('symbol'): basestring,
# Tier this task is
Required('tier'): _by_platform(int),
},
- Required('attributes'): {
- # Is this a nightly task, inferred from dependent job before validation
- Optional('nightly'): bool,
-
- # build_platform of this task, inferred from dependent job before validation
- Required('build_platform'): basestring,
-
- # build_type for this task, inferred from dependent job before validation
- Required('build_type'): basestring,
- Extra: object,
- },
# Extra environment values to pass to the worker
Optional('env'): _by_platform({basestring: taskref_or_string}),
# Number of chunks to split the locale repacks up into
Optional('chunks'): _by_platform(int),
# Task deps to chain this task with, added in transforms from dependent-task
@@ -126,16 +114,17 @@ l10n_description_schema = Schema({
Optional('dependencies'): {basestring: basestring},
# Run the task when the listed files change (if present).
Optional('when'): {
'files-changed': [basestring]
},
# passed through directly to the job description
+ Optional('attributes'): job_description_schema['attributes'],
Optional('extra'): job_description_schema['extra'],
})
transforms = TransformSequence()
def _parse_locales_file(locales_file, platform=None):
""" Parse the passed locales file for a list of locales.
--- a/taskcluster/taskgraph/util/schema.py
+++ b/taskcluster/taskgraph/util/schema.py
@@ -130,19 +130,16 @@ def resolve_keyed_by(item, field, item_n
keyed_by, key, field, item_name))
# Schemas for YAML files should use dashed identifiers by default. If there are
# components of the schema for which there is a good reason to use another format,
# they can be whitelisted here.
WHITELISTED_SCHEMA_IDENTIFIERS = [
# upstream-artifacts are handed directly to scriptWorker, which expects interCaps
lambda path: "[u'upstream-artifacts']" in path,
-
- # attributes (TODO)
- lambda path: path.startswith("schema[u'attributes']"),
]
def check_schema(schema):
identifier_re = re.compile('^[a-z][a-z0-9-]*$')
def whitelisted(path):
return any(f(path) for f in WHITELISTED_SCHEMA_IDENTIFIERS)