Comment 1 for bug 1698125

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

Reviewed: https://review.openstack.org/474195
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=5a43d54a058ea4e13924c596b0bee93b727a1f95
Submitter: Jenkins
Branch: master

commit 5a43d54a058ea4e13924c596b0bee93b727a1f95
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
      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