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
A common problem that consumers of WDL face is the need to perform input validation at both the tasks and the workflow level. The current status quo requires spinning up a task to perform any validation which can be both costly and time consuming. A fail fast mechanism would allow immediate feedback to the end user.
To accomplish this, I propose a new Syntax or function for performing validation within the input block of a task / workflow. This approach has the benefit of clearly showing that validation is part of the input blocks, however it does mean that it cannot happen anywhere else. An additional benefit is the fact the all validations can be evaluated and returned to the user instead of failing at the first one.
workflowfoo {
input {StringnameIntage # New Validation Sectionvalidation {
length(name) > 0: "Name must not be empty"age > = 0: "Age must be greater then 0"age < 110: "Really? Is someone actually that old?"
}
}
}
The above mechanism relies on new syntax to provide a clear and concise way to validate inputs. However we may want to make this more flexible with an engine function
workflowfoo {
input {StringnameIntage
}
validate(length(name) > 0, "Name must not be empty")
validate(age > 0, "Age must be greater then 0")
validate(age < 110, "Really? Is someone actually that old")
}
Validation Errors
When a workflow fails for a validation error, we would want to make a guarantee that the failure message is returned according to some standardized format. Since there is no format currently (see #611), a statement that the engine must return the relevant validation errors and their messages would be as much as we could provide
The text was updated successfully, but these errors were encountered:
A common problem that consumers of WDL face is the need to perform input validation at both the tasks and the workflow level. The current status quo requires spinning up a task to perform any validation which can be both costly and time consuming. A fail fast mechanism would allow immediate feedback to the end user.
To accomplish this, I propose a new Syntax or function for performing validation within the input block of a task / workflow. This approach has the benefit of clearly showing that validation is part of the input blocks, however it does mean that it cannot happen anywhere else. An additional benefit is the fact the all validations can be evaluated and returned to the user instead of failing at the first one.
The above mechanism relies on new syntax to provide a clear and concise way to validate inputs. However we may want to make this more flexible with an engine function
Validation Errors
When a workflow fails for a validation error, we would want to make a guarantee that the failure message is returned according to some standardized format. Since there is no format currently (see #611), a statement that the engine must return the relevant validation errors and their messages would be as much as we could provide
The text was updated successfully, but these errors were encountered: