)]}'
{"glance/cmd/manage.py":[{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"bf36f91401ce667268de5fcf81bfc8d4ccfcfa86","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":173,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":174,"context_line":"            sys.exit(_(\"Purge command failed, check glance-manage\""},{"line_number":175,"context_line":"                       \" logs for more details.\"))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_8a92774a","line":175,"range":{"start_line":175,"start_character":30,"end_line":175,"end_character":33},"updated":"2016-03-31 18:10:22.000000000","message":"The user in this case is the operator himself/herself. Is there a particular reason to not show the underlying error directly to the user?\n\nI think it\u0027d be helpful to both log and show the error directly to the user.","commit_id":"3eac086b3843f08c7bbe438d9b701e08ceb19aad"},{"author":{"_account_id":18494,"name":"Ravi Shekhar Jethani","email":"rsjethani@gmail.com","username":"rsjethani"},"change_message_id":"4fe0efe74bdf0639c2a3c183119e1d3f2304fc80","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":173,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":174,"context_line":"            sys.exit(_(\"Purge command failed, check glance-manage\""},{"line_number":175,"context_line":"                       \" logs for more details.\"))"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_8c4efb38","line":175,"range":{"start_line":175,"start_character":30,"end_line":175,"end_character":33},"in_reply_to":"ba0121b8_8a92774a","updated":"2016-04-01 07:35:35.000000000","message":"Thanks for review Hemanth!!!\n\nThe user already gets to see the detailed error on the console due to glance/db/sqlalchemy/api.py:Line 1331. Sample console execution: https://paste.ee/p/NTBX6#","commit_id":"3eac086b3843f08c7bbe438d9b701e08ceb19aad"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"a4beb53d96459f17dd63d4beb7d6761c49bd5fb1","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":182,"context_line":"        except exception.Invalid as exc:"},{"line_number":183,"context_line":"            sys.exit(exc.msg)"},{"line_number":184,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":185,"context_line":"            sys.exit(_(\"Purge command failed, check glance-manage\""},{"line_number":186,"context_line":"                       \" logs for more details.\"))"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9ad45d7e_64574cca","line":186,"range":{"start_line":184,"start_character":0,"end_line":186,"end_character":50},"updated":"2016-08-11 19:33:53.000000000","message":"Just trying to understand.\nIs there a reason we can\u0027t handle this in the above except? We are not doing much differently except for emitting a generic message instead of the error.","commit_id":"992c4cedfc2f7b94b7d6444c06b9822fc76d4402"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"4d73657669b0cfd093ead90ea915ce9080677aa5","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":182,"context_line":"        except exception.Invalid as exc:"},{"line_number":183,"context_line":"            sys.exit(exc.msg)"},{"line_number":184,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":185,"context_line":"            sys.exit(_(\"Purge command failed, check glance-manage\""},{"line_number":186,"context_line":"                       \" logs for more details.\"))"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_f7ba3409","line":186,"range":{"start_line":184,"start_character":0,"end_line":186,"end_character":50},"in_reply_to":"3ac371cc_d8a82bde","updated":"2016-08-16 19:18:54.000000000","message":"Dinesh,\nNo, I\u0027m not suggesting that.\nJust saying why can\u0027t we handle both exceptions in the same except clause. I say that because we aren\u0027t really doing anything different with either of these exceptions. We are exiting on both of those exceptions and printing a message. So, does it make sense to handle them under the same except clause?","commit_id":"992c4cedfc2f7b94b7d6444c06b9822fc76d4402"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"3ee58c8cc444f6c7091c1c467eebbc9f928586ac","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":182,"context_line":"        except exception.Invalid as exc:"},{"line_number":183,"context_line":"            sys.exit(exc.msg)"},{"line_number":184,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":185,"context_line":"            sys.exit(_(\"Purge command failed, check glance-manage\""},{"line_number":186,"context_line":"                       \" logs for more details.\"))"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_14e419aa","line":186,"range":{"start_line":184,"start_character":0,"end_line":186,"end_character":50},"in_reply_to":"3ac371cc_f7ba3409","updated":"2016-08-17 06:17:25.000000000","message":"Hi Hemanth,\n\nThanks for clarification.\n\n\n\u0027db_exc.DBReferenceError\u0027 exception don\u0027t have \u0027msg\u0027 attribute instead it has \u0027message\u0027 if we caught it at the same line then we need to add additional logic to tackle this.\n\nAnother point is with DBReferenceError we will get below error message which is too lengthy and difficult to understand.\n\n\nDBReferenceError(u\"(pymysql.err.IntegrityError) (1451, u\u0027Cannot delete or update a parent row: a foreign key constraint fails (`glance`.`image_members`, CONSTRAINT `image_members_ibfk_1` FOREIGN KEY (`image_id`) REFERENCES `images` (`id`))\u0027) [SQL: u\u0027DELETE FROM images WHERE images.id in (SELECT T1.id FROM (SELECT images.id \\\\nFROM images \\\\nWHERE images.deleted_at \u003c %(deleted_at_1)s ORDER BY images.deleted_at \\\\n LIMIT %(param_1)s) as T1)\u0027] [parameters: {u\u0027deleted_at_1\u0027: datetime.datetime(2016, 8, 15, 9, 14, 44, 210319), u\u0027param_1\u0027: 1}]\",)\n\n\nThat\u0027s is the reason It needs a separate except block to provide custom user friendly error message.","commit_id":"992c4cedfc2f7b94b7d6444c06b9822fc76d4402"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"113aa432238ed2fe8a23526a06c13112629258f8","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            db_api.purge_deleted_rows(ctx, age_in_days, max_rows)"},{"line_number":182,"context_line":"        except exception.Invalid as exc:"},{"line_number":183,"context_line":"            sys.exit(exc.msg)"},{"line_number":184,"context_line":"        except db_exc.DBReferenceError:"},{"line_number":185,"context_line":"            sys.exit(_(\"Purge command failed, check glance-manage\""},{"line_number":186,"context_line":"                       \" logs for more details.\"))"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"class DbLegacyCommands(object):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_d8a82bde","line":186,"range":{"start_line":184,"start_character":0,"end_line":186,"end_character":50},"in_reply_to":"9ad45d7e_64574cca","updated":"2016-08-16 09:41:18.000000000","message":"Hi Hemanth,\n\nIf I am not wrong you are saying that we should raise an \u0027exception.Invalid\u0027 from \u0027db/sqlalchemy/api.py\u0027 by catching \u0027DBReferenceError\u0027 there so that we can eliminate the except block of \u0027DBReferenceError\u0027 in cmd/manage.py and use the existing except of \u0027exception.Invalid\u0027.\n\n\nBut IMO the purpose of \u0027exception.Invalid\u0027 is to be raised when user supplies an invalid data which I think is not suitable for this case as user is giving valid input and it is failing in database operation due to integrity error.","commit_id":"992c4cedfc2f7b94b7d6444c06b9822fc76d4402"}],"glance/db/sqlalchemy/api.py":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"eb9e2a9d1264c70a252e8ae1fc561b4d2d701106","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"            with session.begin():"},{"line_number":1333,"context_line":"                result \u003d session.execute(delete_statement)"},{"line_number":1334,"context_line":"        except db_exception.DBReferenceError as ex:"},{"line_number":1335,"context_line":"            LOG.error(_LE(\u0027DBError detected when purging from \u0027"},{"line_number":1336,"context_line":"                          \"%(tablename)s: %(error)s\"),"},{"line_number":1337,"context_line":"                      {\u0027tablename\u0027: tbl, \u0027error\u0027: six.text_type(ex)})"},{"line_number":1338,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_62b9ac2e","line":1335,"updated":"2016-10-20 19:48:00.000000000","message":"You should use oslo_utils here, e.g.,\n\n    except db_exceptions.DBReferenceError as ex:\n        with excutils.save_and_reraise_exception():\n            LOG.error(...)","commit_id":"a5982ff090d0eec89ac4d16784fd6107c298a5be"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cacb040fabe1520b5c4294ef884e6c2688650e43","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"            with session.begin():"},{"line_number":1333,"context_line":"                result \u003d session.execute(delete_statement)"},{"line_number":1334,"context_line":"        except db_exception.DBReferenceError as ex:"},{"line_number":1335,"context_line":"            LOG.error(_LE(\u0027DBError detected when purging from \u0027"},{"line_number":1336,"context_line":"                          \"%(tablename)s: %(error)s\"),"},{"line_number":1337,"context_line":"                      {\u0027tablename\u0027: tbl, \u0027error\u0027: six.text_type(ex)})"},{"line_number":1338,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_2e72e8ad","line":1335,"in_reply_to":"da6895a0_62b9ac2e","updated":"2016-10-24 19:55:49.000000000","message":"+1","commit_id":"a5982ff090d0eec89ac4d16784fd6107c298a5be"},{"author":{"_account_id":20191,"name":"Dinesh Bhor","email":"bhordinesh07@gmail.com","username":"dineshbhor"},"change_message_id":"7712e034f27908b263d935faea72d48a3d46d847","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"            with session.begin():"},{"line_number":1333,"context_line":"                result \u003d session.execute(delete_statement)"},{"line_number":1334,"context_line":"        except db_exception.DBReferenceError as ex:"},{"line_number":1335,"context_line":"            LOG.error(_LE(\u0027DBError detected when purging from \u0027"},{"line_number":1336,"context_line":"                          \"%(tablename)s: %(error)s\"),"},{"line_number":1337,"context_line":"                      {\u0027tablename\u0027: tbl, \u0027error\u0027: six.text_type(ex)})"},{"line_number":1338,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_fcc6dc47","line":1335,"in_reply_to":"da6895a0_62b9ac2e","updated":"2016-10-25 14:18:16.000000000","message":"Done","commit_id":"a5982ff090d0eec89ac4d16784fd6107c298a5be"}],"glance/tests/functional/db/base.py":[{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"0deef4a7a99eba0f8100bd881fd640628f8f6fd4","unresolved":false,"context_lines":[{"line_number":1929,"context_line":"        connection \u003d engine.connect()"},{"line_number":1930,"context_line":""},{"line_number":1931,"context_line":"        images \u003d sqlalchemyutils.get_table("},{"line_number":1932,"context_line":"            engine, \"images\")"},{"line_number":1933,"context_line":"        image_tags \u003d sqlalchemyutils.get_table("},{"line_number":1934,"context_line":"            engine, \"image_tags\")"},{"line_number":1935,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_39c3e78a","line":1932,"range":{"start_line":1932,"start_character":27,"end_line":1932,"end_character":29},"updated":"2016-03-31 09:23:07.000000000","message":"Should you need another patchset, please use only one line for this statement :)","commit_id":"3eac086b3843f08c7bbe438d9b701e08ceb19aad"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"0deef4a7a99eba0f8100bd881fd640628f8f6fd4","unresolved":false,"context_lines":[{"line_number":1931,"context_line":"        images \u003d sqlalchemyutils.get_table("},{"line_number":1932,"context_line":"            engine, \"images\")"},{"line_number":1933,"context_line":"        image_tags \u003d sqlalchemyutils.get_table("},{"line_number":1934,"context_line":"            engine, \"image_tags\")"},{"line_number":1935,"context_line":""},{"line_number":1936,"context_line":"        # Add a 4th row in images table and set it deleted 15 days ago"},{"line_number":1937,"context_line":"        uuidstr \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_99bcb307","line":1934,"range":{"start_line":1934,"start_character":31,"end_line":1934,"end_character":33},"updated":"2016-03-31 09:23:07.000000000","message":"Ditto.","commit_id":"3eac086b3843f08c7bbe438d9b701e08ceb19aad"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"73d748be492ddb406c10c848b288c19268886ec5","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"            # SQLAlchemy doesn\u0027t support it at all with SQLite \u003c 3.6.19"},{"line_number":2034,"context_line":"            # It works fine in SQLite 3.7."},{"line_number":2035,"context_line":"            # So return early to skip this test if running SQLite \u003c 3.7"},{"line_number":2036,"context_line":"            import sqlite3"},{"line_number":2037,"context_line":"            tup \u003d sqlite3.sqlite_version_info"},{"line_number":2038,"context_line":"            if tup[0] \u003c 3 or (tup[0] \u003d\u003d 3 and tup[1] \u003c 7):"},{"line_number":2039,"context_line":"                self.skipTest("},{"line_number":2040,"context_line":"                    \u0027sqlite version too old for reliable SQLA foreign_keys\u0027)"},{"line_number":2041,"context_line":"            # This is required for enforcing Foreign Key Constraint"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a1ced50_f8c0ebe2","line":2038,"range":{"start_line":2036,"start_character":12,"end_line":2038,"end_character":58},"updated":"2017-03-17 01:45:19.000000000","message":"I would really love to see this factored into tests/utils.py as a parameter-ized version check, such as\n\n  def sqlite_version_at_least(major, minor, patch):\n\nor something like that.","commit_id":"9843b4b342fa959530dc8af9aa2335e1bd306ee5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1d622d06cef60299c1462c727db4fe9997a65f42","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"            # SQLAlchemy doesn\u0027t support it at all with SQLite \u003c 3.6.19"},{"line_number":2034,"context_line":"            # It works fine in SQLite 3.7."},{"line_number":2035,"context_line":"            # So return early to skip this test if running SQLite \u003c 3.7"},{"line_number":2036,"context_line":"            import sqlite3"},{"line_number":2037,"context_line":"            tup \u003d sqlite3.sqlite_version_info"},{"line_number":2038,"context_line":"            if tup[0] \u003c 3 or (tup[0] \u003d\u003d 3 and tup[1] \u003c 7):"},{"line_number":2039,"context_line":"                self.skipTest("},{"line_number":2040,"context_line":"                    \u0027sqlite version too old for reliable SQLA foreign_keys\u0027)"},{"line_number":2041,"context_line":"            # This is required for enforcing Foreign Key Constraint"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a1ced50_604fa6bd","line":2038,"range":{"start_line":2036,"start_character":12,"end_line":2038,"end_character":58},"in_reply_to":"1a1ced50_f8c0ebe2","updated":"2017-03-20 08:38:28.000000000","message":"Done","commit_id":"9843b4b342fa959530dc8af9aa2335e1bd306ee5"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"14148874995b80d399480788c5fcbc6f9d9b0016","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"            # SQLAlchemy doesn\u0027t support it at all with SQLite \u003c 3.6.19"},{"line_number":2034,"context_line":"            # It works fine in SQLite 3.7."},{"line_number":2035,"context_line":"            # So return early to skip this test if running SQLite \u003c 3.7"},{"line_number":2036,"context_line":"            if test_utils.check_sqlite_minimum_version(3, 7):"},{"line_number":2037,"context_line":"                self.skipTest("},{"line_number":2038,"context_line":"                    \u0027sqlite version too old for reliable SQLA foreign_keys\u0027)"},{"line_number":2039,"context_line":"            # This is required for enforcing Foreign Key Constraint"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfeb2761_19910d4f","line":2036,"range":{"start_line":2036,"start_character":12,"end_line":2036,"end_character":60},"updated":"2017-04-04 21:39:56.000000000","message":"Shouldn\u0027t we be skipping the test if we min version is NOT met?\nHere we are skipping the test if the minimum version is met.\nWhat am I missing here?\n\nAlso, I think this check should be moved closer to the beginning of this test.","commit_id":"6d88eecfe5d94228677cbb2ff38c0391d7091246"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dc4373833c790a8469f15fca077b536dca3f4b62","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"            # SQLAlchemy doesn\u0027t support it at all with SQLite \u003c 3.6.19"},{"line_number":2034,"context_line":"            # It works fine in SQLite 3.7."},{"line_number":2035,"context_line":"            # So return early to skip this test if running SQLite \u003c 3.7"},{"line_number":2036,"context_line":"            if test_utils.check_sqlite_minimum_version(3, 7):"},{"line_number":2037,"context_line":"                self.skipTest("},{"line_number":2038,"context_line":"                    \u0027sqlite version too old for reliable SQLA foreign_keys\u0027)"},{"line_number":2039,"context_line":"            # This is required for enforcing Foreign Key Constraint"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfeb2761_ef4b2428","line":2036,"range":{"start_line":2036,"start_character":12,"end_line":2036,"end_character":60},"in_reply_to":"dfeb2761_19910d4f","updated":"2017-04-05 10:32:19.000000000","message":"Hi Hemanth,\n\nThis function will return false as we are passing minimum version 3.7, so it will not skip the test and go on to execute the same. If I specify 3.6 then it will return True and will skip the test.","commit_id":"6d88eecfe5d94228677cbb2ff38c0391d7091246"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"f9df78cca78fedb70f52b93df904705ffd5c28e4","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"            # SQLAlchemy doesn\u0027t support it at all with SQLite \u003c 3.6.19"},{"line_number":2034,"context_line":"            # It works fine in SQLite 3.7."},{"line_number":2035,"context_line":"            # So return early to skip this test if running SQLite \u003c 3.7"},{"line_number":2036,"context_line":"            if test_utils.check_sqlite_minimum_version(3, 7):"},{"line_number":2037,"context_line":"                self.skipTest("},{"line_number":2038,"context_line":"                    \u0027sqlite version too old for reliable SQLA foreign_keys\u0027)"},{"line_number":2039,"context_line":"            # This is required for enforcing Foreign Key Constraint"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfeb2761_39ba91c0","line":2036,"range":{"start_line":2036,"start_character":12,"end_line":2036,"end_character":60},"in_reply_to":"dfeb2761_19910d4f","updated":"2017-04-04 21:40:49.000000000","message":"s/if we min/if the min/","commit_id":"6d88eecfe5d94228677cbb2ff38c0391d7091246"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dc4373833c790a8469f15fca077b536dca3f4b62","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"            # SQLAlchemy doesn\u0027t support it at all with SQLite \u003c 3.6.19"},{"line_number":2034,"context_line":"            # It works fine in SQLite 3.7."},{"line_number":2035,"context_line":"            # So return early to skip this test if running SQLite \u003c 3.7"},{"line_number":2036,"context_line":"            if test_utils.check_sqlite_minimum_version(3, 7):"},{"line_number":2037,"context_line":"                self.skipTest("},{"line_number":2038,"context_line":"                    \u0027sqlite version too old for reliable SQLA foreign_keys\u0027)"},{"line_number":2039,"context_line":"            # This is required for enforcing Foreign Key Constraint"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfeb2761_0ff528ed","line":2036,"range":{"start_line":2036,"start_character":12,"end_line":2036,"end_character":60},"in_reply_to":"dfeb2761_19c58df1","updated":"2017-04-05 10:32:19.000000000","message":"Done","commit_id":"6d88eecfe5d94228677cbb2ff38c0391d7091246"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"fe9f0936f7f70d850e84cbf5d8632336b7bc6e5b","unresolved":false,"context_lines":[{"line_number":2033,"context_line":"            # SQLAlchemy doesn\u0027t support it at all with SQLite \u003c 3.6.19"},{"line_number":2034,"context_line":"            # It works fine in SQLite 3.7."},{"line_number":2035,"context_line":"            # So return early to skip this test if running SQLite \u003c 3.7"},{"line_number":2036,"context_line":"            if test_utils.check_sqlite_minimum_version(3, 7):"},{"line_number":2037,"context_line":"                self.skipTest("},{"line_number":2038,"context_line":"                    \u0027sqlite version too old for reliable SQLA foreign_keys\u0027)"},{"line_number":2039,"context_line":"            # This is required for enforcing Foreign Key Constraint"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfeb2761_19c58df1","line":2036,"range":{"start_line":2036,"start_character":12,"end_line":2036,"end_character":60},"in_reply_to":"dfeb2761_39ba91c0","updated":"2017-04-04 21:52:37.000000000","message":"per my comment in utils, if you mentally rename the function to is_sqlite_version_prior_to you get\n\n  if is_sqlite_version_prior_to(3, 7)\n    self.skipTest(\u0027...\u0027)","commit_id":"6d88eecfe5d94228677cbb2ff38c0391d7091246"}],"glance/tests/unit/test_glance_manage.py":[{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"7180810786fca2d72cf8397715fb7519c843596b","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        exit \u003d self.assertRaises(SystemExit, self.commands.purge, 10, 100)"},{"line_number":82,"context_line":"        self.assertEqual(\"Purge command failed, check glance-manage logs\""},{"line_number":83,"context_line":"                         \" for more details.\", exit.code)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad45d7e_200ae921","line":84,"updated":"2016-08-09 16:32:57.000000000","message":"This is causing the pep8 failure.","commit_id":"08319cf58bd221c9b7d8953cfe369c9b97380c30"}],"glance/tests/utils.py":[{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"14148874995b80d399480788c5fcbc6f9d9b0016","unresolved":false,"context_lines":[{"line_number":690,"context_line":"    \"\"\"Checks minimum required version for sqlite3.\"\"\""},{"line_number":691,"context_line":"    import sqlite3"},{"line_number":692,"context_line":"    tup \u003d sqlite3.sqlite_version_info"},{"line_number":693,"context_line":"    return tup[0] \u003c major or (tup[0] \u003d\u003d major and tup[1] \u003c minor)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfeb2761_b9dea16a","line":693,"range":{"start_line":693,"start_character":57,"end_line":693,"end_character":58},"updated":"2017-04-04 21:39:56.000000000","message":"\u0027\u003c\u003d\u0027?\nIf we are saying 3.7 is the minimum we need, this will return False for 3.7, guessing that\u0027s not what we intend here?","commit_id":"6d88eecfe5d94228677cbb2ff38c0391d7091246"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"fe9f0936f7f70d850e84cbf5d8632336b7bc6e5b","unresolved":false,"context_lines":[{"line_number":690,"context_line":"    \"\"\"Checks minimum required version for sqlite3.\"\"\""},{"line_number":691,"context_line":"    import sqlite3"},{"line_number":692,"context_line":"    tup \u003d sqlite3.sqlite_version_info"},{"line_number":693,"context_line":"    return tup[0] \u003c major or (tup[0] \u003d\u003d major and tup[1] \u003c minor)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfeb2761_f99c290f","line":693,"range":{"start_line":693,"start_character":57,"end_line":693,"end_character":58},"in_reply_to":"dfeb2761_b9dea16a","updated":"2017-04-04 21:52:37.000000000","message":"The way I read this, the phrasing on the method name is just ambiguous. That is a valid point for revision.\n\nThis logic is equivalent to:\n\n  def is_sqlite_version_prior_to(major, minor)","commit_id":"6d88eecfe5d94228677cbb2ff38c0391d7091246"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dc4373833c790a8469f15fca077b536dca3f4b62","unresolved":false,"context_lines":[{"line_number":690,"context_line":"    \"\"\"Checks minimum required version for sqlite3.\"\"\""},{"line_number":691,"context_line":"    import sqlite3"},{"line_number":692,"context_line":"    tup \u003d sqlite3.sqlite_version_info"},{"line_number":693,"context_line":"    return tup[0] \u003c major or (tup[0] \u003d\u003d major and tup[1] \u003c minor)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfeb2761_eff9e4c7","line":693,"range":{"start_line":693,"start_character":57,"end_line":693,"end_character":58},"in_reply_to":"dfeb2761_f99c290f","updated":"2017-04-05 10:32:19.000000000","message":"Done","commit_id":"6d88eecfe5d94228677cbb2ff38c0391d7091246"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"8fbb258d2bf21948b40e75cc7d1ea4ba48adc7b7","unresolved":false,"context_lines":[{"line_number":686,"context_line":"    alembic_command.upgrade(alembic_config, version)"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"def is_sqlite_version_prior_to(major, minor):"},{"line_number":690,"context_line":"    import sqlite3"},{"line_number":691,"context_line":"    tup \u003d sqlite3.sqlite_version_info"},{"line_number":692,"context_line":"    return tup[0] \u003c major or (tup[0] \u003d\u003d major and tup[1] \u003c minor)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bff0334d_60e112d1","line":689,"range":{"start_line":689,"start_character":4,"end_line":689,"end_character":30},"updated":"2017-04-05 13:04:38.000000000","message":"Thanks, this makes a lot more sense.","commit_id":"c9a21f655e63e4d0fc3a7a7b687c611900a91e69"}]}
