)]}'
{"keystone/common/sql/core.py":[{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"6f582f3a75f4c31ffba4bf06d07e2c9577059b60","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                        _(\u0027An unexpected error occurred when trying to \u0027"},{"line_number":448,"context_line":"                          \u0027store %s\u0027) % conflict_type)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"                if isinstance(e, db_exception.DBDataError):"},{"line_number":451,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":452,"context_line":"                    # failed to store data when input from user is not a valid"},{"line_number":453,"context_line":"                    # format which raises different data error for different"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_50cd785c","line":450,"updated":"2016-06-02 13:49:46.000000000","message":"as said in the comment, this will capture other errors than the one highlighted here. We can\u0027t generalize here.","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"842320964cebbf17813d5e492f9554aa5284caf4","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                        _(\u0027An unexpected error occurred when trying to \u0027"},{"line_number":448,"context_line":"                          \u0027store %s\u0027) % conflict_type)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"                if isinstance(e, db_exception.DBDataError):"},{"line_number":451,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":452,"context_line":"                    # failed to store data when input from user is not a valid"},{"line_number":453,"context_line":"                    # format which raises different data error for different"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_3162bf0a","line":450,"range":{"start_line":450,"start_character":30,"end_line":450,"end_character":57},"updated":"2016-06-08 14:22:39.000000000","message":"if you\u0027re going to check on the exception itself, please add another except block before the one at L432, like:\n\n    except db_exception.DBDataError as e:\n        # do your logic here\n\nOtherwise it will just seem like catching a very generic exception and trying to narrow it here","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"88907dd5de24c7a52f6c3df095ee2747546fcc8c","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                        _(\u0027An unexpected error occurred when trying to \u0027"},{"line_number":448,"context_line":"                          \u0027store %s\u0027) % conflict_type)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"                if isinstance(e, db_exception.DBDataError):"},{"line_number":451,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":452,"context_line":"                    # failed to store data when input from user is not a valid"},{"line_number":453,"context_line":"                    # format which raises different data error for different"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_47b41b34","line":450,"range":{"start_line":450,"start_character":30,"end_line":450,"end_character":57},"in_reply_to":"7aa08908_3162bf0a","updated":"2016-06-13 13:24:42.000000000","message":"So why are why not doing the validation on the input? Waiting for the failure seems silly to me.","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":20181,"name":"Srushti Gadadare","email":"srushti391993@gmail.com","username":"srushti"},"change_message_id":"fc070c37653e38af531c0be5e1605a8713dfbed4","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                        _(\u0027An unexpected error occurred when trying to \u0027"},{"line_number":448,"context_line":"                          \u0027store %s\u0027) % conflict_type)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"                if isinstance(e, db_exception.DBDataError):"},{"line_number":451,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":452,"context_line":"                    # failed to store data when input from user is not a valid"},{"line_number":453,"context_line":"                    # format which raises different data error for different"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_538f9374","line":450,"in_reply_to":"7aa08908_388bf069","updated":"2016-06-14 10:37:25.000000000","message":"Hi David Stanek, Lance Bragstad, Ron De Rose\n\nWe cannot validate input in manager because postgresql or DB2 allows 4 byte data in the database but mysql does not allow 4 byte unicode characters.\nIf we do input validation beforehand then in case of postgresql database backened user will not be able to insert or retrieve data from the database.","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"f502050e3d43c2b17194e8eea98914ce95db66dd","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                        _(\u0027An unexpected error occurred when trying to \u0027"},{"line_number":448,"context_line":"                          \u0027store %s\u0027) % conflict_type)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"                if isinstance(e, db_exception.DBDataError):"},{"line_number":451,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":452,"context_line":"                    # failed to store data when input from user is not a valid"},{"line_number":453,"context_line":"                    # format which raises different data error for different"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_ddda9e4a","line":450,"in_reply_to":"7aa08908_47b41b34","updated":"2016-06-13 14:10:00.000000000","message":"++ I think we should be doing this a little higher in the stack, with the rest of the validation logic perhaps. This seems like something that should be handled by the managers and not the backend code.","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"b304d34bd4e0cc2a70c93700127a87653e3529a1","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                        _(\u0027An unexpected error occurred when trying to \u0027"},{"line_number":448,"context_line":"                          \u0027store %s\u0027) % conflict_type)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"                if isinstance(e, db_exception.DBDataError):"},{"line_number":451,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":452,"context_line":"                    # failed to store data when input from user is not a valid"},{"line_number":453,"context_line":"                    # format which raises different data error for different"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_beccb36a","line":450,"in_reply_to":"7aa08908_538f9374","updated":"2016-06-14 13:45:19.000000000","message":"this is not accurate, MySQL seems to support it as mentioned in [1]\n\n[1] http://stackoverflow.com/questions/1890693/mysql-server-does-not-support-4-byte-encoded-utf8-characters\n\nI wonder if this can be considered a bug at all.","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"91f1dd2ed6deb75a8a6d32d245fc19d0b888cd48","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                        _(\u0027An unexpected error occurred when trying to \u0027"},{"line_number":448,"context_line":"                          \u0027store %s\u0027) % conflict_type)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"                if isinstance(e, db_exception.DBDataError):"},{"line_number":451,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":452,"context_line":"                    # failed to store data when input from user is not a valid"},{"line_number":453,"context_line":"                    # format which raises different data error for different"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_4e87da60","line":450,"in_reply_to":"7aa08908_beccb36a","updated":"2016-06-14 14:18:49.000000000","message":"It will support it just fine if the encoding is properly set. I think we try to force UTF-8 encoding which is why it appears to not work and what I thought we should validate. If we are trying to store UTF-16 data in a UTF-8 database...","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"30020c45943fb32098b85705169de3f5858f2d30","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                        _(\u0027An unexpected error occurred when trying to \u0027"},{"line_number":448,"context_line":"                          \u0027store %s\u0027) % conflict_type)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"                if isinstance(e, db_exception.DBDataError):"},{"line_number":451,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":452,"context_line":"                    # failed to store data when input from user is not a valid"},{"line_number":453,"context_line":"                    # format which raises different data error for different"}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_388bf069","line":450,"in_reply_to":"7aa08908_ddda9e4a","updated":"2016-06-13 14:23:32.000000000","message":"++ Agree","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"97755f4e931309a9cbf8b76d3822e74222451510","unresolved":false,"context_lines":[{"line_number":447,"context_line":"                        _(\u0027An unexpected error occurred when trying to \u0027"},{"line_number":448,"context_line":"                          \u0027store %s\u0027) % conflict_type)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"                if isinstance(e, db_exception.DBDataError):"},{"line_number":451,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":452,"context_line":"                    # failed to store data when input from user is not a valid"},{"line_number":453,"context_line":"                    # format which raises different data error for different"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_250346ba","line":450,"in_reply_to":"9abb7d3a_50cd785c","updated":"2016-06-02 17:57:00.000000000","message":"+1, but I\u0027m not sure oslo.db has a narrower exception. Maybe something in the exception message identifies this specific issue and the field causing it?","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"5003d18b8bfedfc449293f2a6a71cf3fd4b6c66a","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                    # backends. For example, it could be 4 byte unicode data"},{"line_number":455,"context_line":"                    # which raises data error for mysql database as it doesn\u0027t"},{"line_number":456,"context_line":"                    # use utf8mb4 character encoding."},{"line_number":457,"context_line":"                    raise exception.ValidationError(_(\u0027Error writing field \u0027"},{"line_number":458,"context_line":"                                                      \u0027to database\u0027))"},{"line_number":459,"context_line":"                raise"},{"line_number":460,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_9de6de42","line":457,"updated":"2016-06-02 12:00:04.000000000","message":"Can we add the information about which field was used?","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":20181,"name":"Srushti Gadadare","email":"srushti391993@gmail.com","username":"srushti"},"change_message_id":"fc070c37653e38af531c0be5e1605a8713dfbed4","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                    # backends. For example, it could be 4 byte unicode data"},{"line_number":455,"context_line":"                    # which raises data error for mysql database as it doesn\u0027t"},{"line_number":456,"context_line":"                    # use utf8mb4 character encoding."},{"line_number":457,"context_line":"                    raise exception.ValidationError(_(\u0027Error writing field \u0027"},{"line_number":458,"context_line":"                                                      \u0027to database\u0027))"},{"line_number":459,"context_line":"                raise"},{"line_number":460,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_d6b25105","line":457,"in_reply_to":"7aa08908_2743cf43","updated":"2016-06-14 10:37:25.000000000","message":"Hi Raildo Mascena, Rodrigo Duarte, David Stanek\n\nIf we display column name through e.inner_exception.orig.args[1], user will get error message as:\n\nError writing field to database. Incorrect string value: \u0027\\xF0\\x9F\\x9A\\x93\u0027 for column \u0027name\u0027 at row 1 (HTTP 400) (Request-ID: req-98bbe8a2-761d-4180-b013-f596f6ac9a63)\n\nHere, row 1 doesn\u0027t seem useful to the user because we simply cannot extract field name directly from the e.inner_exception.","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":8866,"name":"Raildo Mascena de Sousa Filho","email":"rmascena@redhat.com","username":"raildo"},"change_message_id":"8f2821d4978a643e802795054ab2aa1a4d707caa","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                    # backends. For example, it could be 4 byte unicode data"},{"line_number":455,"context_line":"                    # which raises data error for mysql database as it doesn\u0027t"},{"line_number":456,"context_line":"                    # use utf8mb4 character encoding."},{"line_number":457,"context_line":"                    raise exception.ValidationError(_(\u0027Error writing field \u0027"},{"line_number":458,"context_line":"                                                      \u0027to database\u0027))"},{"line_number":459,"context_line":"                raise"},{"line_number":460,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_18bb5fc5","line":457,"in_reply_to":"7aa08908_d6b25105","updated":"2016-06-14 13:09:33.000000000","message":"So I suggest raise the whole exception message. The current message doesn\u0027t help a lot... So, let the operator handle with the whole exception message.","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"88907dd5de24c7a52f6c3df095ee2747546fcc8c","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                    # backends. For example, it could be 4 byte unicode data"},{"line_number":455,"context_line":"                    # which raises data error for mysql database as it doesn\u0027t"},{"line_number":456,"context_line":"                    # use utf8mb4 character encoding."},{"line_number":457,"context_line":"                    raise exception.ValidationError(_(\u0027Error writing field \u0027"},{"line_number":458,"context_line":"                                                      \u0027to database\u0027))"},{"line_number":459,"context_line":"                raise"},{"line_number":460,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7aa08908_2743cf43","line":457,"in_reply_to":"9abb7d3a_9de6de42","updated":"2016-06-13 13:24:42.000000000","message":"++","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"6f582f3a75f4c31ffba4bf06d07e2c9577059b60","unresolved":false,"context_lines":[{"line_number":454,"context_line":"                    # backends. For example, it could be 4 byte unicode data"},{"line_number":455,"context_line":"                    # which raises data error for mysql database as it doesn\u0027t"},{"line_number":456,"context_line":"                    # use utf8mb4 character encoding."},{"line_number":457,"context_line":"                    raise exception.ValidationError(_(\u0027Error writing field \u0027"},{"line_number":458,"context_line":"                                                      \u0027to database\u0027))"},{"line_number":459,"context_line":"                raise"},{"line_number":460,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_90c40060","line":457,"in_reply_to":"9abb7d3a_9de6de42","updated":"2016-06-02 13:49:46.000000000","message":"+1","commit_id":"c4c20748cd2c0fd7acf396e2b571ab0e810ebd00"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"71b6fe49e84964cd1a236dc84ff42667255342f8","unresolved":false,"context_lines":[{"line_number":434,"context_line":"                                          \u0027details\u0027: six.text_type(e)})"},{"line_number":435,"context_line":"                raise exception.Conflict(type\u003dconflict_type,"},{"line_number":436,"context_line":"                                         details\u003d_(\u0027Duplicate Entry\u0027))"},{"line_number":437,"context_line":"            except db_exception.DBDataError as e:"},{"line_number":438,"context_line":"                if isinstance(e.inner_exception, InternalError):"},{"line_number":439,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":440,"context_line":"                    # failed to store data when input from user is not in a"},{"line_number":441,"context_line":"                    # valid format which raises different data error for"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_10bf5dd1","line":438,"range":{"start_line":437,"start_character":12,"end_line":438,"end_character":64},"updated":"2016-06-23 04:28:09.000000000","message":"This doesn\u0027t sound like the exception that should be handled by the @sql.handle_conflicts decorator.","commit_id":"2409c59ef97d5880ded694747df2ccb41fa63114"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f705b808c483e8abc690ac3d497e93695aa07d8a","unresolved":false,"context_lines":[{"line_number":439,"context_line":"                    # NOTE(srushti-gadadare): This is the case where the SQL"},{"line_number":440,"context_line":"                    # failed to store data when input from user is not in a"},{"line_number":441,"context_line":"                    # valid format which raises different data error for"},{"line_number":442,"context_line":"                    # different backends. For example, it could be 4 byte"},{"line_number":443,"context_line":"                    # unicode data which raises data error for mysql database"},{"line_number":444,"context_line":"                    # as it doesn\u0027t use utf8mb4 character encoding."},{"line_number":445,"context_line":"                    raise exception.ValidationError("},{"line_number":446,"context_line":"                        _(\u0027Error writing field to database. %s\u0027) %"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_37f08490","line":443,"range":{"start_line":442,"start_character":42,"end_line":443,"end_character":77},"updated":"2016-06-22 12:25:56.000000000","message":"this is not accurate, see comment in previous patchset.","commit_id":"2409c59ef97d5880ded694747df2ccb41fa63114"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"ab5c18670f7320cfebff968d85a988d4cef87388","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                    # different backends. For example, it could be 4 byte"},{"line_number":443,"context_line":"                    # unicode data which raises data error for mysql database"},{"line_number":444,"context_line":"                    # as it doesn\u0027t use utf8mb4 character encoding."},{"line_number":445,"context_line":"                    raise exception.ValidationError("},{"line_number":446,"context_line":"                        _(\u0027Error writing field to database. %s\u0027) %"},{"line_number":447,"context_line":"                        six.text_type(e.inner_exception.orig.args[1]))"},{"line_number":448,"context_line":"            except db_exception.DBError as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_69c194e4","line":445,"updated":"2016-06-22 12:48:01.000000000","message":"This is not a validation error because nothing is being validated. We don\u0027t really know what the error is. https://www.python.org/dev/peps/pep-0249/#internalerror\n\nI think in most cases a 500 is actually valid for InternalErrors.\n\nIs there a way to validate the data after the exception and only raise a ValidationError if it\u0027s a 4-byte character?","commit_id":"2409c59ef97d5880ded694747df2ccb41fa63114"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"c3c21a40cb633f43df84d095b85fd12ea7de8b98","unresolved":false,"context_lines":[{"line_number":442,"context_line":"                    # different backends. For example, it could be 4 byte"},{"line_number":443,"context_line":"                    # unicode data which raises data error for mysql database"},{"line_number":444,"context_line":"                    # as it doesn\u0027t use utf8mb4 character encoding."},{"line_number":445,"context_line":"                    raise exception.ValidationError("},{"line_number":446,"context_line":"                        _(\u0027Error writing field to database. %s\u0027) %"},{"line_number":447,"context_line":"                        six.text_type(e.inner_exception.orig.args[1]))"},{"line_number":448,"context_line":"            except db_exception.DBError as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_7405b178","line":445,"in_reply_to":"3aaa91ec_69c194e4","updated":"2016-06-23 10:33:14.000000000","message":"++ good point David","commit_id":"2409c59ef97d5880ded694747df2ccb41fa63114"},{"author":{"_account_id":11022,"name":"Rodrigo Duarte Sousa","email":"rodrigodsousa@gmail.com","username":"rodrigods"},"change_message_id":"f705b808c483e8abc690ac3d497e93695aa07d8a","unresolved":false,"context_lines":[{"line_number":443,"context_line":"                    # unicode data which raises data error for mysql database"},{"line_number":444,"context_line":"                    # as it doesn\u0027t use utf8mb4 character encoding."},{"line_number":445,"context_line":"                    raise exception.ValidationError("},{"line_number":446,"context_line":"                        _(\u0027Error writing field to database. %s\u0027) %"},{"line_number":447,"context_line":"                        six.text_type(e.inner_exception.orig.args[1]))"},{"line_number":448,"context_line":"            except db_exception.DBError as e:"},{"line_number":449,"context_line":"                # TODO(blk-u): inspecting inner_exception breaks encapsulation;"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_f7655ce1","line":446,"range":{"start_line":446,"start_character":27,"end_line":446,"end_character":63},"updated":"2016-06-22 12:25:56.000000000","message":"suggest you change the sentence a bit so it is clearer that what is printed is the field:\n\n  Error writing field \"%s\" to database.","commit_id":"2409c59ef97d5880ded694747df2ccb41fa63114"}],"keystone/tests/unit/test_backend_sql.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"71b6fe49e84964cd1a236dc84ff42667255342f8","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                          CONF.identity.default_domain_id)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    @mock.patch(\u0027sqlalchemy.orm.session.Session.commit\u0027)"},{"line_number":315,"context_line":"    def test_create_project_with_4byte_data_in_mysql(self, mock_commit):"},{"line_number":316,"context_line":"        project \u003d unit.new_project_ref("},{"line_number":317,"context_line":"            name\u003du\u0027\\U0001f693\u0027, domain_id\u003dCONF.identity.default_domain_id)"},{"line_number":318,"context_line":"        # fake_error_code and fake_error_message are associated with wrapped"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_90222db8","line":315,"range":{"start_line":315,"start_character":33,"end_line":315,"end_character":38},"updated":"2016-06-23 04:28:09.000000000","message":"unicode.","commit_id":"2409c59ef97d5880ded694747df2ccb41fa63114"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a11fa7d0f2d84f0691da7a6ac66777e3cd2a5dcd","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                          CONF.identity.default_domain_id)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    @mock.patch(\u0027sqlalchemy.orm.session.Session.commit\u0027)"},{"line_number":315,"context_line":"    def test_create_project_with_4byte_data_in_mysql(self, mock_commit):"},{"line_number":316,"context_line":"        project \u003d unit.new_project_ref("},{"line_number":317,"context_line":"            name\u003du\u0027\\U0001f693\u0027, domain_id\u003dCONF.identity.default_domain_id)"},{"line_number":318,"context_line":"        # fake_error_code and fake_error_message are associated with wrapped"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_77dab04d","line":315,"range":{"start_line":315,"start_character":33,"end_line":315,"end_character":38},"in_reply_to":"3aaa91ec_90222db8","updated":"2016-06-23 19:45:52.000000000","message":"it really is a 4byte test. mysql generally handles unicode just fine","commit_id":"2409c59ef97d5880ded694747df2ccb41fa63114"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"71b6fe49e84964cd1a236dc84ff42667255342f8","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        # displayed to the user."},{"line_number":323,"context_line":"        fake_error_code \u003d 1366"},{"line_number":324,"context_line":"        fake_error_message \u003d \u0027Incorrect string value.\u0027"},{"line_number":325,"context_line":"        fake_db_exc \u003d Exception(fake_error_code, fake_error_message)"},{"line_number":326,"context_line":"        mock_commit.side_effect \u003d db_exception.DBDataError("},{"line_number":327,"context_line":"            inner_exception\u003dexc.InternalError(\u0027a\u0027, \u0027a\u0027, fake_db_exc))"},{"line_number":328,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":329,"context_line":"                          self.resource_api.create_project, project[\u0027id\u0027],"},{"line_number":330,"context_line":"                          project)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_889653ee","line":327,"range":{"start_line":325,"start_character":0,"end_line":327,"end_character":69},"updated":"2016-06-23 04:28:09.000000000","message":"This doesn\u0027t looks like test the change correctly, ideally, the assertion below could pass without the mock here. If this is MySQL specific issue, let\u0027s write a MySQL specific testcase, and ignore it when it\u0027s using SQLite?","commit_id":"2409c59ef97d5880ded694747df2ccb41fa63114"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a11fa7d0f2d84f0691da7a6ac66777e3cd2a5dcd","unresolved":false,"context_lines":[{"line_number":322,"context_line":"        # displayed to the user."},{"line_number":323,"context_line":"        fake_error_code \u003d 1366"},{"line_number":324,"context_line":"        fake_error_message \u003d \u0027Incorrect string value.\u0027"},{"line_number":325,"context_line":"        fake_db_exc \u003d Exception(fake_error_code, fake_error_message)"},{"line_number":326,"context_line":"        mock_commit.side_effect \u003d db_exception.DBDataError("},{"line_number":327,"context_line":"            inner_exception\u003dexc.InternalError(\u0027a\u0027, \u0027a\u0027, fake_db_exc))"},{"line_number":328,"context_line":"        self.assertRaises(exception.ValidationError,"},{"line_number":329,"context_line":"                          self.resource_api.create_project, project[\u0027id\u0027],"},{"line_number":330,"context_line":"                          project)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_f7cd0086","line":327,"range":{"start_line":325,"start_character":0,"end_line":327,"end_character":69},"in_reply_to":"3aaa91ec_889653ee","updated":"2016-06-23 19:45:52.000000000","message":"This is just checking the exception catching logic and not using any database. I\u0027m perfectly happy with a test like this. That doesn\u0027t mean we cant\u0027 add a MySQL specific test where we actually hit MySQL with no mocking.","commit_id":"2409c59ef97d5880ded694747df2ccb41fa63114"}]}
