SQL exception when updating task 'state_info' in case action fails and returns a result as an array on Python 2.7
Bug #1802477 reported by
Renat Akhmerov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Fix Released
|
High
|
Renat Akhmerov |
Bug Description
If an action execution fails but returns a result as a list (error=[]) the result of this action is assigned to the task execution 'state_info' field which is a string according to the DB model. On Python 3 it this list magically converts to a string somehow. On Python 2.7 it doesn't. The reason is probably in how SQLAlchemy works on different versions of Python.
The solution is to always explicitly convert the action result into a string when assigning it to the "state_info" field.
Changed in mistral: | |
status: | New → Confirmed |
assignee: | nobody → Renat Akhmerov (rakhmerov) |
milestone: | none → stein-1 |
importance: | Undecided → High |
tags: | added: backport queens rocky |
Changed in mistral: | |
status: | Confirmed → In Progress |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/616844 /git.openstack. org/cgit/ openstack/ mistral/ commit/ ?id=43a8bddc244 d2d0dda19d8ce20 82f64e64af8230
Committed: https:/
Submitter: Zuul
Branch: master
commit 43a8bddc244d2d0 dda19d8ce2082f6 4e64af8230
Author: Renat Akhmerov <email address hidden>
Date: Fri Nov 9 01:07:39 2018 +0700
Fix how action result is assigned to task 'state_info' field
Closes-Bug: #1802477
Change-Id: Ia8848b3bb0417f 66422c4995b64be 7a803dde1e7