[openstack-dev] [oslo] pymysql change in error formatting has broken exception handing in oslo.db
Mike Bayer
mbayer at redhat.com
Wed Aug 31 14:39:36 UTC 2016
We need to decide how to handle this:
https://review.openstack.org/#/c/362991/
Basically, PyMySQL normally raises an error message like this:
(pymysql.err.IntegrityError) (1452, u'Cannot add or update a child row:
a foreign key constraint fails (`vaceciqnzs`.`resource_entity`,
CONSTRAINT `foo_fkey` FOREIGN KEY (`foo_id`) REFERENCES `resource_foo`
(`id`))')
for some reason, PyMySQL 0.7.7 is now raising it like this:
(pymysql.err.IntegrityError) (1452, u'23000Cannot add or update a child
row: a foreign key constraint fails (`vaceciqnzs`.`resource_entity`,
CONSTRAINT `foo_fkey` FOREIGN KEY (`foo_id`) REFERENCES `resource_foo`
(`id`))')
this impacts oslo.db's "exception re-handling" functionality which tries
to classify this exception as a DBNonExistentConstraint exception. It
also breaks oslo.db's test suite locally, but in a downstream project
would only impact its ability to intercept this exception appropriately.
now that "23000" there looks like a bug. The above gerrit proposes to
work around it. However, if we didn't push out the above gerrit, we'd
instead have to change requirements:
https://review.openstack.org/#/q/I33d5ef8f35747d3b6d3bc0bd4972ce3b7fd60371,n,z
It seems like at least one or the other would be needed for Newton.
More information about the OpenStack-dev
mailing list