In case if we are creating the WF:
---
version: '2.0'
my_wf:
tasks:
task1:
action: std.echo output="Hi Mistral!"
on-success: task3
task2:
action: std.noop
the error message is "task3 is not found" which looks very good and precise.
But if, for example, we specify a wrong workflow type like:
---
version: '2.0'
my_wf:
type: blablabla
tasks:
task1:
action: std.echo output="Hi Mistral!"
the error message is too large and the modal window layout breaks. The message in this case is like:
Invalid DSL: 'blabla' is not of type 'object' Failed validating 'type' in schema['properties']['tasks']['patternProperties']['^\\w+$']: {'additionalProperties': False, 'anyOf': [{'not': {'required': ['action', 'workflow'], 'type': 'object'}}, {'oneOf': [{'required': ['action'], 'type': 'object'}, {'required': ['workflow'], 'type': 'object'}]}], 'properties': {'action': {'minLength': 1, 'type': 'string'}, 'concurrency': {'oneOf': [{'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, {'minimum': 0, 'type': 'integer'}]}, 'description': {'minLength': 1, 'type': 'string'}, 'input': {'minProperties': 1, 'patternProperties': {'^\\w+$': {'anyOf': [{'type': 'null'}, {'type': 'array'}, {'type': 'boolean'}, {'type': 'integer'}, {'type': 'number'}, {'type': 'object'}, {'type': 'string'}]}}, 'type': 'object'}, 'join': {'oneOf': [{'enum': ['all', 'one']}, {'minimum': 0, 'type': 'integer'}]}, 'keep-result': {'oneOf': [{'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, {'type': 'boolean'}]}, 'name': {'minLength': 1, 'type': 'string'}, 'on-complete': {'oneOf': [{'minLength': 1, 'type': 'string'}, {'items': {'oneOf': [{'minLength': 1, 'type': 'string'}, {'minProperties': 1, 'patternProperties': {'^\\w+$': {'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}}, 'type': 'object'}]}, 'minItems': 1, 'type': 'array', 'uniqueItems': True}]}, 'on-error': {'oneOf': [{'minLength': 1, 'type': 'string'}, {'items': {'oneOf': [{'minLength': 1, 'type': 'string'}, {'minProperties': 1, 'patternProperties': {'^\\w+$': {'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}}, 'type': 'object'}]}, 'minItems': 1, 'type': 'array', 'uniqueItems': True}]}, 'on-success': {'oneOf': [{'minLength': 1, 'type': 'string'}, {'items': {'oneOf': [{'minLength': 1, 'type': 'string'}, {'minProperties': 1, 'patternProperties': {'^\\w+$': {'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}}, 'type': 'object'}]}, 'minItems': 1, 'type': 'array', 'uniqueItems': True}]}, 'pause-before': {'oneOf': [{'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, {'type': 'boolean'}]}, 'publish': {'minProperties': 1, 'patternProperties': {'^\\w+$': {'anyOf': [{'type': 'null'}, {'type': 'array'}, {'type': 'boolean'}, {'type': 'integer'}, {'type': 'number'}, {'type': 'object'}, {'type': 'string'}]}}, 'type': 'object'}, 'publish-on-error': {'minProperties': 1, 'patternProperties': {'^\\w+$': {'anyOf': [{'type': 'null'}, {'type': 'array'}, {'type': 'boolean'}, {'type': 'integer'}, {'type': 'number'}, {'type': 'object'}, {'type': 'string'}]}}, 'type': 'object'}, 'retry': {'oneOf': [{'additionalProperties': False, 'properties': {'break-on': {'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, 'continue-on': {'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, 'count': {'oneOf': [{'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, {'minimum': 0, 'type': 'integer'}]}, 'delay': {'oneOf': [{'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, {'minimum': 0, 'type': 'integer'}]}}, 'required': ['delay', 'count'], 'type': 'object'}, {'minLength': 1, 'type': 'string'}], 'properties': {'description': {'minLength': 1, 'type': 'string'}, 'name': {'minLength': 1, 'type': 'string'}, 'tags': {'items': {'minLength': 1, 'type': 'string'}, 'minItems': 1, 'type': 'array', 'uniqueItems': True}, 'version': {'anyOf': [{'minLength': 1, 'type': 'string'}, {'minimum': 0, 'type': 'integer'}, {'minimum': 0.0, 'type': 'number'}]}}}, 'safe-rerun': {'oneOf': [{'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, {'type': 'boolean'}]}, 'tags': {'items': {'minLength': 1, 'type': 'string'}, 'minItems': 1, 'type': 'array', 'uniqueItems': True}, 'target': {'minLength': 1, 'type': 'string'}, 'timeout': {'oneOf': [{'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, {'minimum': 0, 'type': 'integer'}]}, 'type': {'enum': ['direct']}, 'version': {'anyOf': [{'minLength': 1, 'type': 'string'}, {'minimum': 0, 'type': 'integer'}, {'minimum': 0.0, 'type': 'number'}]}, 'wait-after': {'oneOf': [{'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, {'minimum': 0, 'type': 'integer'}]}, 'wait-before': {'oneOf': [{'oneOf': [{'pattern': '^({{(.*)?}})\\s*$', 'type': 'string'}, {'pattern': '^<%.*?%>\\s*$', 'type': 'string'}]}, {'minimum': 0, 'type': 'integer'}]}, 'with-items': {'oneOf': [{'minLength': 1, 'type': 'string'}, {'items': {'minLength': 1, 'type': 'string'}, 'minItems': 1, 'type': 'array', 'uniqueItems': True}]}, 'workflow': {'minLength': 1, 'type': 'string'}}, 'type': 'object'} On instance['tasks']['type']: 'blabla'
Ideally, it would be cool to retain only "Invalid DSL: 'blabla' is not of type 'object' Failed validating 'type'".
Hi Renat,
This is the error message i got when i tried the same template.