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.
Reviewed: https:/ /review. openstack. org/474195 /git.openstack. org/cgit/ openstack/ mistral/ commit/ ?id=5a43d54a058 ea4e13924c596b0 bee93b727a1f95
Committed: https:/
Submitter: Jenkins
Branch: master
commit 5a43d54a058ea4e 13924c596b0bee9 3b727a1f95
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
Change-Id: I18449710ace627