with items concurrency doesn't work if value is YAQL

Bug #1487651 reported by Winson Chan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Nikolay Makhotkin

Bug Description

vagrant@arkham:~/tmp$ cat ~/tmp/test-repeat-batch.yaml
---
version: "2.0"
wfc:
  type: direct
  input:
    - batch_size
  tasks:
    task1:
      with-items: i in [1, 2, 3, 4, 5, 6]
      concurrency: <% $.batch_size %>
      action: std.echo output=<% $.i %>

vagrant@arkham:~/tmp$ mistral workflow-create ~/tmp/test-repeat-batch.yaml
+------+--------+------------+----------------------------+------------+
| Name | Tags | Input | Created at | Updated at |
+------+--------+------------+----------------------------+------------+
| wfc | <none> | batch_size | 2015-08-22 00:18:47.017157 | None |
+------+--------+------------+----------------------------+------------+

vagrant@arkham:~/tmp$ mistral workflow-list
+---------------------+--------+------------------------------+----------------------------+------------+
| Name | Tags | Input | Created at | Updated at |
+---------------------+--------+------------------------------+----------------------------+------------+
| std.delete_instance | <none> | instance_id | 2015-08-22 00:16:37.185521 | None |
| std.create_instance | <none> | name, image_id, flavor_id... | 2015-08-22 00:16:37.265245 | None |
| wfc | <none> | batch_size | 2015-08-22 00:18:47.017157 | None |
+---------------------+--------+------------------------------+----------------------------+------------+

vagrant@arkham:~/tmp$ mistral execution-create wfc '{"batch_size": 2}'
ERROR (app) unsupported operand type(s) for +: 'int' and 'unicode'
Traceback (most recent call last):

  File "/opt/openstack/mistral/.venv/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
    executor_callback))

  File "/opt/openstack/mistral/.venv/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
    executor_callback)

  File "/opt/openstack/mistral/.venv/local/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
    result = func(ctxt, **new_args)

  File "/home/vagrant/code/openstack/mistral/mistral/engine/rpc.py", line 98, in start_workflow
    **params

  File "/home/vagrant/code/openstack/mistral/mistral/utils/__init__.py", line 106, in _logged
    return func(*args, **kw)

  File "/home/vagrant/code/openstack/mistral/mistral/engine/default_engine.py", line 94, in start_workflow
    raise e

TypeError: unsupported operand type(s) for +: 'int' and 'unicode'

summary: - with items concurrency if concurrency option is YAQL
+ with items concurrency doesn't work if option is YAQL
summary: - with items concurrency doesn't work if option is YAQL
+ with items concurrency doesn't work if value is YAQL
Changed in mistral:
importance: Undecided → High
status: New → Confirmed
milestone: none → liberty-3
assignee: nobody → Nikolay Makhotkin (nmakhotkin)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

Fix proposed to branch: master
Review: https://review.openstack.org/217127

Changed in mistral:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/217127
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=920b25ffc72360cc7f5d16e38da388ee994d1421
Submitter: Jenkins
Branch: master

commit 920b25ffc72360cc7f5d16e38da388ee994d1421
Author: Nikolay Mahotkin <email address hidden>
Date: Wed Aug 26 16:04:25 2015 +0300

    Fixing working concurrency when value is YAQL

    Closes-Bug: #1487651

    Change-Id: I45abd0c064f4e1be9aee86f4488281ecb9830a62

Changed in mistral:
status: In Progress → Fix Committed
Changed in mistral:
status: Fix Committed → Fix Released
Changed in mistral:
milestone: liberty-3 → liberty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.