You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We'd like to use yadage-validate in Travis CI recipes. I noticed that yadage always returns exit code 0 even in case of failures.
Example with good YAML:
$ yadage-validate world_population_analysis.yaml workflow validates against schema
$ echo$?0
Example with bad YAML:
$ yadage-validate invalid.yaml ERROR:yadage.validator_workflow:validation errorTraceback (most recent call last): File "/home/simko/.virtualenvs/yadage/lib/python2.7/site-packages/yadage/validator_workflow.py", line 36, in main workflow, toplevel=toplevel, schemadir=schemadir, validate=True) File "/home/simko/.virtualenvs/yadage/lib/python2.7/site-packages/yadage/workflow_loader.py", line 5, in workflow data = yadageschemas.load(source, toplevel, schema_name, schemadir, validate) File "/home/simko/.virtualenvs/yadage/lib/python2.7/site-packages/yadageschemas/__init__.py", line 172, in load validator(schema_name,schemadir).validate(data) File "/home/simko/.virtualenvs/yadage/lib/python2.7/site-packages/jsonschema/validators.py", line 130, in validate raise errorValidationError: {'step': {'process': {'cmd': 'jupyter nbconvert --output-dir="{outputdir}" world_population_analysis.ipynb', 'process_type': 'string-interpolated-cmd'}, 'publisher': {'publisher_type': 'frompar-pub', 'outputmap': {'outputfile': 'outputfile'}}, 'environment': {u'imagetag': u'latest', 'image': 'reanahub/reana-demo-worldpopulation', u'envscript': u'', 'environment_type': 'docker-encapsulated', u'env': {}, u'resources': []}}, 'scheduler_type': 'singlestep-stage', 'parameters': None} is not valid under any of the given schemasFailed validating u'oneOf' in schema[u'properties'][u'stages'][u'items'][u'properties'][u'scheduler']: {u'oneOf': [{u'$ref': u'scheduler/singlestep-stage-schema.json#'}, {u'$ref': u'scheduler/multistep-stage-schema.json#'}], u'type': u'object'}On instance[u'stages'][0][u'scheduler']: {'parameters': None, 'scheduler_type': 'singlestep-stage', 'step': {'environment': {u'env': {}, 'environment_type': 'docker-encapsulated', u'envscript': u'', 'image': 'reanahub/reana-demo-worldpopulation', u'imagetag': u'latest', u'resources': []}, 'process': {'cmd': 'jupyter nbconvert --output-dir="{outputdir}" world_population_analysis.ipynb', 'process_type': 'string-interpolated-cmd'}, 'publisher': {'outputmap': {'outputfile': 'outputfile'}, 'publisher_type': 'frompar-pub'}}}workflow does not validate against schema
$ echo$?0
It would be more comfortable if yadage-validate returned 0 when things are OK and 1 otherwise, as is the usual convention with other validating programs.
The text was updated successfully, but these errors were encountered:
We'd like to use
yadage-validate
in Travis CI recipes. I noticed that yadage always returns exit code 0 even in case of failures.Example with good YAML:
Example with bad YAML:
It would be more comfortable if
yadage-validate
returned 0 when things are OK and 1 otherwise, as is the usual convention with other validating programs.The text was updated successfully, but these errors were encountered: