)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"90dc6effb7e02e752a35e418df9121948beb1332","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Basically, it\u0027s only 3 additional repo for each release and the"},{"line_number":10,"context_line":"keystone-manage commands to call them."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"There will be two repositories for contract, the script call be"},{"line_number":13,"context_line":"migrated in this release cycle and the script will be migrated in"},{"line_number":14,"context_line":"a future release which not sure so far. The script should be moved"},{"line_number":15,"context_line":"manually when there is no code access the DB schema that will be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9ad45d7e_a2f79d57","line":12,"range":{"start_line":12,"start_character":56,"end_line":12,"end_character":60},"updated":"2016-08-11 09:14:43.000000000","message":"can","commit_id":"5a69cfbce26249cf46389a665953e6e7fad75c3c"},{"author":{"_account_id":18338,"name":"Ron De Rose","email":"ronald.de.rose@intel.com","username":"derosenet"},"change_message_id":"2fb0f94224edcdf54abbe506ee7a1f7e1c2b1855","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Basically, it\u0027s only 3 additional repo (expand, migrate and contract)"},{"line_number":10,"context_line":"and the keystone-manage commands to call them."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"There will be two repositories for contract, the script can be called"},{"line_number":13,"context_line":"in this release cycle and the script only can be called in a future"},{"line_number":14,"context_line":"release which is not sure so far. The script should be moved manually"},{"line_number":15,"context_line":"when there is no code access the DB schema that will be migrated. And"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9ad45d7e_667274af","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":44},"updated":"2016-08-12 17:14:54.000000000","message":"I don\u0027t think we need the 2 contract repos.  Instead, lets just put in the framework for Newton.  If we do need to fix a migration in this release cycle, we can create a new patch that follows the new strategy.","commit_id":"b0056e830ec3d1233622b6734476906b931c7edc"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"3deba8c64cd45c6e7892843ba3144ff1e7d4bc3b","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Basically, it\u0027s only 3 additional repo (expand, migrate and contract)"},{"line_number":10,"context_line":"and the keystone-manage commands to call them."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"There will be two repositories for contract, the script can be called"},{"line_number":13,"context_line":"in this release cycle and the script only can be called in a future"},{"line_number":14,"context_line":"release which is not sure so far. The script should be moved manually"},{"line_number":15,"context_line":"when there is no code access the DB schema that will be migrated. And"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7ac969e8_d7cfa3b1","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":44},"in_reply_to":"9ad45d7e_667274af","updated":"2016-08-13 07:43:32.000000000","message":"We need at least two for contact repo since there is DB schema that can safely update in this release cycle and that you can only update when there is no code access the old schema.\n\nThe code maybe deprecated for 2 release cycle, 4 release cycle or has no plan to remove them, so for a change in the DB you can prepare your migration script (drop or alter) and place them in \u0027Future\u0027 repo, so that we can manually copied it into the \u0027Latest\u0027 if no code will access them.","commit_id":"b0056e830ec3d1233622b6734476906b931c7edc"}],"keystone/cmd/cli.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"36c2c34e71e8a76f4ab74db793b302af387dc1b1","unresolved":false,"context_lines":[{"line_number":407,"context_line":"                                  \u0027now part of the main repository, \u0027"},{"line_number":408,"context_line":"                                  \u0027specifying db_sync without this option \u0027"},{"line_number":409,"context_line":"                                  \u0027will cause all extensions to be migrated.\u0027))"},{"line_number":410,"context_line":"        parser.add_argument(\u0027--expand\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"},{"line_number":411,"context_line":"                            help\u003d(\u0027Any additive change to database should be \u0027"},{"line_number":412,"context_line":"                                  \u0027firstly run here.\u0027))"},{"line_number":413,"context_line":"        parser.add_argument(\u0027--migrate\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_6365d0b3","line":410,"updated":"2016-08-10 15:44:38.000000000","message":"Can we do something here to make this mutually exclusive? I think something like this? https://docs.python.org/2/library/argparse.html#mutual-exclusion","commit_id":"25dccc02505f4d828c21c54963383802f4393ef7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"0976f5289bae52936db5c1498cab5d0b120b821f","unresolved":false,"context_lines":[{"line_number":407,"context_line":"                                  \u0027now part of the main repository, \u0027"},{"line_number":408,"context_line":"                                  \u0027specifying db_sync without this option \u0027"},{"line_number":409,"context_line":"                                  \u0027will cause all extensions to be migrated.\u0027))"},{"line_number":410,"context_line":"        parser.add_argument(\u0027--expand\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"},{"line_number":411,"context_line":"                            help\u003d(\u0027Any additive change to database should be \u0027"},{"line_number":412,"context_line":"                                  \u0027firstly run here.\u0027))"},{"line_number":413,"context_line":"        parser.add_argument(\u0027--migrate\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_4357ec25","line":410,"in_reply_to":"9ad45d7e_6365d0b3","updated":"2016-08-10 16:04:07.000000000","message":"++","commit_id":"25dccc02505f4d828c21c54963383802f4393ef7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"5b9e70e3d882aa49b8aa76e2c3d55cbbdf2536e5","unresolved":false,"context_lines":[{"line_number":407,"context_line":"                                  \u0027now part of the main repository, \u0027"},{"line_number":408,"context_line":"                                  \u0027specifying db_sync without this option \u0027"},{"line_number":409,"context_line":"                                  \u0027will cause all extensions to be migrated.\u0027))"},{"line_number":410,"context_line":"        parser.add_argument(\u0027--expand\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"},{"line_number":411,"context_line":"                            help\u003d(\u0027Any additive change to database should be \u0027"},{"line_number":412,"context_line":"                                  \u0027firstly run here.\u0027))"},{"line_number":413,"context_line":"        parser.add_argument(\u0027--migrate\u0027, default\u003dFalse, action\u003d\u0027store_true\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_c7046319","line":410,"in_reply_to":"9ad45d7e_6365d0b3","updated":"2016-08-11 09:12:55.000000000","message":"Done","commit_id":"25dccc02505f4d828c21c54963383802f4393ef7"}],"keystone/common/sql/migration_helpers.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a7f73e45ee99f85343214b6ac73b6e8a5fc62f0e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        # an exception that we can safely ignore"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            migration.db_version_control(engine, abs_path)"},{"line_number":139,"context_line":"        except exceptions.DatabaseAlreadyControlledError:  # nosec"},{"line_number":140,"context_line":"            pass"},{"line_number":141,"context_line":"        migration.db_sync(engine, abs_path,"},{"line_number":142,"context_line":"                          init_version\u003dinit_version, sanity_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_638f902a","line":139,"updated":"2016-08-10 15:46:31.000000000","message":"What\u0027s this about?","commit_id":"25dccc02505f4d828c21c54963383802f4393ef7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"992dced410244bc8cd8f236b9f470c6a2ccdde50","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        # an exception that we can safely ignore"},{"line_number":137,"context_line":"        try:"},{"line_number":138,"context_line":"            migration.db_version_control(engine, abs_path)"},{"line_number":139,"context_line":"        except exceptions.DatabaseAlreadyControlledError:  # nosec"},{"line_number":140,"context_line":"            pass"},{"line_number":141,"context_line":"        migration.db_sync(engine, abs_path,"},{"line_number":142,"context_line":"                          init_version\u003dinit_version, sanity_check\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_45b7d8f4","line":139,"in_reply_to":"9ad45d7e_638f902a","updated":"2016-08-11 02:44:18.000000000","message":"It\u0027s for version control, it will do nothing if the repo id has been tracked in the migration table or else the the new row will be created for the repo.","commit_id":"25dccc02505f4d828c21c54963383802f4393ef7"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a7f73e45ee99f85343214b6ac73b6e8a5fc62f0e","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    print(get_db_version())"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"# TODO(davechen): Find a way to get the release name properly."},{"line_number":196,"context_line":"def migration_expand():"},{"line_number":197,"context_line":"    \"\"\"Expand the database with new tables or columns.\"\"\""},{"line_number":198,"context_line":"    _sync_additive_repo(\u0027Newton\u0027, \u0027migrate_repo_expand\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_63bdd0b6","line":195,"updated":"2016-08-10 15:46:31.000000000","message":"I\u0027d rather not use release names at all. Just a repos named expand, migrate and contract.","commit_id":"25dccc02505f4d828c21c54963383802f4393ef7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"992dced410244bc8cd8f236b9f470c6a2ccdde50","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    print(get_db_version())"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"# TODO(davechen): Find a way to get the release name properly."},{"line_number":196,"context_line":"def migration_expand():"},{"line_number":197,"context_line":"    \"\"\"Expand the database with new tables or columns.\"\"\""},{"line_number":198,"context_line":"    _sync_additive_repo(\u0027Newton\u0027, \u0027migrate_repo_expand\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_e5188c20","line":195,"in_reply_to":"9ad45d7e_5ec17f53","updated":"2016-08-11 02:44:18.000000000","message":"Good idea, this looks more neat! But is there any functional impact without this?","commit_id":"25dccc02505f4d828c21c54963383802f4393ef7"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"992dced410244bc8cd8f236b9f470c6a2ccdde50","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    print(get_db_version())"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"# TODO(davechen): Find a way to get the release name properly."},{"line_number":196,"context_line":"def migration_expand():"},{"line_number":197,"context_line":"    \"\"\"Expand the database with new tables or columns.\"\"\""},{"line_number":198,"context_line":"    _sync_additive_repo(\u0027Newton\u0027, \u0027migrate_repo_expand\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_65a3fc00","line":195,"in_reply_to":"9ad45d7e_63bdd0b6","updated":"2016-08-11 02:44:18.000000000","message":"My initial thoughts is no release name at all. How about this case:\n\nWe are going to drop a table or alter table columns, so we will deprecate the code to read the old table/columns, populate the data from the old table/columns in this releases. But we cannot just drop them in this release since the old code can still *read* and consume them.\n\nSupport the old code is deprecated for 2 release cycle, the DB schema can only be changed after 2 release cycle as well.\n\nSo the drop or alter should be done under the X+2/contract repo, right?","commit_id":"25dccc02505f4d828c21c54963383802f4393ef7"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"0976f5289bae52936db5c1498cab5d0b120b821f","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    print(get_db_version())"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"# TODO(davechen): Find a way to get the release name properly."},{"line_number":196,"context_line":"def migration_expand():"},{"line_number":197,"context_line":"    \"\"\"Expand the database with new tables or columns.\"\"\""},{"line_number":198,"context_line":"    _sync_additive_repo(\u0027Newton\u0027, \u0027migrate_repo_expand\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_5ec17f53","line":195,"in_reply_to":"9ad45d7e_63bdd0b6","updated":"2016-08-10 16:04:07.000000000","message":"What we can do here is have three separate migration repositories. We can keep them all in lock step and write a unit test to make sure all three repositories stay in sync. For example: \n\n  keystone/common/sql/migrate_repo/expand/\n    001_expand_project_foo_column.py\n    002_expand_user_bar_column.py\n    003_expand_new_baz_table.py\n  keystone/common/sql/migrate_repo/migrate/\n    001_populate_project_foo_column.py\n    002_migrate_data_to_new_user_bar_column.py\n    003_populate_baz_table.py\n  keystone/common/sql/migrate_repo/contract/\n    001_contract_old_project_bar_column.py\n    002_contract_old_user_baz_column.py\n    003_contract_noop.py\n\nWith this each migration will consist of three different migration scripts. Even if a migration doesn\u0027t require a contact or a migration, it could consist of something as minimal as:\n\n    def upgrade(migrate_engine):\n        pass","commit_id":"25dccc02505f4d828c21c54963383802f4393ef7"}]}
