Make sure that the field "state_info" trimmed as expected
* Before this patch, "state_info" field of execution objects
wasn't truncated properly before saving into DB which led to
the DB error like: DBDataError: (_mysql_exceptions.DataError) (1406, "Data too
long for column 'state_info' at row 1")
It was happening because the method utils.cut() didn't work
accurately enough in case if we passed it with a dictionary.
This patch doesn't fix utils.cut() method but it just saves
space for possible method result difference with the expected
length so that we make sure that the truncated string
representation is always less than 65536 bytes (i.e. the size
of MySQL TEXT type). The total difference is not critical
anyway.
Closes-Bug: #1698125
Change-Id: I18449710ace6276224aaea564588c53a3e2c6adc
(cherry picked from commit 5a43d54a058ea4e13924c596b0bee93b727a1f95)
Reviewed: https:/ /review. openstack. org/475316 /git.openstack. org/cgit/ openstack/ mistral/ commit/ ?id=c15c3780117 02bde2e29922d23 8ed8b9b9688f39
Committed: https:/
Submitter: Jenkins
Branch: stable/ocata
commit c15c378011702bd e2e29922d238ed8 b9b9688f39
Author: Renat Akhmerov <email address hidden>
Date: Wed Jun 14 20:10:03 2017 +0700
Make sure that the field "state_info" trimmed as expected
* Before this patch, "state_info" field of execution objects
DBDataError: (_mysql_ exceptions. DataError) (1406, "Data too ation is always less than 65536 bytes (i.e. the size
wasn't truncated properly before saving into DB which led to
the DB error like:
long for column 'state_info' at row 1")
It was happening because the method utils.cut() didn't work
accurately enough in case if we passed it with a dictionary.
This patch doesn't fix utils.cut() method but it just saves
space for possible method result difference with the expected
length so that we make sure that the truncated string
represent
of MySQL TEXT type). The total difference is not critical
anyway.
Closes-Bug: #1698125 6224aaea564588c 53a3e2c6adc 13924c596b0bee9 3b727a1f95)
Change-Id: I18449710ace627
(cherry picked from commit 5a43d54a058ea4e