Wrong action_execution output evaluation using with-items
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Invalid
|
Medium
|
Renat Akhmerov |
Bug Description
consider task the following:
get_volumes:
with-items: id in <% $.volume_ids %>
action: cinder.volumes_list
input:
publish:
volumes: <% task(get_
on-success:
- delete_all_volumes
$.volume_ids consist of 2 UUIDs, i.e == ["id1", "id2"]
Action execution objects: http://
But there are somehow merged outputs in each action execution: each one contains more than one volume. So I expected the following published variable in task:
[
{
"id": "id1",
"status": "status1"
},
{
"id": "id2",
"status": "status2"
}
]
But I got
[
{
"id": "id1",
"status": "status1"
},
{
"id": "id1",
"status": "status1"
}
]
Pay attention to id1/id2. Due to each action execution contains the same output (for 2 volumes) - I get only the first one for each and eventually they are the same.
UPD: The issue is related to YAQL. Somehow the expression <% {"id" => $.id + $.search_opts} %> where variable $.search_opts == {} resulted in {} (!!!) but should be {"id": $.id}. So volume list returned the whole volume list and therefore each action execution contains 2 volumes instead 1.
Changed in mistral: | |
milestone: | none → pike-3 |
assignee: | nobody → Renat Akhmerov (rakhmerov) |
importance: | Undecided → Critical |
importance: | Critical → High |
importance: | High → Critical |
description: | updated |
Changed in mistral: | |
status: | Incomplete → New |
importance: | Critical → Medium |
Changed in mistral: | |
milestone: | pike-3 → pike-rc1 |
As I understand there's no issue in Mistral. It may be in YAQL. Nikolay, can you please add what you discovered?