-
-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orquesta workflows have incorrect status #4740
Comments
@m4dcoder this is causing us issues because we're expecting the workflow to fail since the task failed. However, when we publish a variable to return data to the calling workflow, this automatically marks the workflow as succeeding. |
I'm seeing similar, but opposite. I have a workflow that should Succeed, but fails when using Tasks fail, and cause the workflow to fail, even though every task has |
@namachieli Please open a separate issue. |
@nmaludy This behavior is expected. When a task failed and there is a task transition (an entry under |
@m4dcoder well that's confusing and inconsistent with the way Mistral work (that's fine).. would be nice if this was called out somewhere It will also cause us to duplicate our |
I also think (if I remember correctly) this only happens when we do a publish, if there is no publish then it fails as expected |
I really don't care about how Mistral works at this point. |
We can update our documentation so this is clearer. |
so, basically in any task that contains any transition at all we also need another transition that is:
then copy that over/over? |
That's true. The rule here is that if there's an entry under
Yes, you will have to explicitly do that. We are also working on a proposal at StackStorm/orquesta#116. I believe this will help where you can publish some vars regardless of task completion status and then nest other whens to say do this and that.
You have to provide a more concrete use case. You can conceptually do this..
|
@nmaludy Per conversation on https://stackstorm-community.slack.com/team/U4H00PLGP, we'll have to explore this a bit more. Regarding your proposal for this use case, when you have a task that fails and no transitions are executed, that the workflow itself should fail. By |
From initial assessment, changes need to happen in the state machine where the task is evaluated if remediation has occurred at https://github.com/StackStorm/orquesta/blob/master/orquesta/machines.py#L657. In this case, 1) if no task transition matched condition or 2) when condition of one or more task transitions are met but there are no tasks to execute next, then the task is not considered remediated. |
SUMMARY
When using orquesta workflows if a task fails but still publishes content the workflow is marked as succeeded. This happens if there is no when clause and when there is a when failed clause.
STACKSTORM VERSION
OS, environment, install method
Install method is Puppet forge module
Steps to reproduce the problem
Using the examples.orquesta-basic workflow. We can need to modify the workflow to remove the
when: <% succeeded() %>
or modify it to bewhen: <% succeeded() or failed() %>
Workflow:
or:
Action file was unaltered:
can be forced to fail by running invalid command:
Expected Results
I would expect the results of the workflow to be failed when the task fails unless manually overridden.
Actual Results
The workflow says succeeded even though the single task failed. Looking at the logs it looks like a second subtask is formed for the publish method that succeeds and send that to the workflow.
Added debugging logs to:
https://github.com/StackStorm/orquesta/blob/master/orquesta/conducting.py#L624
and produced the following logs showing the second subtask.
The text was updated successfully, but these errors were encountered: