)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"5276350473cf22e362c6462399aea2fb631a6a85","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Appropriate documentation is updated and failing tests are adjusted"},{"line_number":13,"context_line":"to accomodate the new database versioning schema."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Data migrations are expected to be run in the background with older"},{"line_number":16,"context_line":"Glance services being active during the upgrade process."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Partially-Implements: blueprint database-strategy-for-rolling-upgrades"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"3a461143_1e7da0e7","line":15,"range":{"start_line":15,"start_character":39,"end_line":15,"end_character":56},"updated":"2017-02-02 00:47:11.000000000","message":"concurrently,\n\n\"background\" is a tiny bit ambiguous but it matches the specs and I\u0027m picking a nit on it now which is not optimal. What I want to be clear in this language is that the new Glance services are only made active after all data migrations have completed.","commit_id":"0f0354a8b890a456c90744a3a5fcf6927a1edc3b"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"4279c64bded0ad9c10108c0b723ad1f89db6e34c","unresolved":false,"context_lines":[{"line_number":12,"context_line":"Appropriate documentation is updated and failing tests are adjusted"},{"line_number":13,"context_line":"to accomodate the new database versioning schema."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Data migrations are expected to be run in the background with older"},{"line_number":16,"context_line":"Glance services being active during the upgrade process."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Partially-Implements: blueprint database-strategy-for-rolling-upgrades"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"3a461143_59b822e6","line":15,"range":{"start_line":15,"start_character":39,"end_line":15,"end_character":56},"in_reply_to":"3a461143_1e7da0e7","updated":"2017-02-02 01:31:47.000000000","message":"+1","commit_id":"0f0354a8b890a456c90744a3a5fcf6927a1edc3b"}],"doc/source/db.rst":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    Starting with Ocata, the version will be a named value corresponding"},{"line_number":40,"context_line":"    to a particular release. For the Ocata release, the latest migration level"},{"line_number":41,"context_line":"    is ``ocata_expand01``. Furthermore, after completing the full upgrade"},{"line_number":42,"context_line":"    process, a databse may have multiple latest versions. For example:"},{"line_number":43,"context_line":"    ``ocata_expand01``, ``ocata_contract01``."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Determining the Database Version"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba5201f7_7a58098b","line":42,"updated":"2017-01-04 21:02:00.000000000","message":"s/databse/database/","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    Starting with Ocata, the version will be a named value corresponding"},{"line_number":40,"context_line":"    to a particular release. For the Ocata release, the latest migration level"},{"line_number":41,"context_line":"    is ``ocata_expand01``. Furthermore, after completing the full upgrade"},{"line_number":42,"context_line":"    process, a databse may have multiple latest versions. For example:"},{"line_number":43,"context_line":"    ``ocata_expand01``, ``ocata_contract01``."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Determining the Database Version"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a461143_d8ddc515","line":42,"in_reply_to":"ba5201f7_7a58098b","updated":"2017-01-26 20:34:55.000000000","message":"Done","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    to a particular release. For the Ocata release, the latest migration level"},{"line_number":41,"context_line":"    is ``ocata_expand01``. Furthermore, after completing the full upgrade"},{"line_number":42,"context_line":"    process, a databse may have multiple latest versions. For example:"},{"line_number":43,"context_line":"    ``ocata_expand01``, ``ocata_contract01``."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Determining the Database Version"},{"line_number":46,"context_line":"--------------------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba5201f7_5acee52e","line":43,"updated":"2017-01-04 21:02:00.000000000","message":"I think the phrase \"multiple latest versions\" needs to be further explained for the sake of most deployers, because it doesn\u0027t really make sense without some context from the schema expansion / data migration / schema contraction process.","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"596329993f01bb2ab54e7a4024fc8976c46d9ee5","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    to a particular release. For the Ocata release, the latest migration level"},{"line_number":41,"context_line":"    is ``ocata_expand01``. Furthermore, after completing the full upgrade"},{"line_number":42,"context_line":"    process, a databse may have multiple latest versions. For example:"},{"line_number":43,"context_line":"    ``ocata_expand01``, ``ocata_contract01``."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Determining the Database Version"},{"line_number":46,"context_line":"--------------------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a3c09a3_b44f6b90","line":43,"in_reply_to":"ba5201f7_5acee52e","updated":"2017-01-18 18:25:05.000000000","message":"+1, I watched the demo, read the code and spec, and this is still a bit confusing to me. It might be worth briefly explaining the idea of having multiple heads / branches and what those would be in the general case for a given release.","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    to a particular release. For the Ocata release, the latest migration level"},{"line_number":41,"context_line":"    is ``ocata_expand01``. Furthermore, after completing the full upgrade"},{"line_number":42,"context_line":"    process, a databse may have multiple latest versions. For example:"},{"line_number":43,"context_line":"    ``ocata_expand01``, ``ocata_contract01``."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Determining the Database Version"},{"line_number":46,"context_line":"--------------------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a461143_d82b05ea","line":43,"in_reply_to":"ba5201f7_5acee52e","updated":"2017-01-26 20:34:55.000000000","message":"Done","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    glance-manage db expand"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"This will run the expansion phase of a rolling upgrade process."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Contracting the Database"},{"line_number":69,"context_line":"----------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba5201f7_1af8dd48","line":66,"updated":"2017-01-04 21:02:00.000000000","message":"This should also document when this command should be run, relative to other commands and the state of the system.","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    glance-manage db expand"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"This will run the expansion phase of a rolling upgrade process."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Contracting the Database"},{"line_number":69,"context_line":"----------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a461143_934f9ebc","line":66,"in_reply_to":"ba5201f7_1af8dd48","updated":"2017-01-26 20:34:55.000000000","message":"Done","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    glance-manage db contract"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"This will run the contraction phase of a rolling upgrade process."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Downgrading an Existing Database"},{"line_number":76,"context_line":"--------------------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba5201f7_5a9c250f","line":73,"updated":"2017-01-04 21:02:00.000000000","message":"Same as above.","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    glance-manage db contract"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"This will run the contraction phase of a rolling upgrade process."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Downgrading an Existing Database"},{"line_number":76,"context_line":"--------------------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a461143_b34adaaa","line":73,"in_reply_to":"ba5201f7_5a9c250f","updated":"2017-01-26 20:34:55.000000000","message":"Done","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"a5591557959965e5f5516a7519b6c448cf493fc6","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"Migrating the Data"},{"line_number":85,"context_line":"----------------------"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    glance-manage db migrate"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"3a461143_b3d768ec","line":85,"updated":"2017-02-01 22:14:46.000000000","message":"This underline is too long, adding to Brian\u0027s comment below.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cb45f5493d07c730dd01a2d5a31f65501265b7ef","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"Migrating the Data"},{"line_number":85,"context_line":"----------------------"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    glance-manage db migrate"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"3a461143_a8c0d67d","line":85,"in_reply_to":"3a461143_b3d768ec","updated":"2017-02-01 23:24:21.000000000","message":"Done","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"d272755f8f402c561db5b288c82f546b81ca06d8","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Contracting the Database"},{"line_number":95,"context_line":"----------------------"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    glance-manage db contract"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"3a461143_47a3e64f","line":95,"updated":"2017-02-01 22:06:53.000000000","message":"nit: RST requires the underline to be at least as long as the text.  (We may have \"treat warnings like errors\" turned off.)\n\nIf you do fix this, might as well shorten line 85.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cb45f5493d07c730dd01a2d5a31f65501265b7ef","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Contracting the Database"},{"line_number":95,"context_line":"----------------------"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    glance-manage db contract"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"3a461143_c8bd2204","line":95,"in_reply_to":"3a461143_47a3e64f","updated":"2017-02-01 23:24:21.000000000","message":"Done","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"4a76b1a48dbc7d14ad81c2332de681c64bcea3ee","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"Contracting the Database"},{"line_number":95,"context_line":"----------------------"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    glance-manage db contract"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"3a461143_339d385a","line":95,"in_reply_to":"3a461143_47a3e64f","updated":"2017-02-01 22:12:03.000000000","message":"Sure, will do if I\u0027m pushing another PS.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"}],"doc/source/man/glancemanage.rst":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"  **db_sync \u003cVERSION\u003e**"},{"line_number":57,"context_line":"        Place an existing database under migration control and upgrade it to"},{"line_number":58,"context_line":"        the specified VERSION."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"  **db_export_metadefs [PATH | PREFIX]**"},{"line_number":61,"context_line":"        Export the metadata definitions into json format. By default the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"ba5201f7_da8815c8","side":"PARENT","line":58,"updated":"2017-01-04 21:02:00.000000000","message":"Do you still need to use db_sync as part of a rolling upgrade process? The new text below leaves that ambiguous here. More specifically, is there anything you need to run between expand and contract?","commit_id":"b0fcfbce73848117d184ed6957dc5f99d6737cdf"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"  **db_sync \u003cVERSION\u003e**"},{"line_number":57,"context_line":"        Place an existing database under migration control and upgrade it to"},{"line_number":58,"context_line":"        the specified VERSION."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"  **db_export_metadefs [PATH | PREFIX]**"},{"line_number":61,"context_line":"        Export the metadata definitions into json format. By default the"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a461143_7385d2ab","side":"PARENT","line":58,"in_reply_to":"ba5201f7_da8815c8","updated":"2017-01-26 20:34:55.000000000","message":"db_sync is not required for a rolling upgrade.\nBetween expand and contract, we run data migrations, which I believe are not introduced in this patch.","commit_id":"b0fcfbce73848117d184ed6957dc5f99d6737cdf"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d933c856ba9728e56e374f32063bfa1acbe60d8f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"  **db_version_control**"},{"line_number":54,"context_line":"        Place the database under migration control."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"  **db_sync \u003cVERSION\u003e**"},{"line_number":57,"context_line":"        Place an existing database under migration control and upgrade it to"},{"line_number":58,"context_line":"        the specified VERSION."},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"3a461143_5defa0e8","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":21},"updated":"2017-01-30 15:41:32.000000000","message":"[VERSION]","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"709b8b04e06ce1538a3c242481cba78d0b14c7f7","unresolved":false,"context_lines":[{"line_number":53,"context_line":"  **db_version_control**"},{"line_number":54,"context_line":"        Place the database under migration control."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"  **db_sync \u003cVERSION\u003e**"},{"line_number":57,"context_line":"        Place an existing database under migration control and upgrade it to"},{"line_number":58,"context_line":"        the specified VERSION."},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"3a461143_320cbaec","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":21},"in_reply_to":"3a461143_5defa0e8","updated":"2017-01-30 17:17:35.000000000","message":"+1\nGuess that applies to db_upgrade and db_migrate as well?","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"b77505908ab5870ea6e2770c311465bbffe0d144","unresolved":false,"context_lines":[{"line_number":53,"context_line":"  **db_version_control**"},{"line_number":54,"context_line":"        Place the database under migration control."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"  **db_sync \u003cVERSION\u003e**"},{"line_number":57,"context_line":"        Place an existing database under migration control and upgrade it to"},{"line_number":58,"context_line":"        the specified VERSION."},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"3a461143_665a042c","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":21},"in_reply_to":"3a461143_5defa0e8","updated":"2017-01-30 18:19:33.000000000","message":"Done","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"c4fb951a72211b0f9b1687b02ec03781a8cb8f3f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  **db_version**"},{"line_number":47,"context_line":"        This will print the current migration level of a glance database."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  **db_upgrade [VERSION]**"},{"line_number":50,"context_line":"        This will take an existing database and upgrade it to the"},{"line_number":51,"context_line":"        specified VERSION."},{"line_number":52,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"3a461143_13e75cad","line":49,"range":{"start_line":49,"start_character":15,"end_line":49,"end_character":24},"updated":"2017-02-01 22:27:34.000000000","message":"could have come as a separate commit\n\nI\u0027d prefer if another PS will be pushed","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cb45f5493d07c730dd01a2d5a31f65501265b7ef","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  **db_version**"},{"line_number":47,"context_line":"        This will print the current migration level of a glance database."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"  **db_upgrade [VERSION]**"},{"line_number":50,"context_line":"        This will take an existing database and upgrade it to the"},{"line_number":51,"context_line":"        specified VERSION."},{"line_number":52,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"3a461143_884a3a26","line":49,"range":{"start_line":49,"start_character":15,"end_line":49,"end_character":24},"in_reply_to":"3a461143_13e75cad","updated":"2017-02-01 23:24:21.000000000","message":"Done","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"c4fb951a72211b0f9b1687b02ec03781a8cb8f3f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"  **db_version_control**"},{"line_number":54,"context_line":"        Place the database under migration control."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"  **db_sync [VERSION]**"},{"line_number":57,"context_line":"        Place an existing database under migration control and upgrade it to"},{"line_number":58,"context_line":"        the specified VERSION."},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"3a461143_5301e438","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":21},"updated":"2017-02-01 22:27:34.000000000","message":"ditto","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cb45f5493d07c730dd01a2d5a31f65501265b7ef","unresolved":false,"context_lines":[{"line_number":53,"context_line":"  **db_version_control**"},{"line_number":54,"context_line":"        Place the database under migration control."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"  **db_sync [VERSION]**"},{"line_number":57,"context_line":"        Place an existing database under migration control and upgrade it to"},{"line_number":58,"context_line":"        the specified VERSION."},{"line_number":59,"context_line":""}],"source_content_type":"text/x-rst","patch_set":28,"id":"3a461143_a847f61b","line":56,"range":{"start_line":56,"start_character":12,"end_line":56,"end_character":21},"in_reply_to":"3a461143_5301e438","updated":"2017-02-01 23:24:21.000000000","message":"Done","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"}],"glance/cmd/manage.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8cf96dda549244bfadc6fca5f16e6b637e80db57","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from alembic import command as alembic_command"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"from oslo_config import cfg"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"from oslo_log import log as logging"},{"line_number":47,"context_line":"from oslo_utils import encodeutils"},{"line_number":48,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a6eadb0_2d22a552","line":45,"updated":"2016-12-23 08:06:10.000000000","message":"nit: no need of new line","commit_id":"d286996a023c3ec344f4ab16bb5068e302ec39e7"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from alembic import command as alembic_command"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"from oslo_config import cfg"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"from oslo_log import log as logging"},{"line_number":47,"context_line":"from oslo_utils import encodeutils"},{"line_number":48,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_5ac345ed","line":45,"updated":"2017-01-04 21:02:00.000000000","message":"?","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from alembic import command as alembic_command"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"from oslo_config import cfg"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"from oslo_log import log as logging"},{"line_number":47,"context_line":"from oslo_utils import encodeutils"},{"line_number":48,"context_line":"import six"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_d363e618","line":45,"in_reply_to":"ba5201f7_5ac345ed","updated":"2017-01-26 20:34:55.000000000","message":"Done","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        alembic_command.upgrade(a_config, version)"},{"line_number":123,"context_line":"        heads \u003d alembic_migrations.get_current_alembic_heads()"},{"line_number":124,"context_line":"        if heads is None:"},{"line_number":125,"context_line":"            raise exception.GlanceException(\"Database sync failed\")"},{"line_number":126,"context_line":"        revs \u003d \", \".join(heads)"},{"line_number":127,"context_line":"        if version is \u0027heads\u0027:"},{"line_number":128,"context_line":"            print(_(\"Upgraded database, current revision(s):\"), revs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_faa87922","line":125,"updated":"2017-01-04 21:02:00.000000000","message":"Perhaps out of scope for this change, but that\u0027s a completely useless error message. What is anyone meant to do with that message?","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        alembic_command.upgrade(a_config, version)"},{"line_number":123,"context_line":"        heads \u003d alembic_migrations.get_current_alembic_heads()"},{"line_number":124,"context_line":"        if heads is None:"},{"line_number":125,"context_line":"            raise exception.GlanceException(\"Database sync failed\")"},{"line_number":126,"context_line":"        revs \u003d \", \".join(heads)"},{"line_number":127,"context_line":"        if version is \u0027heads\u0027:"},{"line_number":128,"context_line":"            print(_(\"Upgraded database, current revision(s):\"), revs)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_535ff640","line":125,"in_reply_to":"ba5201f7_faa87922","updated":"2017-01-26 20:34:55.000000000","message":"+1\nWill address that in the appropriate patch.","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        \"\"\"Run the expansion phase of a rolling upgrade procedure.\"\"\""},{"line_number":135,"context_line":"        expand_head \u003d alembic_migrations.get_alembic_branch_head("},{"line_number":136,"context_line":"            db_migration.EXPAND_BRANCH)"},{"line_number":137,"context_line":"        self.sync(expand_head)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def contract(self):"},{"line_number":140,"context_line":"        \"\"\"Run the contraction phase of a rolling upgrade procedure.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_950c9e3c","line":137,"updated":"2017-01-04 21:02:00.000000000","message":"If expand_head is null, then sync will default to \u0027heads\u0027 -- is that really what running \u0027expand\u0027 should do? The same applies to contract.","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        \"\"\"Run the expansion phase of a rolling upgrade procedure.\"\"\""},{"line_number":135,"context_line":"        expand_head \u003d alembic_migrations.get_alembic_branch_head("},{"line_number":136,"context_line":"            db_migration.EXPAND_BRANCH)"},{"line_number":137,"context_line":"        self.sync(expand_head)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def contract(self):"},{"line_number":140,"context_line":"        \"\"\"Run the contraction phase of a rolling upgrade procedure.\"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_5e69bdbd","line":137,"in_reply_to":"ba5201f7_950c9e3c","updated":"2017-01-26 20:34:55.000000000","message":"Good catch, Dolph!\nIt\u0027s definitely not what we want :)","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    def contract(self):"},{"line_number":140,"context_line":"        \"\"\"Run the contraction phase of a rolling upgrade procedure.\"\"\""},{"line_number":141,"context_line":"        # TODO(abashmak): determine if need to check here for expansion"},{"line_number":142,"context_line":"        # (and later data migration) being completed, to prevent operator error"},{"line_number":143,"context_line":"        contract_head \u003d alembic_migrations.get_alembic_branch_head("},{"line_number":144,"context_line":"            db_migration.CONTRACT_BRANCH)"},{"line_number":145,"context_line":"        self.sync(contract_head)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_ba7991ca","line":142,"updated":"2017-01-04 21:02:00.000000000","message":"++ It should be impossible to run contract unless expand has been run first. A useful error message would be nice if they are run out of order.","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    def contract(self):"},{"line_number":140,"context_line":"        \"\"\"Run the contraction phase of a rolling upgrade procedure.\"\"\""},{"line_number":141,"context_line":"        # TODO(abashmak): determine if need to check here for expansion"},{"line_number":142,"context_line":"        # (and later data migration) being completed, to prevent operator error"},{"line_number":143,"context_line":"        contract_head \u003d alembic_migrations.get_alembic_branch_head("},{"line_number":144,"context_line":"            db_migration.CONTRACT_BRANCH)"},{"line_number":145,"context_line":"        self.sync(contract_head)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_964dc274","line":142,"in_reply_to":"ba5201f7_ba7991ca","updated":"2017-01-26 20:34:55.000000000","message":"Done\nAdded check after db expand. Will add check for db migrate once it is added in the follow-up patches.","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d933c856ba9728e56e374f32063bfa1acbe60d8f","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @args(\u0027--max_rows\u0027, type\u003dint,"},{"line_number":176,"context_line":"          help\u003d\u0027Limit number of records to migrate\u0027)"},{"line_number":177,"context_line":"    def migrate(self, max_rows\u003d-1):"},{"line_number":178,"context_line":"        curr_heads \u003d alembic_migrations.get_current_alembic_heads()"},{"line_number":179,"context_line":"        if db_migration.LATEST_EXPAND_VERSION not in curr_heads:"},{"line_number":180,"context_line":"            print (_(\u0027Data migration did not run. Data migration cannot be \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_5b016837","line":177,"range":{"start_line":177,"start_character":31,"end_line":177,"end_character":33},"updated":"2017-01-30 15:41:32.000000000","message":"why -1 instead of None?","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"b77505908ab5870ea6e2770c311465bbffe0d144","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @args(\u0027--max_rows\u0027, type\u003dint,"},{"line_number":176,"context_line":"          help\u003d\u0027Limit number of records to migrate\u0027)"},{"line_number":177,"context_line":"    def migrate(self, max_rows\u003d-1):"},{"line_number":178,"context_line":"        curr_heads \u003d alembic_migrations.get_current_alembic_heads()"},{"line_number":179,"context_line":"        if db_migration.LATEST_EXPAND_VERSION not in curr_heads:"},{"line_number":180,"context_line":"            print (_(\u0027Data migration did not run. Data migration cannot be \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_465508f8","line":177,"range":{"start_line":177,"start_character":31,"end_line":177,"end_character":33},"in_reply_to":"3a461143_5b016837","updated":"2017-01-30 18:19:33.000000000","message":"Done","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"709b8b04e06ce1538a3c242481cba78d0b14c7f7","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    @args(\u0027--max_rows\u0027, type\u003dint,"},{"line_number":176,"context_line":"          help\u003d\u0027Limit number of records to migrate\u0027)"},{"line_number":177,"context_line":"    def migrate(self, max_rows\u003d-1):"},{"line_number":178,"context_line":"        curr_heads \u003d alembic_migrations.get_current_alembic_heads()"},{"line_number":179,"context_line":"        if db_migration.LATEST_EXPAND_VERSION not in curr_heads:"},{"line_number":180,"context_line":"            print (_(\u0027Data migration did not run. Data migration cannot be \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_d2745637","line":177,"range":{"start_line":177,"start_character":31,"end_line":177,"end_character":33},"in_reply_to":"3a461143_5b016837","updated":"2017-01-30 17:17:35.000000000","message":"Yeah, maybe it\u0027s better to keep is None by default.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d933c856ba9728e56e374f32063bfa1acbe60d8f","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def sync(self, version\u003ddb_migration.LATEST_REVISION):"},{"line_number":267,"context_line":"        self.command_object.sync(CONF.command.version)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def expand(self):"},{"line_number":270,"context_line":"        self.command_object.expand()"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def contract(self):"},{"line_number":273,"context_line":"        self.command_object.contract()"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def migrate(self, max_rows\u003d-1):"},{"line_number":276,"context_line":"        self.command_object.migrate(CONF.command.max_rows)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def load_metadefs(self, path\u003dNone, merge\u003dFalse,"},{"line_number":279,"context_line":"                      prefer_new\u003dFalse, overwrite\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_5dc24035","line":276,"range":{"start_line":268,"start_character":0,"end_line":276,"end_character":58},"updated":"2017-01-30 15:41:32.000000000","message":"I feel like we really ought to be returning non-0 exit code in the case of a failure.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"709b8b04e06ce1538a3c242481cba78d0b14c7f7","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def sync(self, version\u003ddb_migration.LATEST_REVISION):"},{"line_number":267,"context_line":"        self.command_object.sync(CONF.command.version)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def expand(self):"},{"line_number":270,"context_line":"        self.command_object.expand()"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def contract(self):"},{"line_number":273,"context_line":"        self.command_object.contract()"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def migrate(self, max_rows\u003d-1):"},{"line_number":276,"context_line":"        self.command_object.migrate(CONF.command.max_rows)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def load_metadefs(self, path\u003dNone, merge\u003dFalse,"},{"line_number":279,"context_line":"                      prefer_new\u003dFalse, overwrite\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_b2942a43","line":276,"range":{"start_line":268,"start_character":0,"end_line":276,"end_character":58},"in_reply_to":"3a461143_5dc24035","updated":"2017-01-30 17:17:35.000000000","message":"Agree, will look into it.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"b77505908ab5870ea6e2770c311465bbffe0d144","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def sync(self, version\u003ddb_migration.LATEST_REVISION):"},{"line_number":267,"context_line":"        self.command_object.sync(CONF.command.version)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def expand(self):"},{"line_number":270,"context_line":"        self.command_object.expand()"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def contract(self):"},{"line_number":273,"context_line":"        self.command_object.contract()"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def migrate(self, max_rows\u003d-1):"},{"line_number":276,"context_line":"        self.command_object.migrate(CONF.command.max_rows)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"    def load_metadefs(self, path\u003dNone, merge\u003dFalse,"},{"line_number":279,"context_line":"                      prefer_new\u003dFalse, overwrite\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_a6406c35","line":276,"range":{"start_line":268,"start_character":0,"end_line":276,"end_character":58},"in_reply_to":"3a461143_5dc24035","updated":"2017-01-30 18:19:33.000000000","message":"Done","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"456d23e7f640924a2e0206eb35d6b57e7de94c5c","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                       \u0027revision of contract branch.\u0027))"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        curr_heads \u003d alembic_migrations.get_current_alembic_heads()"},{"line_number":157,"context_line":"        if db_migration.LATEST_EXPAND_REVISIONnot in curr_heads:"},{"line_number":158,"context_line":"            sys.exit(_(\u0027Database contraction did not run. Database \u0027"},{"line_number":159,"context_line":"                       \u0027contraction cannot be run before database expansion. \u0027"},{"line_number":160,"context_line":"                       \u0027Run database expansion first using \u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_74a700bd","line":157,"range":{"start_line":157,"start_character":11,"end_line":157,"end_character":52},"updated":"2017-01-31 00:46:53.000000000","message":"not in","commit_id":"96deffe616fdc9eca86f9435d28a413cb29e875f"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"ef1463e5504550afbb57c936fc8e0620de86a3bb","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                       \u0027revision of contract branch.\u0027))"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        curr_heads \u003d alembic_migrations.get_current_alembic_heads()"},{"line_number":157,"context_line":"        if db_migration.LATEST_EXPAND_REVISIONnot in curr_heads:"},{"line_number":158,"context_line":"            sys.exit(_(\u0027Database contraction did not run. Database \u0027"},{"line_number":159,"context_line":"                       \u0027contraction cannot be run before database expansion. \u0027"},{"line_number":160,"context_line":"                       \u0027Run database expansion first using \u0027"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_14e5dca6","line":157,"range":{"start_line":157,"start_character":11,"end_line":157,"end_character":52},"in_reply_to":"3a461143_74a700bd","updated":"2017-01-31 00:57:58.000000000","message":"Good catch.","commit_id":"96deffe616fdc9eca86f9435d28a413cb29e875f"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"7369d31a68915f14b4ff38e2c73d4d54a0c80b14","unresolved":false,"context_lines":[{"line_number":176,"context_line":"                       \u0027expansion first using \"glance-manage db expand\"\u0027))"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        rows_migrated \u003d data_migrations.migrate(db_api.get_engine())"},{"line_number":179,"context_line":"        print(_(\u0027Migrated %s rows\u0027) % rows_migrated)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    @args(\u0027--path\u0027, metavar\u003d\u0027\u003cpath\u003e\u0027, help\u003d\u0027Path to the directory or file \u0027"},{"line_number":182,"context_line":"                                           \u0027where json metadata is stored\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_f9d1ce30","line":179,"range":{"start_line":179,"start_character":17,"end_line":179,"end_character":33},"updated":"2017-02-02 01:23:56.000000000","message":"Might be better as \u0027Performed %s migrations in %s operations\u0027 where, for example, the data migrations for community images has 3 operations and migrate returns a tuple. This can be deferred to the future in my opinion.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"5276350473cf22e362c6462399aea2fb631a6a85","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        expand_head \u003d alembic_migrations.get_alembic_branch_head("},{"line_number":133,"context_line":"            db_migration.EXPAND_BRANCH)"},{"line_number":134,"context_line":"        if not expand_head:"},{"line_number":135,"context_line":"            sys.exit(_(\u0027Database expansion failed. Couldn\\\u0027t find head \u0027"},{"line_number":136,"context_line":"                       \u0027revision of expand branch.\u0027))"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        self.sync(version\u003dexpand_head)"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a461143_3ed09cc9","line":135,"range":{"start_line":135,"start_character":51,"end_line":135,"end_character":60},"updated":"2017-02-02 00:47:11.000000000","message":"any reason to use a contraction?","commit_id":"0f0354a8b890a456c90744a3a5fcf6927a1edc3b"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"4279c64bded0ad9c10108c0b723ad1f89db6e34c","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        expand_head \u003d alembic_migrations.get_alembic_branch_head("},{"line_number":133,"context_line":"            db_migration.EXPAND_BRANCH)"},{"line_number":134,"context_line":"        if not expand_head:"},{"line_number":135,"context_line":"            sys.exit(_(\u0027Database expansion failed. Couldn\\\u0027t find head \u0027"},{"line_number":136,"context_line":"                       \u0027revision of expand branch.\u0027))"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        self.sync(version\u003dexpand_head)"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a461143_797b1e2a","line":135,"range":{"start_line":135,"start_character":51,"end_line":135,"end_character":60},"in_reply_to":"3a461143_3ed09cc9","updated":"2017-02-02 01:31:47.000000000","message":"Funny why I would do that. But, yeah, no specific reason.","commit_id":"0f0354a8b890a456c90744a3a5fcf6927a1edc3b"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"5276350473cf22e362c6462399aea2fb631a6a85","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        contract_head \u003d alembic_migrations.get_alembic_branch_head("},{"line_number":150,"context_line":"            db_migration.CONTRACT_BRANCH)"},{"line_number":151,"context_line":"        if not contract_head:"},{"line_number":152,"context_line":"            sys.exit(_(\u0027Database contraction failed. Couldn\\\u0027t find head \u0027"},{"line_number":153,"context_line":"                       \u0027revision of contract branch.\u0027))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        curr_heads \u003d alembic_migrations.get_current_alembic_heads()"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a461143_9ed7d0be","line":152,"range":{"start_line":152,"start_character":53,"end_line":152,"end_character":62},"updated":"2017-02-02 00:47:11.000000000","message":"as above","commit_id":"0f0354a8b890a456c90744a3a5fcf6927a1edc3b"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"4279c64bded0ad9c10108c0b723ad1f89db6e34c","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        contract_head \u003d alembic_migrations.get_alembic_branch_head("},{"line_number":150,"context_line":"            db_migration.CONTRACT_BRANCH)"},{"line_number":151,"context_line":"        if not contract_head:"},{"line_number":152,"context_line":"            sys.exit(_(\u0027Database contraction failed. Couldn\\\u0027t find head \u0027"},{"line_number":153,"context_line":"                       \u0027revision of contract branch.\u0027))"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        curr_heads \u003d alembic_migrations.get_current_alembic_heads()"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a461143_b9758633","line":152,"range":{"start_line":152,"start_character":53,"end_line":152,"end_character":62},"in_reply_to":"3a461143_9ed7d0be","updated":"2017-02-02 01:31:47.000000000","message":"Same.","commit_id":"0f0354a8b890a456c90744a3a5fcf6927a1edc3b"}],"glance/db/migration.py":[{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"c4fb951a72211b0f9b1687b02ec03781a8cb8f3f","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_IMPL \u003d None"},{"line_number":31,"context_line":"_LOCK \u003d threading.Lock()"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"db_options.set_defaults(cfg.CONF)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_d3615413","line":33,"updated":"2017-02-01 22:27:34.000000000","message":"can be avoided for a separate commit","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cb45f5493d07c730dd01a2d5a31f65501265b7ef","unresolved":false,"context_lines":[{"line_number":30,"context_line":"_IMPL \u003d None"},{"line_number":31,"context_line":"_LOCK \u003d threading.Lock()"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"db_options.set_defaults(cfg.CONF)"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_685c2eee","line":33,"in_reply_to":"3a461143_d3615413","updated":"2017-02-01 23:24:21.000000000","message":"Done","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"c4fb951a72211b0f9b1687b02ec03781a8cb8f3f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"# Migration-related constants"},{"line_number":49,"context_line":"EXPAND_BRANCH \u003d \u0027expand\u0027"},{"line_number":50,"context_line":"CONTRACT_BRANCH \u003d \u0027contract\u0027"},{"line_number":51,"context_line":"CURRENT_RELEASE \u003d \u0027ocata\u0027"},{"line_number":52,"context_line":"ALEMBIC_INIT_VERSION \u003d \u0027liberty\u0027"},{"line_number":53,"context_line":"LATEST_REVISION \u003d \u0027ocata01\u0027"},{"line_number":54,"context_line":"LATEST_EXPAND_REVISION \u003d \u0027ocata_expand01\u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_d348748d","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":25},"updated":"2017-02-01 22:27:34.000000000","message":"wow, hard coding the current release is fun indeed. why is this necessary? Please add a comment above so that people will be aware.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"251812489ddccfa7dc530327eefc23c2e3d6be3c","unresolved":false,"context_lines":[{"line_number":48,"context_line":"# Migration-related constants"},{"line_number":49,"context_line":"EXPAND_BRANCH \u003d \u0027expand\u0027"},{"line_number":50,"context_line":"CONTRACT_BRANCH \u003d \u0027contract\u0027"},{"line_number":51,"context_line":"CURRENT_RELEASE \u003d \u0027ocata\u0027"},{"line_number":52,"context_line":"ALEMBIC_INIT_VERSION \u003d \u0027liberty\u0027"},{"line_number":53,"context_line":"LATEST_REVISION \u003d \u0027ocata01\u0027"},{"line_number":54,"context_line":"LATEST_EXPAND_REVISION \u003d \u0027ocata_expand01\u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_e873be13","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":25},"in_reply_to":"3a461143_286226ae","updated":"2017-02-01 23:13:53.000000000","message":"I agree, I see this as technical debt that can be addressed later, after a better solution has been determined.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"b00eadd9af2635864d7d9173e314cb913fd51750","unresolved":false,"context_lines":[{"line_number":48,"context_line":"# Migration-related constants"},{"line_number":49,"context_line":"EXPAND_BRANCH \u003d \u0027expand\u0027"},{"line_number":50,"context_line":"CONTRACT_BRANCH \u003d \u0027contract\u0027"},{"line_number":51,"context_line":"CURRENT_RELEASE \u003d \u0027ocata\u0027"},{"line_number":52,"context_line":"ALEMBIC_INIT_VERSION \u003d \u0027liberty\u0027"},{"line_number":53,"context_line":"LATEST_REVISION \u003d \u0027ocata01\u0027"},{"line_number":54,"context_line":"LATEST_EXPAND_REVISION \u003d \u0027ocata_expand01\u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_e85e5e11","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":25},"in_reply_to":"3a461143_45c91bac","updated":"2017-02-01 22:57:05.000000000","message":"The CURRENT_RELEASE suggests which data migrations to be applied. Our data migrations currently all sit in one package and they may belong to different releases. We need a way to tell which migrations belong to which release. Now, this could be evident from the names of the data migration scripts. But, we also need to know what the current release is to be able to filter out the unwanted data migrations. Hence, the use of that variable. I couldn\u0027t figure out a better way.\n\nEssentially, we are not treating data migrations as database versions like expand, contract or the monolith migration scripts. So, we need a way to know what migrations have already been applied and what remain.\n\nNow, w.r.t. LATEST_EXPAND_REVISION and LATEST_CONTRACT_REVISION, there maybe a way to get rid of them. I\u0027ll look into this. If it is a smaller change, I\u0027ll address it in the next patchset. If not, I\u0027m guessing we could do it as a follow-up patch as well?","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"668a3bfd111bebbd6cf12900b43b8d4adc4d37c9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"# Migration-related constants"},{"line_number":49,"context_line":"EXPAND_BRANCH \u003d \u0027expand\u0027"},{"line_number":50,"context_line":"CONTRACT_BRANCH \u003d \u0027contract\u0027"},{"line_number":51,"context_line":"CURRENT_RELEASE \u003d \u0027ocata\u0027"},{"line_number":52,"context_line":"ALEMBIC_INIT_VERSION \u003d \u0027liberty\u0027"},{"line_number":53,"context_line":"LATEST_REVISION \u003d \u0027ocata01\u0027"},{"line_number":54,"context_line":"LATEST_EXPAND_REVISION \u003d \u0027ocata_expand01\u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_45c91bac","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":25},"in_reply_to":"3a461143_d348748d","updated":"2017-02-01 22:33:57.000000000","message":"I was wondering about this too, but forgot to ask.  Guess this plus all the LATEST_* below need to be checked/updated before each release.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"abd5a42bb23005af6b4453cdba399890c0efcd03","unresolved":false,"context_lines":[{"line_number":48,"context_line":"# Migration-related constants"},{"line_number":49,"context_line":"EXPAND_BRANCH \u003d \u0027expand\u0027"},{"line_number":50,"context_line":"CONTRACT_BRANCH \u003d \u0027contract\u0027"},{"line_number":51,"context_line":"CURRENT_RELEASE \u003d \u0027ocata\u0027"},{"line_number":52,"context_line":"ALEMBIC_INIT_VERSION \u003d \u0027liberty\u0027"},{"line_number":53,"context_line":"LATEST_REVISION \u003d \u0027ocata01\u0027"},{"line_number":54,"context_line":"LATEST_EXPAND_REVISION \u003d \u0027ocata_expand01\u0027"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_286226ae","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":25},"in_reply_to":"3a461143_e85e5e11","updated":"2017-02-01 23:00:46.000000000","message":"I\u0027d prefer this as a follow up patch to clean the looks of the code. I think we need a better (may be more programmable) way to handle the cases.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"c4fb951a72211b0f9b1687b02ec03781a8cb8f3f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"LATEST_CONTRACT_REVISION \u003d \u0027ocata_contract01\u0027"},{"line_number":56,"context_line":"INIT_VERSION \u003d 0"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"MIGRATE_REPO_PATH \u003d os.path.join("},{"line_number":60,"context_line":"    os.path.abspath(os.path.dirname(__file__)),"},{"line_number":61,"context_line":"    \u0027sqlalchemy\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_3348d887","line":58,"updated":"2017-02-01 22:27:34.000000000","message":"can be avoided for separate commit","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cb45f5493d07c730dd01a2d5a31f65501265b7ef","unresolved":false,"context_lines":[{"line_number":55,"context_line":"LATEST_CONTRACT_REVISION \u003d \u0027ocata_contract01\u0027"},{"line_number":56,"context_line":"INIT_VERSION \u003d 0"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"MIGRATE_REPO_PATH \u003d os.path.join("},{"line_number":60,"context_line":"    os.path.abspath(os.path.dirname(__file__)),"},{"line_number":61,"context_line":"    \u0027sqlalchemy\u0027,"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_88715a7a","line":58,"in_reply_to":"3a461143_3348d887","updated":"2017-02-01 23:24:21.000000000","message":"Done","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"}],"glance/db/sqlalchemy/alembic_migrations/__init__.py":[{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        alembic_command.stamp(a_config, alembic_version)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"def get_alembic_branch_head(self, branch):"},{"line_number":98,"context_line":"    \"\"\"Return head revision name for particular branch\"\"\""},{"line_number":99,"context_line":"    a_config \u003d get_alembic_config()"},{"line_number":100,"context_line":"    script \u003d alembic_script.ScriptDirectory.from_config(a_config)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_ba60b102","line":97,"updated":"2017-01-04 21:02:00.000000000","message":"self?","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        alembic_command.stamp(a_config, alembic_version)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"def get_alembic_branch_head(self, branch):"},{"line_number":98,"context_line":"    \"\"\"Return head revision name for particular branch\"\"\""},{"line_number":99,"context_line":"    a_config \u003d get_alembic_config()"},{"line_number":100,"context_line":"    script \u003d alembic_script.ScriptDirectory.from_config(a_config)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_d55103da","line":97,"in_reply_to":"ba5201f7_ba60b102","updated":"2017-01-26 20:34:55.000000000","message":"Done","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"c6feef32f8eeee739ce717f41c7f6c985b267c69","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        for head in heads:"},{"line_number":104,"context_line":"            if branch in head:"},{"line_number":105,"context_line":"                return head"},{"line_number":106,"context_line":"    return None"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_5a38a5ef","line":106,"updated":"2017-01-04 21:02:00.000000000","message":"Why would heads be None -- if the db isn\u0027t version controlled by alembic yet?","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"062f290906db6d3ff43a302615bcf9de5146a266","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        for head in heads:"},{"line_number":104,"context_line":"            if branch in head:"},{"line_number":105,"context_line":"                return head"},{"line_number":106,"context_line":"    return None"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_b6855e5a","line":106,"in_reply_to":"ba5201f7_5a38a5ef","updated":"2017-01-26 20:34:55.000000000","message":"yes, that\u0027s the only case when heads would be None.","commit_id":"af0939d2de2cc8f9df67d483eda468a6aa73e260"}],"glance/db/sqlalchemy/alembic_migrations/data_migrations/__init__.py":[{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d933c856ba9728e56e374f32063bfa1acbe60d8f","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    for migration in sorted(migrations):"},{"line_number":31,"context_line":"        module_loader \u003d pkgutil.get_loader(migration)"},{"line_number":32,"context_line":"        module \u003d module_loader.load_module(migration)"},{"line_number":33,"context_line":"        if (not hasattr(module, \u0027has_migrations\u0027) or"},{"line_number":34,"context_line":"                not hasattr(module, \u0027migrate\u0027)):"},{"line_number":35,"context_line":"            raise exception.InvalidDataMigrationScript(script\u003dmodule.__name__)"},{"line_number":36,"context_line":"        migration_modules.append(module)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_7be54436","line":34,"range":{"start_line":33,"start_character":0,"end_line":34,"end_character":48},"updated":"2017-01-30 15:41:32.000000000","message":"prefer try/except or getattr with a sentinal default to hasattr because hasattr does not behave the same in py2 vs py3 and can mask other errors in py2.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"b77505908ab5870ea6e2770c311465bbffe0d144","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    for migration in sorted(migrations):"},{"line_number":31,"context_line":"        module_loader \u003d pkgutil.get_loader(migration)"},{"line_number":32,"context_line":"        module \u003d module_loader.load_module(migration)"},{"line_number":33,"context_line":"        if (not hasattr(module, \u0027has_migrations\u0027) or"},{"line_number":34,"context_line":"                not hasattr(module, \u0027migrate\u0027)):"},{"line_number":35,"context_line":"            raise exception.InvalidDataMigrationScript(script\u003dmodule.__name__)"},{"line_number":36,"context_line":"        migration_modules.append(module)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_e6719445","line":34,"range":{"start_line":33,"start_character":0,"end_line":34,"end_character":48},"in_reply_to":"3a461143_7be54436","updated":"2017-01-30 18:19:33.000000000","message":"Done","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"709b8b04e06ce1538a3c242481cba78d0b14c7f7","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    for migration in sorted(migrations):"},{"line_number":31,"context_line":"        module_loader \u003d pkgutil.get_loader(migration)"},{"line_number":32,"context_line":"        module \u003d module_loader.load_module(migration)"},{"line_number":33,"context_line":"        if (not hasattr(module, \u0027has_migrations\u0027) or"},{"line_number":34,"context_line":"                not hasattr(module, \u0027migrate\u0027)):"},{"line_number":35,"context_line":"            raise exception.InvalidDataMigrationScript(script\u003dmodule.__name__)"},{"line_number":36,"context_line":"        migration_modules.append(module)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_75238ca7","line":34,"range":{"start_line":33,"start_character":0,"end_line":34,"end_character":48},"in_reply_to":"3a461143_7be54436","updated":"2017-01-30 17:17:35.000000000","message":"Good suggestion, thanks Steve!","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d933c856ba9728e56e374f32063bfa1acbe60d8f","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    remaining \u003d max_rows"},{"line_number":44,"context_line":"    for migration in migrations:"},{"line_number":45,"context_line":"        if migration.has_migrations():"},{"line_number":46,"context_line":"            rows_migrated +\u003d migration.migrate(remaining)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if max_rows !\u003d -1:"},{"line_number":49,"context_line":"            if rows_migrated \u003e\u003d max_rows:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_3bfadc75","line":46,"updated":"2017-01-30 15:41:32.000000000","message":"this passes -1 in on the first loop pass when no max_rows is given, which seems wrong","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"709b8b04e06ce1538a3c242481cba78d0b14c7f7","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    remaining \u003d max_rows"},{"line_number":44,"context_line":"    for migration in migrations:"},{"line_number":45,"context_line":"        if migration.has_migrations():"},{"line_number":46,"context_line":"            rows_migrated +\u003d migration.migrate(remaining)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if max_rows !\u003d -1:"},{"line_number":49,"context_line":"            if rows_migrated \u003e\u003d max_rows:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_b8aecbe3","line":46,"in_reply_to":"3a461143_3bfadc75","updated":"2017-01-30 17:17:35.000000000","message":"Not sure I understand what\u0027s wrong here. I get that \u0027None\u0027 is probably a better representation of no max_row limit than -1. But, I don\u0027t get how passing -1 is wrong if the migration scripts also interpret -1 as no max_row limit.\n\nHelp me understand if I\u0027m missing anything.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"6f4da54999dff75b0c3cb516d5149163c0dc9970","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    remaining \u003d max_rows"},{"line_number":44,"context_line":"    for migration in migrations:"},{"line_number":45,"context_line":"        if migration.has_migrations():"},{"line_number":46,"context_line":"            rows_migrated +\u003d migration.migrate(remaining)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if max_rows !\u003d -1:"},{"line_number":49,"context_line":"            if rows_migrated \u003e\u003d max_rows:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_e6727410","line":46,"in_reply_to":"3a461143_b8aecbe3","updated":"2017-01-30 18:25:48.000000000","message":"It just looks like a logic error when max_rows is not specified on CLI and -1 is the sentinel.\n\n  remaining \u003d max_rows \u003d -1\n    # [...]\n      rows_migrated +\u003d migration.migrate(-1)","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"35ebfcde1652229bb65c812ed2acd320d9cfc775","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    remaining \u003d max_rows"},{"line_number":44,"context_line":"    for migration in migrations:"},{"line_number":45,"context_line":"        if migration.has_migrations():"},{"line_number":46,"context_line":"            rows_migrated +\u003d migration.migrate(remaining)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if max_rows !\u003d -1:"},{"line_number":49,"context_line":"            if rows_migrated \u003e\u003d max_rows:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_e12fbe85","line":46,"in_reply_to":"3a461143_e6727410","updated":"2017-01-30 18:34:12.000000000","message":"Got it.\nYes, it does look dicey with -1. Replaced it with None.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d933c856ba9728e56e374f32063bfa1acbe60d8f","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if migration.has_migrations():"},{"line_number":46,"context_line":"            rows_migrated +\u003d migration.migrate(remaining)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if max_rows !\u003d -1:"},{"line_number":49,"context_line":"            if rows_migrated \u003e\u003d max_rows:"},{"line_number":50,"context_line":"                break"},{"line_number":51,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_3b6f3c2c","line":48,"updated":"2017-01-30 15:41:32.000000000","message":"This sentinal value is repeated in multiple files which also seems wrong.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"709b8b04e06ce1538a3c242481cba78d0b14c7f7","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if migration.has_migrations():"},{"line_number":46,"context_line":"            rows_migrated +\u003d migration.migrate(remaining)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if max_rows !\u003d -1:"},{"line_number":49,"context_line":"            if rows_migrated \u003e\u003d max_rows:"},{"line_number":50,"context_line":"                break"},{"line_number":51,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_58f16700","line":48,"in_reply_to":"3a461143_3b6f3c2c","updated":"2017-01-30 17:17:35.000000000","message":"I guess the sentinel value would be repeated anyway regardless of whether it is -1 or None, right?","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"6f4da54999dff75b0c3cb516d5149163c0dc9970","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if migration.has_migrations():"},{"line_number":46,"context_line":"            rows_migrated +\u003d migration.migrate(remaining)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if max_rows !\u003d -1:"},{"line_number":49,"context_line":"            if rows_migrated \u003e\u003d max_rows:"},{"line_number":50,"context_line":"                break"},{"line_number":51,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_8656105a","line":48,"in_reply_to":"3a461143_58f16700","updated":"2017-01-30 18:25:48.000000000","message":"could specify the default as a constant in this file and refer to it in cmd/manage.py but that might be overdoing it. That might be overdoing it though not sure.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"35ebfcde1652229bb65c812ed2acd320d9cfc775","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        if migration.has_migrations():"},{"line_number":46,"context_line":"            rows_migrated +\u003d migration.migrate(remaining)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        if max_rows !\u003d -1:"},{"line_number":49,"context_line":"            if rows_migrated \u003e\u003d max_rows:"},{"line_number":50,"context_line":"                break"},{"line_number":51,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_c149e261","line":48,"in_reply_to":"3a461143_8656105a","updated":"2017-01-30 18:34:12.000000000","message":"Sure, let\u0027s see if it\u0027s any better with None.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d933c856ba9728e56e374f32063bfa1acbe60d8f","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    migrations \u003d _find_migration_modules(db_migrations.CURRENT_RELEASE)"},{"line_number":59,"context_line":"    if not migrations:"},{"line_number":60,"context_line":"        return False"},{"line_number":61,"context_line":"    return reduce(lambda x, y: x or y,"},{"line_number":62,"context_line":"                  map(lambda x: x.has_migrations(), migrations))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def migrate(max_rows):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_16ea55ac","line":62,"range":{"start_line":61,"start_character":11,"end_line":62,"end_character":64},"updated":"2017-01-30 15:41:32.000000000","message":"functional style is fun, but an explicit for loop is more pythonic isn\u0027t it? more readable too.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"b77505908ab5870ea6e2770c311465bbffe0d144","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    migrations \u003d _find_migration_modules(db_migrations.CURRENT_RELEASE)"},{"line_number":59,"context_line":"    if not migrations:"},{"line_number":60,"context_line":"        return False"},{"line_number":61,"context_line":"    return reduce(lambda x, y: x or y,"},{"line_number":62,"context_line":"                  map(lambda x: x.has_migrations(), migrations))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def migrate(max_rows):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_46aee881","line":62,"range":{"start_line":61,"start_character":11,"end_line":62,"end_character":64},"in_reply_to":"3a461143_16ea55ac","updated":"2017-01-30 18:19:33.000000000","message":"Done","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"709b8b04e06ce1538a3c242481cba78d0b14c7f7","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    migrations \u003d _find_migration_modules(db_migrations.CURRENT_RELEASE)"},{"line_number":59,"context_line":"    if not migrations:"},{"line_number":60,"context_line":"        return False"},{"line_number":61,"context_line":"    return reduce(lambda x, y: x or y,"},{"line_number":62,"context_line":"                  map(lambda x: x.has_migrations(), migrations))"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def migrate(max_rows):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3a461143_f52f7c85","line":62,"range":{"start_line":61,"start_character":11,"end_line":62,"end_character":64},"in_reply_to":"3a461143_16ea55ac","updated":"2017-01-30 17:17:35.000000000","message":"Sure. I was half-expecting that comment :)","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"748e7d61dde6dc7508638d06dcf5b17724f6f3d2","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    migration_modules \u003d list()"},{"line_number":31,"context_line":"    for migration in sorted(migrations):"},{"line_number":32,"context_line":"        module \u003d importlib.import_module(\u0027.\u0027.join([__package__, migration]))"},{"line_number":33,"context_line":"        has_migrations_function \u003d getattr(module, \u0027has_migrations\u0027, None)"},{"line_number":34,"context_line":"        migrate_function \u003d getattr(module, \u0027migrate\u0027, None)"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_0d06b81c","line":32,"updated":"2017-01-30 21:55:03.000000000","message":"importlib is better here, nice change.","commit_id":"83b878211ea23fcc0d4ca281696d2cfcbefd8790"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"748e7d61dde6dc7508638d06dcf5b17724f6f3d2","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    if not migrations:"},{"line_number":63,"context_line":"        return False"},{"line_number":64,"context_line":"    pending_migrations \u003d [x.has_migrations() for x in migrations]"},{"line_number":65,"context_line":"    return True in pending_migrations"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def migrate(max_rows\u003dNone):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_129c130e","line":65,"updated":"2017-01-30 21:55:03.000000000","message":"better, it occurs you could also use:\n\n  return any([x.has_migrations() for x in migrations])","commit_id":"83b878211ea23fcc0d4ca281696d2cfcbefd8790"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"9bfe030c110fc7a5498df321b59070d92915b920","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    if not migrations:"},{"line_number":63,"context_line":"        return False"},{"line_number":64,"context_line":"    pending_migrations \u003d [x.has_migrations() for x in migrations]"},{"line_number":65,"context_line":"    return True in pending_migrations"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def migrate(max_rows\u003dNone):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a461143_6d749c67","line":65,"in_reply_to":"3a461143_129c130e","updated":"2017-01-30 22:03:03.000000000","message":"sure","commit_id":"83b878211ea23fcc0d4ca281696d2cfcbefd8790"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"456d23e7f640924a2e0206eb35d6b57e7de94c5c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import importlib"},{"line_number":17,"context_line":"import os.path"},{"line_number":18,"context_line":"import pkgutil"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_7488e071","line":16,"range":{"start_line":16,"start_character":7,"end_line":16,"end_character":16},"updated":"2017-01-31 00:46:53.000000000","message":"why are we not using oslo\u0027s importutils?","commit_id":"96deffe616fdc9eca86f9435d28a413cb29e875f"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"ef1463e5504550afbb57c936fc8e0620de86a3bb","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import importlib"},{"line_number":17,"context_line":"import os.path"},{"line_number":18,"context_line":"import pkgutil"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_d48c34dc","line":16,"range":{"start_line":16,"start_character":7,"end_line":16,"end_character":16},"in_reply_to":"3a461143_7488e071","updated":"2017-01-31 00:57:58.000000000","message":"I don\u0027t know how oslo importutils is better than importlib.\nIf it doesn\u0027t buy us anything specifically, I\u0027d prefer to stick to python standard library.","commit_id":"96deffe616fdc9eca86f9435d28a413cb29e875f"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"456d23e7f640924a2e0206eb35d6b57e7de94c5c","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    migration_modules \u003d list()"},{"line_number":31,"context_line":"    for migration in sorted(migrations):"},{"line_number":32,"context_line":"        module \u003d importlib.import_module(\u0027.\u0027.join([__package__, migration]))"},{"line_number":33,"context_line":"        has_migrations_function \u003d getattr(module, \u0027has_migrations\u0027, None)"},{"line_number":34,"context_line":"        migrate_function \u003d getattr(module, \u0027migrate\u0027, None)"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_346738b8","line":32,"range":{"start_line":32,"start_character":17,"end_line":32,"end_character":40},"updated":"2017-01-31 00:46:53.000000000","message":"importutils.import_module?","commit_id":"96deffe616fdc9eca86f9435d28a413cb29e875f"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"bffbca619e89a36e3cf9945606cac3a5a82c38cd","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def _run_migrations(migrations):"},{"line_number":45,"context_line":"    rows_migrated \u003d 0"},{"line_number":46,"context_line":"    if migrations:"},{"line_number":47,"context_line":"        for migration in migrations:"},{"line_number":48,"context_line":"            if migration.has_migrations():"},{"line_number":49,"context_line":"                rows_migrated +\u003d migration.migrate()"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a461143_2ee6dce7","line":46,"updated":"2017-02-01 04:08:38.000000000","message":"nit: this is now a pointless if. logic works the same without it and it reads easier.","commit_id":"f99fc6681cdc2d03d75965589b30f3efe2f16566"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"4d19e06de58911cdb3c8057d665ea7325c2d2412","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def _run_migrations(migrations):"},{"line_number":45,"context_line":"    rows_migrated \u003d 0"},{"line_number":46,"context_line":"    if migrations:"},{"line_number":47,"context_line":"        for migration in migrations:"},{"line_number":48,"context_line":"            if migration.has_migrations():"},{"line_number":49,"context_line":"                rows_migrated +\u003d migration.migrate()"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a461143_936b7084","line":46,"in_reply_to":"3a461143_2ee6dce7","updated":"2017-02-01 04:29:41.000000000","message":"Done","commit_id":"f99fc6681cdc2d03d75965589b30f3efe2f16566"}],"glance/tests/unit/test_data_migration_framework.py":[{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"ff6fb9e103d2cf7eaa3f0d8afb393721246009bd","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        mock_import.side_effect \u003d fake_imported_modules"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        actual \u003d data_migrations._find_migration_modules(\u0027ocata\u0027)"},{"line_number":118,"context_line":"        self.assertEquals(2, len(actual))"},{"line_number":119,"context_line":"        self.assertEquals(fake_imported_modules, actual)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @mock.patch(\u0027pkgutil.iter_modules\u0027)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_7e7600d8","line":118,"range":{"start_line":118,"start_character":13,"end_line":118,"end_character":25},"updated":"2017-01-31 00:16:57.000000000","message":"assertEqual?","commit_id":"96deffe616fdc9eca86f9435d28a413cb29e875f"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"ff6fb9e103d2cf7eaa3f0d8afb393721246009bd","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        actual \u003d data_migrations._find_migration_modules(\u0027ocata\u0027)"},{"line_number":118,"context_line":"        self.assertEquals(2, len(actual))"},{"line_number":119,"context_line":"        self.assertEquals(fake_imported_modules, actual)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @mock.patch(\u0027pkgutil.iter_modules\u0027)"},{"line_number":122,"context_line":"    def test_find_migrations_no_migrations(self, mock_iter):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_1e425c68","line":119,"range":{"start_line":119,"start_character":13,"end_line":119,"end_character":25},"updated":"2017-01-31 00:16:57.000000000","message":"same","commit_id":"96deffe616fdc9eca86f9435d28a413cb29e875f"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"ff6fb9e103d2cf7eaa3f0d8afb393721246009bd","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        mock_iter.side_effect \u003d fake_iter_modules"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        actual \u003d data_migrations._find_migration_modules(\u0027ocata\u0027)"},{"line_number":133,"context_line":"        self.assertEquals(0, len(actual))"},{"line_number":134,"context_line":"        self.assertEquals([], actual)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def test_run_migrations(self):"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_3e471878","line":133,"range":{"start_line":133,"start_character":13,"end_line":133,"end_character":25},"updated":"2017-01-31 00:16:57.000000000","message":"assertEqual","commit_id":"96deffe616fdc9eca86f9435d28a413cb29e875f"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"ff6fb9e103d2cf7eaa3f0d8afb393721246009bd","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        actual \u003d data_migrations._find_migration_modules(\u0027ocata\u0027)"},{"line_number":133,"context_line":"        self.assertEquals(0, len(actual))"},{"line_number":134,"context_line":"        self.assertEquals([], actual)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def test_run_migrations(self):"},{"line_number":137,"context_line":"        ocata1 \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a461143_5e606401","line":134,"range":{"start_line":134,"start_character":13,"end_line":134,"end_character":25},"updated":"2017-01-31 00:16:57.000000000","message":"same","commit_id":"96deffe616fdc9eca86f9435d28a413cb29e875f"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"eb0a9075301f20d4d6695971cebe31d0f0eb0aa2","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        engine \u003d mock.Mock()"},{"line_number":146,"context_line":"        actual \u003d data_migrations._run_migrations(engine, migrations)"},{"line_number":147,"context_line":"        self.assertEqual(150, actual)"},{"line_number":148,"context_line":"        ocata1.has_migrations.assert_called()"},{"line_number":149,"context_line":"        ocata1.migrate.assert_called_once_with(engine)"},{"line_number":150,"context_line":"        ocata2.has_migrations.assert_called()"},{"line_number":151,"context_line":"        ocata2.migrate.assert_called_once_with(engine)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_1d8774d8","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":45},"updated":"2017-02-01 18:49:47.000000000","message":"We can do assert_called_once_with here for ocata1 mock object\n\nSame for following tests.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"0084d4308044d16f1b6573b5b15b75c8dc6418c2","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        engine \u003d mock.Mock()"},{"line_number":146,"context_line":"        actual \u003d data_migrations._run_migrations(engine, migrations)"},{"line_number":147,"context_line":"        self.assertEqual(150, actual)"},{"line_number":148,"context_line":"        ocata1.has_migrations.assert_called()"},{"line_number":149,"context_line":"        ocata1.migrate.assert_called_once_with(engine)"},{"line_number":150,"context_line":"        ocata2.has_migrations.assert_called()"},{"line_number":151,"context_line":"        ocata2.migrate.assert_called_once_with(engine)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_fed61f26","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":45},"in_reply_to":"3a461143_1d8774d8","updated":"2017-02-01 18:53:59.000000000","message":"Ah, yes, good catch.\nI missed that one. Will wait to see if other reviewers have any suggestions that need a new PS.","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cb45f5493d07c730dd01a2d5a31f65501265b7ef","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        engine \u003d mock.Mock()"},{"line_number":146,"context_line":"        actual \u003d data_migrations._run_migrations(engine, migrations)"},{"line_number":147,"context_line":"        self.assertEqual(150, actual)"},{"line_number":148,"context_line":"        ocata1.has_migrations.assert_called()"},{"line_number":149,"context_line":"        ocata1.migrate.assert_called_once_with(engine)"},{"line_number":150,"context_line":"        ocata2.has_migrations.assert_called()"},{"line_number":151,"context_line":"        ocata2.migrate.assert_called_once_with(engine)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_c8c7e262","line":148,"range":{"start_line":148,"start_character":8,"end_line":148,"end_character":45},"in_reply_to":"3a461143_1d8774d8","updated":"2017-02-01 23:24:21.000000000","message":"Done","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"eb0a9075301f20d4d6695971cebe31d0f0eb0aa2","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        self.assertEqual(150, actual)"},{"line_number":148,"context_line":"        ocata1.has_migrations.assert_called()"},{"line_number":149,"context_line":"        ocata1.migrate.assert_called_once_with(engine)"},{"line_number":150,"context_line":"        ocata2.has_migrations.assert_called()"},{"line_number":151,"context_line":"        ocata2.migrate.assert_called_once_with(engine)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_run_migrations_with_one_pending_migration(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_5d6e5c97","line":150,"range":{"start_line":150,"start_character":7,"end_line":150,"end_character":45},"updated":"2017-02-01 18:49:47.000000000","message":"ocata2.assert_called_once_with(engine)","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"0084d4308044d16f1b6573b5b15b75c8dc6418c2","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        self.assertEqual(150, actual)"},{"line_number":148,"context_line":"        ocata1.has_migrations.assert_called()"},{"line_number":149,"context_line":"        ocata1.migrate.assert_called_once_with(engine)"},{"line_number":150,"context_line":"        ocata2.has_migrations.assert_called()"},{"line_number":151,"context_line":"        ocata2.migrate.assert_called_once_with(engine)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_run_migrations_with_one_pending_migration(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_3ee187ff","line":150,"range":{"start_line":150,"start_character":7,"end_line":150,"end_character":45},"in_reply_to":"3a461143_5d6e5c97","updated":"2017-02-01 18:53:59.000000000","message":"+1","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"cb45f5493d07c730dd01a2d5a31f65501265b7ef","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        self.assertEqual(150, actual)"},{"line_number":148,"context_line":"        ocata1.has_migrations.assert_called()"},{"line_number":149,"context_line":"        ocata1.migrate.assert_called_once_with(engine)"},{"line_number":150,"context_line":"        ocata2.has_migrations.assert_called()"},{"line_number":151,"context_line":"        ocata2.migrate.assert_called_once_with(engine)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_run_migrations_with_one_pending_migration(self):"}],"source_content_type":"text/x-python","patch_set":28,"id":"3a461143_a8ca966c","line":150,"range":{"start_line":150,"start_character":7,"end_line":150,"end_character":45},"in_reply_to":"3a461143_5d6e5c97","updated":"2017-02-01 23:24:21.000000000","message":"Done","commit_id":"aebada1fcdee33cbac2aa768823e98784f821eab"}],"glance/tests/unit/test_manage.py":[{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"d933c856ba9728e56e374f32063bfa1acbe60d8f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"3a461143_d650cd34","updated":"2017-01-30 15:41:32.000000000","message":"Why no test for \u0027migrate\u0027","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"},{"author":{"_account_id":8158,"name":"Hemanth Makkapati","email":"makstacker+osgerrit@gmail.com","username":"hemanth.makkapati"},"change_message_id":"709b8b04e06ce1538a3c242481cba78d0b14c7f7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"3a461143_55f13000","in_reply_to":"3a461143_d650cd34","updated":"2017-01-30 17:17:35.000000000","message":"Didn\u0027t get to it yet, working on migrate tests now.","commit_id":"3e718cea36f442b63e6af4d26b827151c0034299"}]}
