Bug 1350390: make fields that were unnecesarily optional, required; r=Callek

Docker-worker's `command` field is actually not required, as it will run a
docker image's default command when command is not specified.

MozReview-Commit-ID: I3vBHeixlxW
This commit is contained in:
Dustin J. Mitchell
2017-03-24 17:53:57 +00:00
parent 8e006d5c8e
commit c7ed7c16c7
2 changed files with 10 additions and 9 deletions

View File

@@ -201,11 +201,12 @@ task_description_schema = Schema({
# environment variables
Required('env', default={}): {basestring: taskref_or_string},
# the command to run
'command': [taskref_or_string],
# the command to run; if not given, docker-worker will default to the
# command in the docker image
Optional('command'): [taskref_or_string],
# the maximum time to run, in seconds
'max-run-time': int,
Required('max-run-time'): int,
# the exit status code that indicates the task should be retried
Optional('retry-exit-status'): int,
@@ -214,7 +215,7 @@ task_description_schema = Schema({
Required('implementation'): 'generic-worker',
# command is a list of commands to run, sequentially
'command': [taskref_or_string],
Required('command'): [taskref_or_string],
# artifacts to extract from the task image after completion; note that artifacts
# for the generic worker cannot have names
@@ -239,7 +240,7 @@ task_description_schema = Schema({
Required('env', default={}): {basestring: taskref_or_string},
# the maximum time to run, in seconds
'max-run-time': int,
Required('max-run-time'): int,
# os user groups for test task workers
Optional('os-groups', default=[]): [basestring],
@@ -248,14 +249,14 @@ task_description_schema = Schema({
# see
# https://github.com/mozilla/buildbot-bridge/blob/master/bbb/schemas/payload.yml
'buildername': basestring,
'sourcestamp': {
Required('buildername'): basestring,
Required('sourcestamp'): {
'branch': basestring,
Optional('revision'): basestring,
Optional('repository'): basestring,
Optional('project'): basestring,
},
'properties': {
Required('properties'): {
'product': basestring,
Extra: basestring, # additional properties are allowed
},