)]}'
{"trove/db/sqlalchemy/migrate_repo/versions/016_add_datastore_type.py":[{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"84dc0e532a59fc7253c3b33a1b782e3b799ced55","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from migrate.changeset.constraint import ForeignKeyConstraint"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from sqlalchemy import ForeignKey"},{"line_number":18,"context_line":"from sqlalchemy.schema import Column"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_a3778b01","line":15,"updated":"2014-08-15 01:29:33.000000000","message":"http://docs.openstack.org/developer/hacking/ says this should be grouped with other third-party libs. Although I\u0027m not sure how closely we follow that.","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"cf8779758fa4599f25c4ea059beebca165614469","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from migrate.changeset.constraint import ForeignKeyConstraint"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from sqlalchemy import ForeignKey"},{"line_number":18,"context_line":"from sqlalchemy.schema import Column"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_532d8d45","line":15,"in_reply_to":"7ac7a964_a3778b01","updated":"2014-08-15 17:07:33.000000000","message":"migrate and sqlalchemy are third party libs, and I think the imports are already grouped together. I assume you meant there shouldn\u0027t be a blank line after the migrate import. I\u0027m removing it now.","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"84dc0e532a59fc7253c3b33a1b782e3b799ced55","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy.schema import MetaData"},{"line_number":20,"context_line":"from sqlalchemy.schema import UniqueConstraint"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":23,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Boolean"},{"line_number":24,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import create_tables"},{"line_number":25,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import drop_tables"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_68a3929e","line":22,"updated":"2014-08-15 01:29:33.000000000","message":"http://docs.openstack.org/developer/hacking/ says this should after line 27.","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"cf8779758fa4599f25c4ea059beebca165614469","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy.schema import MetaData"},{"line_number":20,"context_line":"from sqlalchemy.schema import UniqueConstraint"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":23,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Boolean"},{"line_number":24,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import create_tables"},{"line_number":25,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import drop_tables"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_b53fac24","line":22,"in_reply_to":"7ac7a964_68a3929e","updated":"2014-08-15 17:07:33.000000000","message":"Done","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c7b9bed794f171da027c9b3f7a9ef7f702dd1682","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import drop_tables"},{"line_number":24,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":25,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":26,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"meta \u003d MetaData()"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_18bb1ec5","line":26,"updated":"2014-08-16 14:09:54.000000000","message":"should come before line #21","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"b01e635a9d8bc3b2f8a80bf46a457392de141fd4","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import drop_tables"},{"line_number":24,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":25,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":26,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"meta \u003d MetaData()"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_b7dd2417","line":26,"in_reply_to":"7ac7a964_18bb1ec5","updated":"2014-08-18 15:27:20.000000000","message":"According to this guideline and it\u0027s example http://docs.openstack.org/developer/hacking/#import-order-template, my import ordering is actually correct. \"utils\" is after \"migrate\".","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c3e71c78716926eebf0cb2cc34f24cb2120a0ce4","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import drop_tables"},{"line_number":24,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":25,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":26,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"meta \u003d MetaData()"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_d726ceb9","line":26,"updated":"2014-08-27 11:41:06.000000000","message":"this import should come before line #21","commit_id":"b70dad4cd4d86291dc8d8dee43118bf827af0242"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"789be7abcff8aecacc6e4d4b56c282ceb7e50aae","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import drop_tables"},{"line_number":24,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":25,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":26,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"meta \u003d MetaData()"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_0c690bbe","line":26,"in_reply_to":"1abeadc6_d726ceb9","updated":"2014-08-27 18:30:49.000000000","message":"Done","commit_id":"b70dad4cd4d86291dc8d8dee43118bf827af0242"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"35b8bac826ccc40745e671671ab12b59b336ef8e","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":71,"context_line":"    params \u003d {\u0027columns\u0027: [instances.c.datastore_version_id],"},{"line_number":72,"context_line":"              \u0027refcolumns\u0027: [datastore_versions.c.id]}"},{"line_number":73,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":74,"context_line":"        params[\u0027name\u0027] \u003d db_utils.get_foreign_key_constraint_name("},{"line_number":75,"context_line":"            engine\u003dmigrate_engine,"},{"line_number":76,"context_line":"            table\u003d\u0027instances\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_f8e52c09","line":73,"updated":"2014-09-04 11:44:37.000000000","message":"why only MySQL?","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"bd698281a9f8ad0918203cf558bb582115e7b4f4","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":71,"context_line":"    params \u003d {\u0027columns\u0027: [instances.c.datastore_version_id],"},{"line_number":72,"context_line":"              \u0027refcolumns\u0027: [datastore_versions.c.id]}"},{"line_number":73,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":74,"context_line":"        params[\u0027name\u0027] \u003d db_utils.get_foreign_key_constraint_name("},{"line_number":75,"context_line":"            engine\u003dmigrate_engine,"},{"line_number":76,"context_line":"            table\u003d\u0027instances\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_3ae2f32f","line":73,"in_reply_to":"fa98f980_f8e52c09","updated":"2014-09-16 22:11:20.000000000","message":"Condition removed.","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"}],"trove/db/sqlalchemy/migrate_repo/versions/020_configurations.py":[{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"84dc0e532a59fc7253c3b33a1b782e3b799ced55","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":68,"context_line":"        instances.create_column(Column(\u0027configuration_id\u0027, String(36),"},{"line_number":69,"context_line":"                                       ForeignKey(\"configurations.id\")))"},{"line_number":70,"context_line":"    except (OperationalError, ProgrammingError) as e:"},{"line_number":71,"context_line":"        logger.info(e)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_2321bb9f","line":70,"updated":"2014-08-15 01:29:33.000000000","message":"Can you explain when ProgrammingError is thrown? It sounds like something that is fatal. More general question if you know: Why is only OperationalError getting logged and the rest are allowed to bubble up?","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"cf8779758fa4599f25c4ea059beebca165614469","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":68,"context_line":"        instances.create_column(Column(\u0027configuration_id\u0027, String(36),"},{"line_number":69,"context_line":"                                       ForeignKey(\"configurations.id\")))"},{"line_number":70,"context_line":"    except (OperationalError, ProgrammingError) as e:"},{"line_number":71,"context_line":"        logger.info(e)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_86a9a4e1","line":70,"in_reply_to":"7ac7a964_2321bb9f","updated":"2014-08-15 17:07:33.000000000","message":"ProgrammingError is thrown by PostgreSQL when we try to create tables that already exists. MySQL throws OperationalError when this happens. Only the OperationalError and ProgrammingError are logged here because downgrade() do not drop the tables due to concerns of losing end user config settings. Such errors is not a fatal situation and therefore only needs to be handled and logged.","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"e62708a73d1a7510c6468c02bac7c1f985c7e83b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":68,"context_line":"        instances.create_column(Column(\u0027configuration_id\u0027, String(36),"},{"line_number":69,"context_line":"                                       ForeignKey(\"configurations.id\")))"},{"line_number":70,"context_line":"    except (OperationalError, ProgrammingError) as e:"},{"line_number":71,"context_line":"        logger.info(e)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_e2207db2","line":70,"updated":"2014-08-15 19:45:40.000000000","message":"Nice to have: comment stating when these are thrown.","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"b01e635a9d8bc3b2f8a80bf46a457392de141fd4","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":68,"context_line":"        instances.create_column(Column(\u0027configuration_id\u0027, String(36),"},{"line_number":69,"context_line":"                                       ForeignKey(\"configurations.id\")))"},{"line_number":70,"context_line":"    except (OperationalError, ProgrammingError) as e:"},{"line_number":71,"context_line":"        logger.info(e)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_ebd5f543","line":70,"in_reply_to":"7ac7a964_e2207db2","updated":"2014-08-18 15:27:20.000000000","message":"Done","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"92d7441b83c8caa5e4b0167b2fab8df638c88e69","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":68,"context_line":"        instances.create_column(Column(\u0027configuration_id\u0027, String(36),"},{"line_number":69,"context_line":"                                       ForeignKey(\"configurations.id\")))"},{"line_number":70,"context_line":"    except (OperationalError, ProgrammingError) as e:"},{"line_number":71,"context_line":"        # OperationalError is thrown by MySQL"},{"line_number":72,"context_line":"        # ProgrammingError is thrown by PostgreSQL"},{"line_number":73,"context_line":"        logger.info(e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_d19468ea","line":70,"updated":"2014-08-25 21:23:28.000000000","message":"It is not appropriate to simply eat a ProgrammingError here.  It is indended to catch a \"Table Exists\" exception, but there could be any number of other conditions that would raise this exception.  Also, this would hide an exception in the initial table create.\n\nAdditionally, the whole concept of not dropping the tables during a downgrade is flawed.  If a bug in a future version corrupted the data in the table, downgrading would need to fix the error, which it could do only by dropping the table.\n\nI will add a bug report for this issue.","commit_id":"74f243e9232824bbd48e8f4b040992d3cd7ebbe1"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"75c9fe5eca9e1e8557508345af8e7e47e55fa5a2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":68,"context_line":"        instances.create_column(Column(\u0027configuration_id\u0027, String(36),"},{"line_number":69,"context_line":"                                       ForeignKey(\"configurations.id\")))"},{"line_number":70,"context_line":"    except (OperationalError, ProgrammingError) as e:"},{"line_number":71,"context_line":"        # OperationalError is thrown by MySQL"},{"line_number":72,"context_line":"        # ProgrammingError is thrown by PostgreSQL"},{"line_number":73,"context_line":"        logger.info(e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_c4bff15e","line":70,"in_reply_to":"1abeadc6_842fb987","updated":"2014-08-27 16:22:08.000000000","message":"Mat, I abandoned 117048 and created a new change set that depends on this change. The new change set is located at https://review.openstack.org/#/c/117291/ ProgrammingError is specific to PostgresSQL, and it seems such issue should be committed under a separate bug, which is what I\u0027m going to do.","commit_id":"74f243e9232824bbd48e8f4b040992d3cd7ebbe1"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"e91b2356147ca0d0a2a4b53b3b12f8c14a4b1d97","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":68,"context_line":"        instances.create_column(Column(\u0027configuration_id\u0027, String(36),"},{"line_number":69,"context_line":"                                       ForeignKey(\"configurations.id\")))"},{"line_number":70,"context_line":"    except (OperationalError, ProgrammingError) as e:"},{"line_number":71,"context_line":"        # OperationalError is thrown by MySQL"},{"line_number":72,"context_line":"        # ProgrammingError is thrown by PostgreSQL"},{"line_number":73,"context_line":"        logger.info(e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_d899c46f","line":70,"in_reply_to":"1abeadc6_d19468ea","updated":"2014-08-26 16:55:04.000000000","message":"Bug #1361389 filed. I\u0027m backing out the ProgrammingError change here. This try except block will not be needed if we decide to drop the tables in downgrade()","commit_id":"74f243e9232824bbd48e8f4b040992d3cd7ebbe1"},{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"45508c2a8fa9796c1c93f500f6345baba01fde6b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":68,"context_line":"        instances.create_column(Column(\u0027configuration_id\u0027, String(36),"},{"line_number":69,"context_line":"                                       ForeignKey(\"configurations.id\")))"},{"line_number":70,"context_line":"    except (OperationalError, ProgrammingError) as e:"},{"line_number":71,"context_line":"        # OperationalError is thrown by MySQL"},{"line_number":72,"context_line":"        # ProgrammingError is thrown by PostgreSQL"},{"line_number":73,"context_line":"        logger.info(e)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_842fb987","line":70,"in_reply_to":"1abeadc6_d899c46f","updated":"2014-08-27 16:05:01.000000000","message":"Simon can you describe the state of this and how it relates to https://review.openstack.org/#/c/117048? I\u0027m all for having a smaller net to catch \"table exists\" errors but you removed this altogether. And https://review.openstack.org/#/c/117048 is Abandoned so the tables won\u0027t be dropped. How is ProgrammingError no longer necessary here?","commit_id":"74f243e9232824bbd48e8f4b040992d3cd7ebbe1"}],"trove/db/sqlalchemy/migrate_repo/versions/027_add_datastore_capabilities.py":[{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"35b8bac826ccc40745e671671ab12b59b336ef8e","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def downgrade(migrate_engine):"},{"line_number":60,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":61,"context_line":"    drop_tables([capability_overrides, capabilities])"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_b89c845e","line":61,"updated":"2014-09-04 11:44:37.000000000","message":"why this change? is the order significant?","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"bd698281a9f8ad0918203cf558bb582115e7b4f4","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def downgrade(migrate_engine):"},{"line_number":60,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":61,"context_line":"    drop_tables([capability_overrides, capabilities])"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_fa906b98","line":61,"in_reply_to":"fa98f980_b89c845e","updated":"2014-09-16 22:11:20.000000000","message":"Yes, the order is significant. I tested the original downgrade code and it failed.","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"}],"trove/db/sqlalchemy/migrate_repo/versions/029_add_backup_datastore.py":[{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"84dc0e532a59fc7253c3b33a1b782e3b799ced55","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from sqlalchemy.schema import Column"},{"line_number":19,"context_line":"from sqlalchemy.schema import MetaData"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":22,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":23,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_488976ea","line":21,"updated":"2014-08-15 01:29:33.000000000","message":"See comments on 016_add_datastore_type.py.","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"cf8779758fa4599f25c4ea059beebca165614469","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from sqlalchemy.schema import Column"},{"line_number":19,"context_line":"from sqlalchemy.schema import MetaData"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":22,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":23,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_35c8fc21","line":21,"in_reply_to":"7ac7a964_488976ea","updated":"2014-08-15 17:07:33.000000000","message":"Done","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c7b9bed794f171da027c9b3f7a9ef7f702dd1682","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":21,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":22,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_38b29ae6","line":22,"updated":"2014-08-16 14:09:54.000000000","message":"same, should come before line #20","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"b01e635a9d8bc3b2f8a80bf46a457392de141fd4","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":21,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":22,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_77f2ac9b","line":22,"in_reply_to":"7ac7a964_38b29ae6","updated":"2014-08-18 15:27:20.000000000","message":"I don\u0027t think this needs to be changed. See my comment on 016_add_datastore_type.py","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"92d7441b83c8caa5e4b0167b2fab8df638c88e69","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            ref_table\u003d\u0027datastore_versions\u0027,"},{"line_number":48,"context_line":"            ref_columns\u003d[\u0027id\u0027])"},{"line_number":49,"context_line":"    fkey_constraint \u003d ForeignKeyConstraint(**params)"},{"line_number":50,"context_line":"    fkey_constraint.drop()"},{"line_number":51,"context_line":"    backups.drop_column(\u0027datastore_version_id\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_31175c53","line":50,"updated":"2014-08-25 21:23:28.000000000","message":"This code to drop the foreign key constraints occurs in several downgrade methods, and presumably will be included in more in the future.  Could this code be refactored into a method in Table?","commit_id":"74f243e9232824bbd48e8f4b040992d3cd7ebbe1"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"e91b2356147ca0d0a2a4b53b3b12f8c14a4b1d97","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            ref_table\u003d\u0027datastore_versions\u0027,"},{"line_number":48,"context_line":"            ref_columns\u003d[\u0027id\u0027])"},{"line_number":49,"context_line":"    fkey_constraint \u003d ForeignKeyConstraint(**params)"},{"line_number":50,"context_line":"    fkey_constraint.drop()"},{"line_number":51,"context_line":"    backups.drop_column(\u0027datastore_version_id\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_b86168aa","line":50,"in_reply_to":"1abeadc6_31175c53","updated":"2014-08-26 16:55:04.000000000","message":"There is no easy way to refactor the drop foreign key constraint code. The columns and refcolumns params needs to be a list of Column object, whereas get_foreign_key_constraint_name() needs the params to be in string format (because there\u0027s no way to get the table name from a column object). get_foreign_key_constraint_name() is needed because the ForeignKey was created without an explicit name.","commit_id":"74f243e9232824bbd48e8f4b040992d3cd7ebbe1"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c3e71c78716926eebf0cb2cc34f24cb2120a0ce4","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":21,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":22,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def upgrade(migrate_engine):"},{"line_number":26,"context_line":"    meta \u003d MetaData()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_372462ae","line":23,"updated":"2014-08-27 11:41:06.000000000","message":"same here","commit_id":"b70dad4cd4d86291dc8d8dee43118bf827af0242"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"789be7abcff8aecacc6e4d4b56c282ceb7e50aae","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":21,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":22,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def upgrade(migrate_engine):"},{"line_number":26,"context_line":"    meta \u003d MetaData()"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_8c9c3bc2","line":23,"in_reply_to":"1abeadc6_372462ae","updated":"2014-08-27 18:30:49.000000000","message":"Done","commit_id":"b70dad4cd4d86291dc8d8dee43118bf827af0242"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"35b8bac826ccc40745e671671ab12b59b336ef8e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    datastore_versions \u003d Table(\u0027datastore_versions\u0027, meta, autoload\u003dTrue)"},{"line_number":40,"context_line":"    params \u003d {\u0027columns\u0027: [backups.c.datastore_version_id],"},{"line_number":41,"context_line":"              \u0027refcolumns\u0027: [datastore_versions.c.id]}"},{"line_number":42,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":43,"context_line":"        params[\u0027name\u0027] \u003d db_utils.get_foreign_key_constraint_name("},{"line_number":44,"context_line":"            engine\u003dmigrate_engine,"},{"line_number":45,"context_line":"            table\u003d\u0027backups\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_f83d2c2c","line":42,"updated":"2014-09-04 11:44:37.000000000","message":"same comment as other file. is it that other databases don\u0027t have this issue?\n\neven so, the code in this conditional block should work fine on other databases, no?","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"bd698281a9f8ad0918203cf558bb582115e7b4f4","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    datastore_versions \u003d Table(\u0027datastore_versions\u0027, meta, autoload\u003dTrue)"},{"line_number":40,"context_line":"    params \u003d {\u0027columns\u0027: [backups.c.datastore_version_id],"},{"line_number":41,"context_line":"              \u0027refcolumns\u0027: [datastore_versions.c.id]}"},{"line_number":42,"context_line":"    if migrate_engine.name \u003d\u003d \u0027mysql\u0027:"},{"line_number":43,"context_line":"        params[\u0027name\u0027] \u003d db_utils.get_foreign_key_constraint_name("},{"line_number":44,"context_line":"            engine\u003dmigrate_engine,"},{"line_number":45,"context_line":"            table\u003d\u0027backups\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_fad78b4d","line":42,"in_reply_to":"fa98f980_f83d2c2c","updated":"2014-09-16 22:11:20.000000000","message":"Removed the mysql condition.","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"}],"trove/db/sqlalchemy/migrate_repo/versions/030_add_master_slave.py":[{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"84dc0e532a59fc7253c3b33a1b782e3b799ced55","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":20,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"COLUMN_NAME \u003d \u0027slave_of_id\u0027"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_63965396","side":"PARENT","line":22,"updated":"2014-08-15 01:29:33.000000000","message":"Why the removal of the constant?","commit_id":"accce2ced32070bcb94f3b59a4cc5e92a464f721"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"cf8779758fa4599f25c4ea059beebca165614469","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":20,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"COLUMN_NAME \u003d \u0027slave_of_id\u0027"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def upgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_46306c9e","side":"PARENT","line":22,"in_reply_to":"7ac7a964_63965396","updated":"2014-08-15 17:07:33.000000000","message":"No other migration scripts put column name into constant, so I removed it thinking it would make this code look a bit more like the others. I\u0027ll restore the constant.","commit_id":"accce2ced32070bcb94f3b59a4cc5e92a464f721"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c7b9bed794f171da027c9b3f7a9ef7f702dd1682","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from migrate.changeset.constraint import ForeignKeyConstraint"},{"line_number":17,"context_line":"from sqlalchemy.schema import Column"},{"line_number":18,"context_line":"from sqlalchemy.schema import MetaData"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_78cb3253","line":15,"updated":"2014-08-16 14:09:54.000000000","message":"redundant line","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"b01e635a9d8bc3b2f8a80bf46a457392de141fd4","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from migrate.changeset.constraint import ForeignKeyConstraint"},{"line_number":17,"context_line":"from sqlalchemy.schema import Column"},{"line_number":18,"context_line":"from sqlalchemy.schema import MetaData"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_abbbfd0c","line":15,"in_reply_to":"7ac7a964_78cb3253","updated":"2014-08-18 15:27:20.000000000","message":"Done","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c7b9bed794f171da027c9b3f7a9ef7f702dd1682","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from sqlalchemy.schema import MetaData"},{"line_number":19,"context_line":"from sqlalchemy.schema import ForeignKey"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from trove.db.sqlalchemy import utils as db_utils"},{"line_number":22,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import String"},{"line_number":23,"context_line":"from trove.db.sqlalchemy.migrate_repo.schema import Table"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_58b596cb","line":21,"updated":"2014-08-16 14:09:54.000000000","message":"nice!","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"}],"trove/db/sqlalchemy/utils.py":[{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"84dc0e532a59fc7253c3b33a1b782e3b799ced55","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    fks \u003d inspector.get_foreign_keys(table)"},{"line_number":32,"context_line":"    for fk in fks:"},{"line_number":33,"context_line":"        if (fk[\u0027referred_table\u0027] \u003d\u003d ref_table"},{"line_number":34,"context_line":"                and cmp(fk[\u0027constrained_columns\u0027], columns) \u003d\u003d 0"},{"line_number":35,"context_line":"                and cmp(fk[\u0027referred_columns\u0027], ref_columns) \u003d\u003d 0):"},{"line_number":36,"context_line":"            return fk[\u0027name\u0027]"},{"line_number":37,"context_line":"    return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_6372d37d","line":34,"updated":"2014-08-15 01:29:33.000000000","message":"What\u0027s the difference between this and:\n\n    fk[\u0027constrained_columns\u0027] \u003d\u003d columns","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"cf8779758fa4599f25c4ea059beebca165614469","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    fks \u003d inspector.get_foreign_keys(table)"},{"line_number":32,"context_line":"    for fk in fks:"},{"line_number":33,"context_line":"        if (fk[\u0027referred_table\u0027] \u003d\u003d ref_table"},{"line_number":34,"context_line":"                and cmp(fk[\u0027constrained_columns\u0027], columns) \u003d\u003d 0"},{"line_number":35,"context_line":"                and cmp(fk[\u0027referred_columns\u0027], ref_columns) \u003d\u003d 0):"},{"line_number":36,"context_line":"            return fk[\u0027name\u0027]"},{"line_number":37,"context_line":"    return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_1b06d1ce","line":34,"in_reply_to":"7ac7a964_6372d37d","updated":"2014-08-15 17:07:33.000000000","message":"Done","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"}],"trove/tests/db/migrations.py":[{"author":{"_account_id":9683,"name":"Mat Lowery","email":"mlowery@ebaysf.com","username":"mat-lowery"},"change_message_id":"84dc0e532a59fc7253c3b33a1b782e3b799ced55","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        # Now snake walk back down to version 1 from the latest, testing the"},{"line_number":194,"context_line":"        # downgrade paths."},{"line_number":195,"context_line":"        # downgrade -\u003e upgrade -\u003e downgrade"},{"line_number":196,"context_line":"        for version in reversed(versions):"},{"line_number":197,"context_line":"            self._migrate_down(engine, version - 1)"},{"line_number":198,"context_line":"            self._migrate_up(engine, version)"},{"line_number":199,"context_line":"            self._migrate_down(engine, version - 1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_a3206bf8","line":196,"updated":"2014-08-15 01:29:33.000000000","message":"Silly question: Why \"snake walking\" as well as both directions?","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"e8c2d1009d7bf9d747165ec7c892bdad951d2e5d","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        # Now snake walk back down to version 1 from the latest, testing the"},{"line_number":194,"context_line":"        # downgrade paths."},{"line_number":195,"context_line":"        # downgrade -\u003e upgrade -\u003e downgrade"},{"line_number":196,"context_line":"        for version in reversed(versions):"},{"line_number":197,"context_line":"            self._migrate_down(engine, version - 1)"},{"line_number":198,"context_line":"            self._migrate_up(engine, version)"},{"line_number":199,"context_line":"            self._migrate_down(engine, version - 1)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7ac7a964_2c4a6eac","line":196,"in_reply_to":"7ac7a964_a3206bf8","updated":"2014-08-15 18:45:15.000000000","message":"In this migration scenario ... 2-\u003e1-\u003e2, if the downgrade routine in 2 has issues which sets up the subsequent upgrade back to 2 to fail, the snake walk would be able to catch it. A straight upgrade/downgrade loop won\u0027t catch this scenario. This snake walk test actually exposed an issue with the upgrade routine in 020_configurations.py (i.e. the uncaught ProgrammingError exception).","commit_id":"719a0f8e12264c49d20ede4efc604597ba87cf1b"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c7b9bed794f171da027c9b3f7a9ef7f702dd1682","unresolved":false,"context_lines":[{"line_number":28,"context_line":"      CREATE USER openstack_citest with PASSWORD \u0027openstack_citest\u0027 CREATEDB;"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"\"\"\""},{"line_number":31,"context_line":"import glob"},{"line_number":32,"context_line":"import os"},{"line_number":33,"context_line":"import subprocess"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_58ecb6c7","line":31,"updated":"2014-08-16 14:09:54.000000000","message":"please re-organize imports in correct order:\nimport statement should come before from statement","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"b01e635a9d8bc3b2f8a80bf46a457392de141fd4","unresolved":false,"context_lines":[{"line_number":28,"context_line":"      CREATE USER openstack_citest with PASSWORD \u0027openstack_citest\u0027 CREATEDB;"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"\"\"\""},{"line_number":31,"context_line":"import glob"},{"line_number":32,"context_line":"import os"},{"line_number":33,"context_line":"import subprocess"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_4b96e995","line":31,"in_reply_to":"7ac7a964_58ecb6c7","updated":"2014-08-18 15:27:20.000000000","message":"The import order here conforms to the hacking guideline http://docs.openstack.org/developer/hacking/#import-order-template, and the PEP8 test passed. So I\u0027m keeping it the way it is here.","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c7b9bed794f171da027c9b3f7a9ef7f702dd1682","unresolved":false,"context_lines":[{"line_number":47,"context_line":"from trove.openstack.common import log as logging"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"GROUP \u003d \"dbaas.db.migrations\""},{"line_number":50,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"@test(groups\u003d[GROUP])"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_18095e95","line":50,"updated":"2014-08-16 14:09:54.000000000","message":"not used.","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"b01e635a9d8bc3b2f8a80bf46a457392de141fd4","unresolved":false,"context_lines":[{"line_number":47,"context_line":"from trove.openstack.common import log as logging"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"GROUP \u003d \"dbaas.db.migrations\""},{"line_number":50,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"@test(groups\u003d[GROUP])"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_9755881f","line":50,"in_reply_to":"7ac7a964_18095e95","updated":"2014-08-18 15:27:20.000000000","message":"It is in fact used on line 112 and 183.","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c7b9bed794f171da027c9b3f7a9ef7f702dd1682","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @test"},{"line_number":58,"context_line":"    def test_all_migrations_have_downgrade(self):"},{"line_number":59,"context_line":"        topdir \u003d os.path.normpath(os.path.dirname(__file__) + \u0027/../../../\u0027)"},{"line_number":60,"context_line":"        py_glob \u003d os.path.join(topdir, \"trove\", \"db\", \"sqlalchemy\","},{"line_number":61,"context_line":"                               \"migrate_repo\", \"versions\", \"*.py\")"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7ac7a964_78d25201","line":59,"updated":"2014-08-16 14:09:54.000000000","message":"Are there another ways to get parent directory without use of relative paths?","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"b01e635a9d8bc3b2f8a80bf46a457392de141fd4","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @test"},{"line_number":58,"context_line":"    def test_all_migrations_have_downgrade(self):"},{"line_number":59,"context_line":"        topdir \u003d os.path.normpath(os.path.dirname(__file__) + \u0027/../../../\u0027)"},{"line_number":60,"context_line":"        py_glob \u003d os.path.join(topdir, \"trove\", \"db\", \"sqlalchemy\","},{"line_number":61,"context_line":"                               \"migrate_repo\", \"versions\", \"*.py\")"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_00e93080","line":59,"in_reply_to":"7ac7a964_78d25201","updated":"2014-08-18 15:27:20.000000000","message":"We can call the dirname function repeatedly, but it\u0027s not more elegant than what we have here. Looked around a bit and people seems to suggest this is the way to climb a directory tree in python. Also, this line of code is from Nova\u0027s test script, they are already doing it this way so I think we\u0027re fine here.","commit_id":"50bd989df6afb747ce48b8ecec2fb11cea8163bd"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"92d7441b83c8caa5e4b0167b2fab8df638c88e69","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            has_downgrade \u003d False"},{"line_number":68,"context_line":"            with open(path, \"r\") as f:"},{"line_number":69,"context_line":"                for line in f:"},{"line_number":70,"context_line":"                    if \u0027def upgrade(\u0027 in line:"},{"line_number":71,"context_line":"                        has_upgrade \u003d True"},{"line_number":72,"context_line":"                    if \u0027def downgrade(\u0027 in line:"},{"line_number":73,"context_line":"                        has_downgrade \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_ac8cf380","line":70,"updated":"2014-08-25 21:23:28.000000000","message":"Should these be regexps?","commit_id":"74f243e9232824bbd48e8f4b040992d3cd7ebbe1"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"e91b2356147ca0d0a2a4b53b3b12f8c14a4b1d97","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            has_downgrade \u003d False"},{"line_number":68,"context_line":"            with open(path, \"r\") as f:"},{"line_number":69,"context_line":"                for line in f:"},{"line_number":70,"context_line":"                    if \u0027def upgrade(\u0027 in line:"},{"line_number":71,"context_line":"                        has_upgrade \u003d True"},{"line_number":72,"context_line":"                    if \u0027def downgrade(\u0027 in line:"},{"line_number":73,"context_line":"                        has_downgrade \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_58dbf41a","line":70,"in_reply_to":"1abeadc6_ac8cf380","updated":"2014-08-26 16:55:04.000000000","message":"The string pattern to look for in this case is simple/static enough so I\u0027m going to keep this code the way it is.","commit_id":"74f243e9232824bbd48e8f4b040992d3cd7ebbe1"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"92d7441b83c8caa5e4b0167b2fab8df638c88e69","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        self._walk_versions(engine)"},{"line_number":195,"context_line":"        engine.dispose()"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def _walk_versions(self, engine\u003dNone):"},{"line_number":198,"context_line":"        \"\"\"Walk through and test the migration scripts"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        Determine latest version script from the repo, then"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_2c870311","line":197,"updated":"2014-08-25 21:23:28.000000000","message":"Can we not use the real driver code to test this?  Here, we are really only testing that the upgrade/downgrade work in this test context - there could be errors based on the context/order/etc in which the real driver calls the routines.","commit_id":"74f243e9232824bbd48e8f4b040992d3cd7ebbe1"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"c3e71c78716926eebf0cb2cc34f24cb2120a0ce4","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from migrate.versioning import repository"},{"line_number":30,"context_line":"import migrate.versioning.api as migration_api"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from proboscis import test"},{"line_number":33,"context_line":"from proboscis import SkipTest"},{"line_number":34,"context_line":"from proboscis.asserts import assert_equal"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_5741de37","line":31,"updated":"2014-08-27 11:41:06.000000000","message":"please organize imports in correct order","commit_id":"b70dad4cd4d86291dc8d8dee43118bf827af0242"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"789be7abcff8aecacc6e4d4b56c282ceb7e50aae","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"from migrate.versioning import repository"},{"line_number":30,"context_line":"import migrate.versioning.api as migration_api"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from proboscis import test"},{"line_number":33,"context_line":"from proboscis import SkipTest"},{"line_number":34,"context_line":"from proboscis.asserts import assert_equal"}],"source_content_type":"text/x-python","patch_set":10,"id":"1abeadc6_8c06fbcc","line":31,"in_reply_to":"1abeadc6_5741de37","updated":"2014-08-27 18:30:49.000000000","message":"Per my earlier comment, this is already in the right order, adhering to the official style guide.","commit_id":"b70dad4cd4d86291dc8d8dee43118bf827af0242"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"a880fb1ea88e3adc446af2a1381ecd8f2e5cac50","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2012-2013 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_4ca78350","line":2,"updated":"2014-08-29 21:02:43.000000000","message":"copy right","commit_id":"0d595e3fa7d878c051db35f729b2b6030273fdae"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"25f2d7985033c96b269eb5bedb9a7a0d38a9e584","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2012-2013 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_6c33f613","line":2,"in_reply_to":"1abeadc6_4ca78350","updated":"2014-08-29 21:35:57.000000000","message":"You are referring that I should add my company\u0027s copyright statement after this line right?","commit_id":"0d595e3fa7d878c051db35f729b2b6030273fdae"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"25e8c27e2cbd8ed6fc9b3125d5a299846354f2f4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2012-2013 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_c0f5a1cb","line":2,"in_reply_to":"1abeadc6_6c33f613","updated":"2014-08-30 15:58:39.000000000","message":"also updating the openstack year.","commit_id":"0d595e3fa7d878c051db35f729b2b6030273fdae"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"321203421392cd58c041e583b3ee239af6a39d73","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2012-2013 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"},{"line_number":5,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_fc62d2ab","line":2,"in_reply_to":"1abeadc6_c0f5a1cb","updated":"2014-09-02 14:43:33.000000000","message":"Done","commit_id":"0d595e3fa7d878c051db35f729b2b6030273fdae"},{"author":{"_account_id":4463,"name":"iccha-sethi","email":"iccha.sethi@rackspace.com","username":"iccha-sethi"},"change_message_id":"a880fb1ea88e3adc446af2a1381ecd8f2e5cac50","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"To run the tests, you\u0027ll need to set up db user named \u0027openstack_citest\u0027"},{"line_number":21,"context_line":"with password \u0027openstack_citest\u0027 on localhost. The script will then use this"},{"line_number":22,"context_line":"u/p combo to run the tests."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"\"\"\""},{"line_number":25,"context_line":"import glob"}],"source_content_type":"text/x-python","patch_set":11,"id":"1abeadc6_f15a7f4e","line":22,"updated":"2014-08-29 21:02:43.000000000","message":"could the script set up the  user for us? so that there is no manual intervention required to run this test?","commit_id":"0d595e3fa7d878c051db35f729b2b6030273fdae"},{"author":{"_account_id":5293,"name":"Nikhil","email":"SlickNik@gmail.com","username":"slicknik"},"change_message_id":"b252ae551c153b775352d42e00fa5884a4779812","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"To run the tests, you\u0027ll need to set up db user named \u0027openstack_citest\u0027"},{"line_number":21,"context_line":"with password \u0027openstack_citest\u0027 on localhost. The script will then use this"},{"line_number":22,"context_line":"u/p combo to run the tests."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"\"\"\""},{"line_number":25,"context_line":"import glob"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa98f980_bb851baf","line":22,"in_reply_to":"1abeadc6_f15a7f4e","updated":"2014-08-31 01:43:01.000000000","message":"The script needs to have a user set up to connect as (even if it uses this user to create other users). So it\u0027s really a chicken and egg problem. \n\nI think using the openstack_citest user which is already set up by openstack Infra is a fair solution.","commit_id":"0d595e3fa7d878c051db35f729b2b6030273fdae"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"35b8bac826ccc40745e671671ab12b59b336ef8e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2012-2013 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_5a162d4d","line":1,"updated":"2014-09-04 11:44:37.000000000","message":"the copyrights on this file appear to be wrong. if it is a new file, you shouldn\u0027t be adding IBM\u0027s marks.","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"bd698281a9f8ad0918203cf558bb582115e7b4f4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2012-2013 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_5aced7b8","line":1,"in_reply_to":"fa98f980_5a162d4d","updated":"2014-09-16 22:11:20.000000000","message":"Done","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"},{"author":{"_account_id":9782,"name":"Morgan Jones","email":"morgan@tesora.com","username":"vgnbkr"},"change_message_id":"784302f5b29f213fa8d11e235740c2de09b715a3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2012-2013 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_a694538b","line":1,"in_reply_to":"fa98f980_5a162d4d","updated":"2014-09-04 19:19:31.000000000","message":"Or OpenStack\u0027s copyright.","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"bd698281a9f8ad0918203cf558bb582115e7b4f4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2010-2011 OpenStack Foundation"},{"line_number":2,"context_line":"# Copyright 2012-2013 IBM Corp."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_9ac83faa","line":1,"in_reply_to":"fa98f980_a694538b","updated":"2014-09-16 22:11:20.000000000","message":"Done","commit_id":"d34098d25eec4b26b3c803f0f35324a99578f02a"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"65c2dcc064539685c3d08558ab4990a7a00e9dfe","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @test"},{"line_number":52,"context_line":"    def test_all_migrations_have_downgrade(self):"},{"line_number":53,"context_line":"        topdir \u003d os.path.normpath(os.path.dirname(__file__) + \u0027/../../../\u0027)"},{"line_number":54,"context_line":"        py_glob \u003d os.path.join(topdir, \"trove\", \"db\", \"sqlalchemy\","},{"line_number":55,"context_line":"                               \"migrate_repo\", \"versions\", \"*.py\")"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_31190723","line":53,"updated":"2014-09-18 14:17:26.000000000","message":"this isn\u0027t pretty. why not use join and os.pardir?","commit_id":"6c93eeee9663a80d1d9f8dfd10de1cbe73e62418"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"0af48aef7a6ef7c18dad468f02013e884493b2e4","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @test"},{"line_number":52,"context_line":"    def test_all_migrations_have_downgrade(self):"},{"line_number":53,"context_line":"        topdir \u003d os.path.normpath(os.path.dirname(__file__) + \u0027/../../../\u0027)"},{"line_number":54,"context_line":"        py_glob \u003d os.path.join(topdir, \"trove\", \"db\", \"sqlalchemy\","},{"line_number":55,"context_line":"                               \"migrate_repo\", \"versions\", \"*.py\")"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_c3fe0d05","line":53,"in_reply_to":"fa98f980_31190723","updated":"2014-09-19 15:49:23.000000000","message":"To use join and os.pardir, this line of code will become:\n\nos.path.normpath(os.path.join(os.path.dirname(__file__),os.pardir,os.pardir,os.pardir))\n\nWhich in my opinion, is not more readable then the original code. Your thoughts?","commit_id":"6c93eeee9663a80d1d9f8dfd10de1cbe73e62418"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"65c2dcc064539685c3d08558ab4990a7a00e9dfe","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            # any connectivity error means the database backend is not"},{"line_number":111,"context_line":"            # available"},{"line_number":112,"context_line":"            return False"},{"line_number":113,"context_line":"        else:"},{"line_number":114,"context_line":"            connection.close()"},{"line_number":115,"context_line":"            engine.dispose()"},{"line_number":116,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_31c3c739","line":113,"updated":"2014-09-18 14:17:26.000000000","message":"I believe this should be a finally and not an else, no?","commit_id":"6c93eeee9663a80d1d9f8dfd10de1cbe73e62418"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"0af48aef7a6ef7c18dad468f02013e884493b2e4","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            # any connectivity error means the database backend is not"},{"line_number":111,"context_line":"            # available"},{"line_number":112,"context_line":"            return False"},{"line_number":113,"context_line":"        else:"},{"line_number":114,"context_line":"            connection.close()"},{"line_number":115,"context_line":"            engine.dispose()"},{"line_number":116,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_c16605bb","line":113,"in_reply_to":"fa98f980_31c3c739","updated":"2014-09-19 15:49:23.000000000","message":"Can\u0027t just change this else to finally, because we don\u0027t want to execute connection.close() if engine.connect() fails.","commit_id":"6c93eeee9663a80d1d9f8dfd10de1cbe73e62418"},{"author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"change_message_id":"65c2dcc064539685c3d08558ab4990a7a00e9dfe","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _execute_cmd(self, cmd\u003dNone):"},{"line_number":119,"context_line":"        \"\"\"Shell out and run the given command.\"\"\""},{"line_number":120,"context_line":"        process \u003d subprocess.Popen(cmd, shell\u003dTrue, stdout\u003dsubprocess.PIPE,"},{"line_number":121,"context_line":"                                   stderr\u003dsubprocess.STDOUT)"},{"line_number":122,"context_line":"        output \u003d process.communicate()[0]"},{"line_number":123,"context_line":"        LOG.debug(output)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_51d5abe3","line":120,"updated":"2014-09-18 14:17:26.000000000","message":"wouldn\u0027t execute() (openstack/common suffice?)","commit_id":"6c93eeee9663a80d1d9f8dfd10de1cbe73e62418"},{"author":{"_account_id":10266,"name":"Simon Chang","email":"schang@tesora.com","username":"changsimon"},"change_message_id":"0af48aef7a6ef7c18dad468f02013e884493b2e4","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def _execute_cmd(self, cmd\u003dNone):"},{"line_number":119,"context_line":"        \"\"\"Shell out and run the given command.\"\"\""},{"line_number":120,"context_line":"        process \u003d subprocess.Popen(cmd, shell\u003dTrue, stdout\u003dsubprocess.PIPE,"},{"line_number":121,"context_line":"                                   stderr\u003dsubprocess.STDOUT)"},{"line_number":122,"context_line":"        output \u003d process.communicate()[0]"},{"line_number":123,"context_line":"        LOG.debug(output)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa98f980_467b0b29","line":120,"in_reply_to":"fa98f980_51d5abe3","updated":"2014-09-19 15:49:23.000000000","message":"processutil.trycmd() calls execute(). I\u0027ll change this to use trycmd().","commit_id":"6c93eeee9663a80d1d9f8dfd10de1cbe73e62418"}]}
