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
6
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (master)

Reviewed: https://review.openstack.org/616844
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=43a8bddc244d2d0dda19d8ce2082f64e64af8230
Submitter: Zuul
Branch: master

commit 43a8bddc244d2d0dda19d8ce2082f64e64af8230
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: Ia8848b3bb0417f66422c4995b64be7a803dde1e7

Changed in mistral:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/616950

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/616951

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (stable/rocky)

Reviewed: https://review.openstack.org/616950
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=4c911a76357a741c65f88427af532040df33bd94
Submitter: Zuul
Branch: stable/rocky

commit 4c911a76357a741c65f88427af532040df33bd94
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: Ia8848b3bb0417f66422c4995b64be7a803dde1e7
    (cherry picked from commit 43a8bddc244d2d0dda19d8ce2082f64e64af8230)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to mistral (stable/queens)

Reviewed: https://review.openstack.org/616951
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=b249321956167dfdcd270c797c17e0648641b12f
Submitter: Zuul
Branch: stable/queens

commit b249321956167dfdcd270c797c17e0648641b12f
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: Ia8848b3bb0417f66422c4995b64be7a803dde1e7
    (cherry picked from commit 43a8bddc244d2d0dda19d8ce2082f64e64af8230)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 8.0.0.0b1

This issue was fixed in the openstack/mistral 8.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral 7.1.0

This issue was fixed in the openstack/mistral 7.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/mistral queens-eol

This issue was fixed in the openstack/mistral queens-eol release.

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.