Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Flow conditions validation shows bad error message when tasks are not connected. #855

Closed
lbradstreet opened this issue Apr 19, 2018 · 3 comments

Comments

@lbradstreet
Copy link
Member

Task :in-task is not connected to :response-out in the workflow, and this error message is very bad as it is a valid task name, though it is not connected.

------ Onyx Job Error -----
There was a validation error in your flow-conditions for key :flow/to
{
   :flow/predicate :compute.command-processor.tasks.common/response?
   :flow/short-circuit? false
   :flow/from :in-task
   :flow/to [:response-out]
    ^-- [:response-out] isn't a valid task name.
}
Did you mean: :response-out
------
@lbradstreet
Copy link
Member Author

Non-schema based validation code can be found here:

https://github.com/onyx-platform/onyx/blob/0.12.x/src/onyx/static/validation.cljc

@lbradstreet
Copy link
Member Author

We should improve the error message to say that the tasks are disconnected, rather than tell the user that it isn't a valid task name (and then list that task anyway!).

jqmtor added a commit to jqmtor/onyx that referenced this issue Apr 28, 2018
When flow conditions included tasks that we're not directly connected
in the workflow, the error message was wrongly suggesting that
:flow/to was not a valid task.

Issue: onyx-platform#855
lbradstreet pushed a commit that referenced this issue Apr 29, 2018
…he workflow (#859)

* Make indentation more readable

* Remove trailing whitespace

* Improve error message for flow conditiions

When flow conditions included tasks that we're not directly connected
in the workflow, the error message was wrongly suggesting that
:flow/to was not a valid task.

Issue: #855
@lbradstreet
Copy link
Member Author

Closed thanks to #859.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant