st2
st2 copied to clipboard
orquesta with-items-model for dict error
SUMMARY
orquesta with-items-model for dict is error
i compare two version ,data class type is different
stackstorm 3.5
yaql: $.items() type is:
<class 'generator'> <generator object ItemsView.iter at 0x7f5146a85d58>
stackstorm 3.6 yaql: $.items() type is: class collections.abc.ItemsView
STACKSTORM VERSION
stacstorm 3.6 is error stackstorm 3.5 is ok
OS, environment, install method
in docker
Steps to reproduce the problem
version: "1.0"
description: test with.
input:
- input_num
tasks:
task0:
action: core.echo message=ok
input:
input_num: <% ctx().input_num %>
next:
- when: <% succeeded() %>
publish:
- messages: <% result().result %>
do: task1
task1:
with: k, v in <% ctx(messages).items() %>
action: core.echo message=<% item(v) %>
Expected Results
YaqlEvaluationException: Unable to evaluate expression '<% ctx(messages).items() %>'. TypeError: unhashable type: 'list",
Actual Results
stackstorm 3.5 is ok
stacstorm 3.6 is error
but, when i change source code at stackstorm 3.6 (yaql/language/utils.py): engine.options.get('yaql.convertSetsToLists', False)===>engine.options.get('yaql.convertSetsToLists', True) then it works ok. !!!!! why?
Thanks!
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.