Need to handle error during YAQL evalution if non-defined variable was called
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
Medium
|
Nikolay Makhotkin | ||
Liberty |
Fix Released
|
Medium
|
Nikolay Makhotkin |
Bug Description
Steps to reproduce:
1. Create workflow definition
For example:
---
version: "2.0"
wf_main:
tasks:
invoke_wf:
with-items:
- i in [1, 2, 3]
workflow: wf_work var="<% $.i + $.j %>"
publish:
res: <% $.invoke_wf %>
2. Execute "mistral workflow-create <def.yaml>"
3. Try to execute this workflow
Observed result:
unsupported operand type(s) for +: 'int' and 'NoneType'
Traceback (most recent call last):
File "/usr/local/
executor_
File "/usr/local/
executor_
File "/usr/local/
result = func(ctxt, **new_args)
File "/home/
**params
File "/home/
return func(*args, **kw)
File "/home/
raise e
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
Expected result:
User friendly error: "Variable 'foo' was undefined"
Changed in mistral: | |
milestone: | kilo-rc2 → none |
Changed in mistral: | |
milestone: | 1.0.0 → none |
Reviewed: https:/ /review. openstack. org/180953 /git.openstack. org/cgit/ stackforge/ mistral/ commit/ ?id=d55ed99b505 1a1e076336780e3 86a4eb23c56eeb
Committed: https:/
Submitter: Jenkins
Branch: master
commit d55ed99b5051a1e 076336780e386a4 eb23c56eeb
Author: Nikolay Mahotkin <email address hidden>
Date: Thu May 7 14:42:33 2015 +0300
Fixing YAQL related errors
* Now Mistral raises YaqlEvaluationE xception if
something was wrong with evaluating YAQL.
Closes-Bug: #1449505
Change-Id: Ic6a1592b8424eb dbaaca698b9a894 d589def97d2