)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"1632c228eea02f9195cb46f95c36b0de1ac1d618","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Hemanth Makkapati \u003chemanth.makkapati@rackspace.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-01-31 22:45:46 -0600"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Testing changes required with Alembic move"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Functional tests now use alembic"},{"line_number":10,"context_line":"* All tests now use file-based sqlite db"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a461143_52948243","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":42},"updated":"2017-02-01 21:00:38.000000000","message":"I\u0027d rather put this in different words which indicate \"testing refactor to accommodate alembic migrations\"","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"556ee3dde856ef28d1f01caf829b93ec6d5f8649","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Hemanth Makkapati \u003chemanth.makkapati@rackspace.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-01-31 22:45:46 -0600"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Testing changes required with Alembic move"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Functional tests now use alembic"},{"line_number":10,"context_line":"* All tests now use file-based sqlite db"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a461143_6d9fe350","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":42},"in_reply_to":"3a461143_52948243","updated":"2017-02-01 21:23:52.000000000","message":"Hmm, I could have done a better job with the commit message. If you think it\u0027s a deal breaker, I\u0027ll push up another PS. Wondering if there\u0027s enough time ...","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"1632c228eea02f9195cb46f95c36b0de1ac1d618","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Testing changes required with Alembic move"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Functional tests now use alembic"},{"line_number":10,"context_line":"* All tests now use file-based sqlite db"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partially-Implements: blueprint alembic-migrations"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a461143_120bda7e","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":34},"updated":"2017-02-01 21:00:38.000000000","message":"what\u0027s been removed?","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"556ee3dde856ef28d1f01caf829b93ec6d5f8649","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Testing changes required with Alembic move"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Functional tests now use alembic"},{"line_number":10,"context_line":"* All tests now use file-based sqlite db"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partially-Implements: blueprint alembic-migrations"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a461143_ed8bd31c","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":34},"in_reply_to":"3a461143_120bda7e","updated":"2017-02-01 21:23:52.000000000","message":"Tests like the rest of the Glance code used sqlalchemy-migrate to build and destroy the database. We are replacing sqlalchemy-migrate with alembic for Glance in general as well as tests.","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"db86c2ff3cef6d45a8de6b349f82c303dca6a3d9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Testing changes required with Alembic move"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Functional tests now use alembic"},{"line_number":10,"context_line":"* All tests now use file-based sqlite db"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partially-Implements: blueprint alembic-migrations"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a461143_b8d747ec","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":34},"in_reply_to":"3a461143_78f5dfc9","updated":"2017-02-01 21:44:44.000000000","message":"Done","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"658e59ad1071462f2691ca096b8920a4dbfd5dcc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Testing changes required with Alembic move"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"* Functional tests now use alembic"},{"line_number":10,"context_line":"* All tests now use file-based sqlite db"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Partially-Implements: blueprint alembic-migrations"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3a461143_78f5dfc9","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":34},"in_reply_to":"3a461143_ed8bd31c","updated":"2017-02-01 21:39:33.000000000","message":"Please add the same to the CM","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"}],"glance/db/sqlalchemy/alembic_migrations/__init__.py":[{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"326d1044afb47b9121b9623c350a564173950b13","unresolved":false,"context_lines":[{"line_number":72,"context_line":"def place_database_under_alembic_control():"},{"line_number":73,"context_line":"    a_config \u003d get_alembic_config()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    if not is_database_under_migrate_control():"},{"line_number":76,"context_line":"        return"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    if not is_database_under_alembic_control():"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a3905b3_22aed4e7","line":75,"updated":"2017-01-24 19:46:28.000000000","message":"So if there is no legacy head, do nothing? Seems like the side effect of this function should be that the database is under alembic control regardless of current control.","commit_id":"583a949d7e356cdd0947326301f9e38882bf42d7"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"263cbd9ccee42f244ee17edd13a4b93f15a581ab","unresolved":false,"context_lines":[{"line_number":72,"context_line":"def place_database_under_alembic_control():"},{"line_number":73,"context_line":"    a_config \u003d get_alembic_config()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    if not is_database_under_migrate_control():"},{"line_number":76,"context_line":"        return"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    if not is_database_under_alembic_control():"}],"source_content_type":"text/x-python","patch_set":7,"id":"5a3905b3_16b4bdcf","line":75,"in_reply_to":"5a3905b3_22aed4e7","updated":"2017-01-24 20:07:16.000000000","message":"If the database is not under legacy control, it should be a new database. If it\u0027s a new database then we can\u0027t stamp it with a specific version. So, alembic would bring the new database up to the latest version and stamp it accordingly.","commit_id":"583a949d7e356cdd0947326301f9e38882bf42d7"}],"glance/tests/functional/db/migrations/test_mitaka01.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b035099c479c94ed08d6d7b0d2cc199855d56095","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2016 Rackspace"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_c65b392d","line":1,"updated":"2016-12-19 21:33:25.000000000","message":"You don\u0027t work for the OpenStack Foundation, so you can\u0027t legally attribute copyright to the Foundation.","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"eebbb4a830450dbe658feaa04f5d64777324fa23","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2016 Rackspace"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_b112c207","line":1,"in_reply_to":"1a6eadb0_c65b392d","updated":"2016-12-20 18:28:24.000000000","message":"Done","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b035099c479c94ed08d6d7b0d2cc199855d56095","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def get_indexes(table, engine):"},{"line_number":25,"context_line":"    inspector \u003d sqlalchemy.inspect(engine)"},{"line_number":26,"context_line":"    return [idx.get(\u0027name\u0027) for idx in inspector.get_indexes(table)]"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class TestMitaka01Mixin(test_migrations.AlembicMigrationsMixin):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_066531e0","line":26,"updated":"2016-12-19 21:33:25.000000000","message":"Why do you need .get() here? Don\u0027t all indexes have names? If they don\u0027t, should this method really return a bunch of null values randomly scattered throughout a list?","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"eebbb4a830450dbe658feaa04f5d64777324fa23","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"def get_indexes(table, engine):"},{"line_number":25,"context_line":"    inspector \u003d sqlalchemy.inspect(engine)"},{"line_number":26,"context_line":"    return [idx.get(\u0027name\u0027) for idx in inspector.get_indexes(table)]"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"class TestMitaka01Mixin(test_migrations.AlembicMigrationsMixin):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_b1e002fc","line":26,"in_reply_to":"1a6eadb0_066531e0","updated":"2016-12-20 18:28:24.000000000","message":"Done","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"1632c228eea02f9195cb46f95c36b0de1ac1d618","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    return [idx[\u0027name\u0027] for idx in inspector.get_indexes(table)]"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class TestMitaka01Mixin(test_migrations.AlembicMigrationsMixin):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _pre_upgrade_mitaka01(self, engine):"},{"line_number":27,"context_line":"        indexes \u003d get_indexes(\u0027images\u0027, engine)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_52256208","line":24,"range":{"start_line":24,"start_character":6,"end_line":24,"end_character":18},"updated":"2017-02-01 21:00:38.000000000","message":"01, 02, 0N terminology sounds vague\n\nI would prefer a verbose name.","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"556ee3dde856ef28d1f01caf829b93ec6d5f8649","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    return [idx[\u0027name\u0027] for idx in inspector.get_indexes(table)]"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class TestMitaka01Mixin(test_migrations.AlembicMigrationsMixin):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _pre_upgrade_mitaka01(self, engine):"},{"line_number":27,"context_line":"        indexes \u003d get_indexes(\u0027images\u0027, engine)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_cd99b7d2","line":24,"range":{"start_line":24,"start_character":6,"end_line":24,"end_character":18},"in_reply_to":"3a461143_52256208","updated":"2017-02-01 21:23:52.000000000","message":"01, 02 ... 0N represent the migration sequence. It is very similar to the sequence we have currently. In fact, the one proposed here is better in the way that it tells you exactly what release a migration belongs and where does it belong in the sequence.","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"658e59ad1071462f2691ca096b8920a4dbfd5dcc","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    return [idx[\u0027name\u0027] for idx in inspector.get_indexes(table)]"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class TestMitaka01Mixin(test_migrations.AlembicMigrationsMixin):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def _pre_upgrade_mitaka01(self, engine):"},{"line_number":27,"context_line":"        indexes \u003d get_indexes(\u0027images\u0027, engine)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_385c37ed","line":24,"range":{"start_line":24,"start_character":6,"end_line":24,"end_character":18},"in_reply_to":"3a461143_cd99b7d2","updated":"2017-02-01 21:39:33.000000000","message":"cool, ty. works in that case.","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"}],"glance/tests/functional/db/migrations/test_mitaka02.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b035099c479c94ed08d6d7b0d2cc199855d56095","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2016 Rackspace"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_a6a47d08","line":1,"updated":"2016-12-19 21:33:25.000000000","message":"Same.","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"eebbb4a830450dbe658feaa04f5d64777324fa23","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2016 Rackspace"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_9126a666","line":1,"in_reply_to":"1a6eadb0_a6a47d08","updated":"2016-12-20 18:28:24.000000000","message":"Done","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"}],"glance/tests/functional/db/test_migrations.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b035099c479c94ed08d6d7b0d2cc199855d56095","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2013 IBM Corp."},{"line_number":3,"context_line":"# Copyright 2016 Rackspace"},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_06e4510b","line":2,"updated":"2016-12-19 21:33:25.000000000","message":"Is this a copy / paste of an old file or something?","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"eebbb4a830450dbe658feaa04f5d64777324fa23","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2013 IBM Corp."},{"line_number":3,"context_line":"# Copyright 2016 Rackspace"},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"# All Rights Reserved."}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_11f296d2","line":2,"in_reply_to":"1a6eadb0_06e4510b","updated":"2016-12-20 18:28:24.000000000","message":"Done","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b035099c479c94ed08d6d7b0d2cc199855d56095","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    pass"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class TestSqliteMigrations(test_base.DbTestCase, AlembicMigrationsMixin):"},{"line_number":95,"context_line":"    pass"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_8616a1a5","line":94,"updated":"2016-12-19 21:33:25.000000000","message":"In Keystone, we\u0027ve basically given up on testing migrations in SQLite, because it\u0027s not worth the effort to workaround the deficiencies you run into with SQLite just to run tests... for a database that no one uses in production.","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"eebbb4a830450dbe658feaa04f5d64777324fa23","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    pass"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class TestSqliteMigrations(test_base.DbTestCase, AlembicMigrationsMixin):"},{"line_number":95,"context_line":"    pass"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a6eadb0_31c0722a","line":94,"in_reply_to":"1a6eadb0_8616a1a5","updated":"2016-12-20 18:28:24.000000000","message":"We\u0027re keeping it around so that we don\u0027t have to introduce a dependency on either MySQL or PostgreSQL in unit testing environments.","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"1632c228eea02f9195cb46f95c36b0de1ac1d618","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    def db_sync(self, engine):"},{"line_number":128,"context_line":"        test_utils.db_sync(engine\u003dengine)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    # TODO(akamyshikova): remove this method as soon as comparison with Variant"},{"line_number":131,"context_line":"    # will be implemented in oslo.db or alembic"},{"line_number":132,"context_line":"    def compare_type(self, ctxt, insp_col, meta_col, insp_type, meta_type):"},{"line_number":133,"context_line":"        if isinstance(meta_type, types.Variant):"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_b2ee86b2","line":130,"range":{"start_line":130,"start_character":11,"end_line":130,"end_character":23},"updated":"2017-02-01 21:00:38.000000000","message":"is this person a co-author?","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"658e59ad1071462f2691ca096b8920a4dbfd5dcc","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    def db_sync(self, engine):"},{"line_number":128,"context_line":"        test_utils.db_sync(engine\u003dengine)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    # TODO(akamyshikova): remove this method as soon as comparison with Variant"},{"line_number":131,"context_line":"    # will be implemented in oslo.db or alembic"},{"line_number":132,"context_line":"    def compare_type(self, ctxt, insp_col, meta_col, insp_type, meta_type):"},{"line_number":133,"context_line":"        if isinstance(meta_type, types.Variant):"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_781cff13","line":130,"range":{"start_line":130,"start_character":11,"end_line":130,"end_character":23},"in_reply_to":"3a461143_4d95c786","updated":"2017-02-01 21:39:33.000000000","message":"ack","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"556ee3dde856ef28d1f01caf829b93ec6d5f8649","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    def db_sync(self, engine):"},{"line_number":128,"context_line":"        test_utils.db_sync(engine\u003dengine)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    # TODO(akamyshikova): remove this method as soon as comparison with Variant"},{"line_number":131,"context_line":"    # will be implemented in oslo.db or alembic"},{"line_number":132,"context_line":"    def compare_type(self, ctxt, insp_col, meta_col, insp_type, meta_type):"},{"line_number":133,"context_line":"        if isinstance(meta_type, types.Variant):"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a461143_4d95c786","line":130,"range":{"start_line":130,"start_character":11,"end_line":130,"end_character":23},"in_reply_to":"3a461143_b2ee86b2","updated":"2017-02-01 21:23:52.000000000","message":"Nope, it is the original note in the file I deleted. Just preserving it.","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"}],"tox.ini":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b035099c479c94ed08d6d7b0d2cc199855d56095","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# NOTE(hemanthm): The environment variable \"OS_TEST_DBAPI_ADMIN_CONNECTION\""},{"line_number":11,"context_line":"# must be set to force oslo.db tests to use a file-based sqlite database"},{"line_number":12,"context_line":"# instead of the default in-memory database, which doesn\u0027t work well with"},{"line_number":13,"context_line":"# alembic migrations. The file-based database pointed by the environment"},{"line_number":14,"context_line":"# variable itself is not used for testing. Oslo.db creates another file-based"},{"line_number":15,"context_line":"# database for testing purposes and deletes it as a part of its test clean-up."},{"line_number":16,"context_line":"# Think of setting this environment variable as a clue for oslo.db to use"}],"source_content_type":"text/x-properties","patch_set":2,"id":"1a6eadb0_46e2c9a0","line":13,"updated":"2016-12-19 21:33:25.000000000","message":"Why doesn\u0027t it work well with alembic migrations? If you only have a single instance of the engine, then an in-memory database should be fine. Doing tests in a SQLite database on disk will have relatively terrible performance.","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"eebbb4a830450dbe658feaa04f5d64777324fa23","unresolved":false,"context_lines":[{"line_number":10,"context_line":"# NOTE(hemanthm): The environment variable \"OS_TEST_DBAPI_ADMIN_CONNECTION\""},{"line_number":11,"context_line":"# must be set to force oslo.db tests to use a file-based sqlite database"},{"line_number":12,"context_line":"# instead of the default in-memory database, which doesn\u0027t work well with"},{"line_number":13,"context_line":"# alembic migrations. The file-based database pointed by the environment"},{"line_number":14,"context_line":"# variable itself is not used for testing. Oslo.db creates another file-based"},{"line_number":15,"context_line":"# database for testing purposes and deletes it as a part of its test clean-up."},{"line_number":16,"context_line":"# Think of setting this environment variable as a clue for oslo.db to use"}],"source_content_type":"text/x-properties","patch_set":2,"id":"1a6eadb0_91fea669","line":13,"in_reply_to":"1a6eadb0_46e2c9a0","updated":"2016-12-20 18:28:24.000000000","message":"Hemanth can speak more about the reason, but I think the issue was with Alembic creating a new session for each migration wiping out the in-memory database each time.","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"b035099c479c94ed08d6d7b0d2cc199855d56095","unresolved":false,"context_lines":[{"line_number":23,"context_line":"deps \u003d -r{toxinidir}/test-requirements.txt"},{"line_number":24,"context_line":"commands \u003d"},{"line_number":25,"context_line":"  ostestr --slowest {posargs}"},{"line_number":26,"context_line":"  rm -f /tmp/glance-db-models-sync-test.db"},{"line_number":27,"context_line":"whitelist_externals \u003d"},{"line_number":28,"context_line":"  bash"},{"line_number":29,"context_line":"  rm"}],"source_content_type":"text/x-properties","patch_set":2,"id":"1a6eadb0_066a911a","line":26,"updated":"2016-12-19 21:33:25.000000000","message":"Without using ignore_errors here, if ostestr fails... then this db file will not be cleaned up. Instead, clean it up closer to where the file is created in a finally clause, test cleanup, test teardown, etc.","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":22448,"name":"Alexander Bashmakov","email":"abashmak@yahoo.com","username":"abashmak"},"change_message_id":"eebbb4a830450dbe658feaa04f5d64777324fa23","unresolved":false,"context_lines":[{"line_number":23,"context_line":"deps \u003d -r{toxinidir}/test-requirements.txt"},{"line_number":24,"context_line":"commands \u003d"},{"line_number":25,"context_line":"  ostestr --slowest {posargs}"},{"line_number":26,"context_line":"  rm -f /tmp/glance-db-models-sync-test.db"},{"line_number":27,"context_line":"whitelist_externals \u003d"},{"line_number":28,"context_line":"  bash"},{"line_number":29,"context_line":"  rm"}],"source_content_type":"text/x-properties","patch_set":2,"id":"1a6eadb0_514a4e84","line":26,"in_reply_to":"1a6eadb0_066a911a","updated":"2016-12-20 18:28:24.000000000","message":"Good point. We could look at doing that. However, given that this is an empty file, is it really that much of an issue if it\u0027s left behind?","commit_id":"ab6093a450d697917495930a64ca923ae1c52d62"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"db86c2ff3cef6d45a8de6b349f82c303dca6a3d9","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# must be set to force oslo.db tests to use a file-based sqlite database"},{"line_number":15,"context_line":"# instead of the default in-memory database, which doesn\u0027t work well with"},{"line_number":16,"context_line":"# alembic migrations. The file-based database pointed by the environment"},{"line_number":17,"context_line":"# variable itself is not used for testing. Oslo.db creates another file-based"},{"line_number":18,"context_line":"# database for testing purposes and deletes it as a part of its test clean-up."},{"line_number":19,"context_line":"# Think of setting this environment variable as a clue for oslo.db to use"},{"line_number":20,"context_line":"# file-based database."},{"line_number":21,"context_line":"  OS_TEST_DBAPI_ADMIN_CONNECTION\u003dsqlite:////tmp/glance-db-models-sync-test.db"}],"source_content_type":"text/x-properties","patch_set":16,"id":"3a461143_18e69be8","line":18,"range":{"start_line":17,"start_character":43,"end_line":18,"end_character":78},"updated":"2017-02-01 21:44:44.000000000","message":"The clean-up part is already mentioned here. Do we want to mention it again?","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"2bb10ef64cbb814c6403dce503a0f80f7e88e5cf","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# must be set to force oslo.db tests to use a file-based sqlite database"},{"line_number":15,"context_line":"# instead of the default in-memory database, which doesn\u0027t work well with"},{"line_number":16,"context_line":"# alembic migrations. The file-based database pointed by the environment"},{"line_number":17,"context_line":"# variable itself is not used for testing. Oslo.db creates another file-based"},{"line_number":18,"context_line":"# database for testing purposes and deletes it as a part of its test clean-up."},{"line_number":19,"context_line":"# Think of setting this environment variable as a clue for oslo.db to use"},{"line_number":20,"context_line":"# file-based database."},{"line_number":21,"context_line":"  OS_TEST_DBAPI_ADMIN_CONNECTION\u003dsqlite:////tmp/glance-db-models-sync-test.db"}],"source_content_type":"text/x-properties","patch_set":16,"id":"3a461143_78d79fbf","line":18,"range":{"start_line":17,"start_character":43,"end_line":18,"end_character":78},"in_reply_to":"3a461143_18e69be8","updated":"2017-02-01 21:49:09.000000000","message":"Thanks. I think the misleading part is the value of that variable name. If it\u0027s never getting used, may be change the value to \"/tmp/placeholder-never-used.file\"","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"1632c228eea02f9195cb46f95c36b0de1ac1d618","unresolved":false,"context_lines":[{"line_number":18,"context_line":"# database for testing purposes and deletes it as a part of its test clean-up."},{"line_number":19,"context_line":"# Think of setting this environment variable as a clue for oslo.db to use"},{"line_number":20,"context_line":"# file-based database."},{"line_number":21,"context_line":"  OS_TEST_DBAPI_ADMIN_CONNECTION\u003dsqlite:////tmp/glance-db-models-sync-test.db"},{"line_number":22,"context_line":"usedevelop \u003d True"},{"line_number":23,"context_line":"install_command \u003d pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}"},{"line_number":24,"context_line":"deps \u003d -r{toxinidir}/test-requirements.txt"}],"source_content_type":"text/x-properties","patch_set":16,"id":"3a461143_924a6a54","line":21,"range":{"start_line":21,"start_character":2,"end_line":21,"end_character":77},"updated":"2017-02-01 21:00:38.000000000","message":"so how will this work? will it be cleaned up after each run or someone manually has to go edit this file?\n\nI am curious as to why will it not work if we use https://docs.python.org/2.7/library/tempfile.html ?","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"658e59ad1071462f2691ca096b8920a4dbfd5dcc","unresolved":false,"context_lines":[{"line_number":18,"context_line":"# database for testing purposes and deletes it as a part of its test clean-up."},{"line_number":19,"context_line":"# Think of setting this environment variable as a clue for oslo.db to use"},{"line_number":20,"context_line":"# file-based database."},{"line_number":21,"context_line":"  OS_TEST_DBAPI_ADMIN_CONNECTION\u003dsqlite:////tmp/glance-db-models-sync-test.db"},{"line_number":22,"context_line":"usedevelop \u003d True"},{"line_number":23,"context_line":"install_command \u003d pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}"},{"line_number":24,"context_line":"deps \u003d -r{toxinidir}/test-requirements.txt"}],"source_content_type":"text/x-properties","patch_set":16,"id":"3a461143_38b8b7e5","line":21,"range":{"start_line":21,"start_character":2,"end_line":21,"end_character":77},"in_reply_to":"3a461143_4d714777","updated":"2017-02-01 21:39:33.000000000","message":"Cool. Please append the \"cleaned up\" comment in your next PS.","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"556ee3dde856ef28d1f01caf829b93ec6d5f8649","unresolved":false,"context_lines":[{"line_number":18,"context_line":"# database for testing purposes and deletes it as a part of its test clean-up."},{"line_number":19,"context_line":"# Think of setting this environment variable as a clue for oslo.db to use"},{"line_number":20,"context_line":"# file-based database."},{"line_number":21,"context_line":"  OS_TEST_DBAPI_ADMIN_CONNECTION\u003dsqlite:////tmp/glance-db-models-sync-test.db"},{"line_number":22,"context_line":"usedevelop \u003d True"},{"line_number":23,"context_line":"install_command \u003d pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}"},{"line_number":24,"context_line":"deps \u003d -r{toxinidir}/test-requirements.txt"}],"source_content_type":"text/x-properties","patch_set":16,"id":"3a461143_4d714777","line":21,"range":{"start_line":21,"start_character":2,"end_line":21,"end_character":77},"in_reply_to":"3a461143_924a6a54","updated":"2017-02-01 21:23:52.000000000","message":"This file (/tmp/glance-db-models-sync-test.db) actually doesn\u0027t exist. Neither does it get created. It is just a way to trick oslo.db into using file-based database v.s. in-memory db. The file-based db that does get created during testing is cleaned up.","commit_id":"ab4258ffbeec20a52eca137495cea1a6b6ae22c0"}]}
