DSL for tasks does not restrict content of on-success, on-error, on-complete
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
Medium
|
Vitalii Solodilov |
Bug Description
The DSL for tasks does not restrict the content of the on-success, on-error, on-complete statements but defines them as types.ANY:
class DirectWorkflowT
_polymorphi
_direct_
"type": "object",
"type": {"enum": [_polymorphic_
"join": {
]
},
}
}
This makes it easy to introduce bugs into the workflow which are difficult to find, for example:
on-success:
- my_next_task '{{ _.test1 != None }}'
is valid according to the schema but it does not work the way it looks, because the Jinja condition is NOT executed and the my_next_task task is always executed, even when _.test1 is None.
After spending way too many hours trying to track down errors like this I think it would be better to specify the exact syntax that is allowed for on-success/
The fix for this bug will define the specific types that are allowed for these branching statements.
Changed in mistral: | |
assignee: | nobody → Bob Haddleton (bob-haddleton) |
status: | New → In Progress |
Changed in mistral: | |
importance: | Undecided → Medium |
milestone: | none → queens-1 |
Changed in mistral: | |
milestone: | queens-1 → queens-2 |
Changed in mistral: | |
milestone: | queens-2 → queens-3 |
Changed in mistral: | |
milestone: | queens-3 → rocky-1 |
Changed in mistral: | |
milestone: | rocky-1 → rocky-2 |
Changed in mistral: | |
assignee: | Bob Haddleton (bob-haddleton) → Vitalii Solodilov (mcdoker18) |
Changed in mistral: | |
milestone: | rocky-2 → rocky-3 |
Fix proposed to branch: master /review. openstack. org/499790
Review: https:/