)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"15aa44a441ea93b8de01a9104be868274facfe19","unresolved":false,"context_lines":[{"line_number":14,"context_line":"result of commands being issued (in most cases it will still be 0 only,"},{"line_number":15,"context_line":"since our command handlers implicitly return None)."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"DocImpact"},{"line_number":18,"context_line":"Closes-Bug: #1519118"},{"line_number":19,"context_line":"Change-Id: I7c5a4882ad4f80459ebe69c9a9c43cc60ce50200"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a740942_6881468f","line":17,"updated":"2015-12-04 01:17:36.000000000","message":"Please follow guidelines as detailed here:\n\nhttp://lists.openstack.org/pipermail/openstack-dev/2015-November/080294.html\n\n\"you will need to add a description whenever you add a DocImpact flag in your commit message.\"","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"5bbd9fb4475911d470004b8e57d3e4c2428d85c6","unresolved":false,"context_lines":[{"line_number":14,"context_line":"result of commands being issued (in most cases it will still be 0 only,"},{"line_number":15,"context_line":"since our command handlers implicitly return None)."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"DocImpact"},{"line_number":18,"context_line":"Closes-Bug: #1519118"},{"line_number":19,"context_line":"Change-Id: I7c5a4882ad4f80459ebe69c9a9c43cc60ce50200"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da6ed579_3884635c","line":17,"in_reply_to":"7a740942_6881468f","updated":"2016-01-14 16:50:16.000000000","message":"Done.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"}],"doc/source/devref/upgrade.rst":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c5b4400332c3832f6150c7481a9357545f6cf06f","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    whether there are pending contract scripts not applied to the database::"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"     $ neutron-db-manage has_offline_migrations"},{"line_number":102,"context_line":"     $ echo $?"},{"line_number":103,"context_line":"     0 # means there are no pending contract scripts and hence full shutdown is not needed"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":":ref:`More info on alembic scripts \u003calembic_migrations\u003e`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"da6ed579_e0a44409","line":102,"updated":"2016-01-18 18:48:12.000000000","message":"That\u0027s nice for scripts, but I think we should print a nice friendly message for humans too.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"c54a528b7a7f046be932a8465a8bf8bdca26f6ee","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    whether there are pending contract scripts not applied to the database::"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"     $ neutron-db-manage has_offline_migrations"},{"line_number":102,"context_line":"     $ echo $?"},{"line_number":103,"context_line":"     0 # means there are no pending contract scripts and hence full shutdown is not needed"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":":ref:`More info on alembic scripts \u003calembic_migrations\u003e`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"ba63e191_252d8c46","line":102,"in_reply_to":"ba63e191_33441673","updated":"2016-01-19 18:08:33.000000000","message":"Sure. Message now being returned. Doc updated accordingly.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"de1b298cd52a94a8a2a08e0539e8161e4cb70c96","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    whether there are pending contract scripts not applied to the database::"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"     $ neutron-db-manage has_offline_migrations"},{"line_number":102,"context_line":"     $ echo $?"},{"line_number":103,"context_line":"     0 # means there are no pending contract scripts and hence full shutdown is not needed"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":":ref:`More info on alembic scripts \u003calembic_migrations\u003e`."}],"source_content_type":"text/x-rst","patch_set":6,"id":"ba63e191_33441673","line":102,"in_reply_to":"da6ed579_e0a44409","updated":"2016-01-19 09:19:12.000000000","message":"+1\nI add a comment about that on the 4th patch set.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"}],"neutron/db/migration/cli.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"70c674004e4786cf4876b2b3f2f03595fe466693","unresolved":false,"context_lines":[{"line_number":431,"context_line":""},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"def _get_database_contract_root(config):"},{"line_number":434,"context_line":"    # TODO(ihrachys): how can we retrieve the latest contract revision applied"},{"line_number":435,"context_line":"    # to db?"},{"line_number":436,"context_line":"    return \u0027354db87e3225\u0027"},{"line_number":437,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_439af66f","line":434,"range":{"start_line":434,"start_character":33,"end_line":434,"end_character":42},"updated":"2015-11-23 13:38:53.000000000","message":"Seems we need alembic 0.8.4 for this http://alembic.readthedocs.org/en/latest/api/script.html#alembic.script.revision.RevisionMap.get_current_head it will be possile to pass branch_label.","commit_id":"f7823fe97268f59b87f6256704583f126eb7091e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e08c5b899f2a837bf1853874a22977e799a6dc9c","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":"def _get_current_database_heads(config):"},{"line_number":436,"context_line":"    engine \u003d sqlalchemy.create_engine("},{"line_number":437,"context_line":"        config.neutron_config.database.connection)"},{"line_number":438,"context_line":"    try:"},{"line_number":439,"context_line":"        conn \u003d engine.connect()"},{"line_number":440,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_7cd3fb38","line":437,"updated":"2015-11-23 23:04:56.000000000","message":"Some of this code is adopted from env.py, though it\u0027s not identical. I look forward to see the point considered by db subteam (Ann, Henry) on whether it\u0027s worth to reuse the code from a single place.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"3d1f66a9ecd884b59d390dcd1c032e9aba86baf6","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":"def _get_current_database_heads(config):"},{"line_number":436,"context_line":"    engine \u003d sqlalchemy.create_engine("},{"line_number":437,"context_line":"        config.neutron_config.database.connection)"},{"line_number":438,"context_line":"    try:"},{"line_number":439,"context_line":"        conn \u003d engine.connect()"},{"line_number":440,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_05f66e8f","line":437,"in_reply_to":"ba8a016a_7cd3fb38","updated":"2016-01-12 12:39:31.000000000","message":"I think it would be nicer if env.py contained all the engine logic. Maybe a context manager that can be re-used?","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"5bbd9fb4475911d470004b8e57d3e4c2428d85c6","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":"def _get_current_database_heads(config):"},{"line_number":436,"context_line":"    engine \u003d sqlalchemy.create_engine("},{"line_number":437,"context_line":"        config.neutron_config.database.connection)"},{"line_number":438,"context_line":"    try:"},{"line_number":439,"context_line":"        conn \u003d engine.connect()"},{"line_number":440,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_3891c347","line":437,"in_reply_to":"da6ed579_05f66e8f","updated":"2016-01-14 16:50:16.000000000","message":"I would like to have included it in env.py but I am not sure there is a gain until we have \"one alembic env\" as there is an env.py file per subproject.\nI would appreciate any feedback to the contrary.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"09ab3305978636682125901a7c2c52899b7d6c1a","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":"def _get_current_database_heads(config):"},{"line_number":436,"context_line":"    engine \u003d sqlalchemy.create_engine("},{"line_number":437,"context_line":"        config.neutron_config.database.connection)"},{"line_number":438,"context_line":"    try:"},{"line_number":439,"context_line":"        conn \u003d engine.connect()"},{"line_number":440,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_cb3f3785","line":437,"in_reply_to":"da6ed579_3891c347","updated":"2016-01-15 15:06:26.000000000","message":"Probably, creating a help function for getting context from config in env.py will work for now.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"62efb77c7d485309086f7040084501b448051ee5","unresolved":false,"context_lines":[{"line_number":434,"context_line":""},{"line_number":435,"context_line":"def _get_current_database_heads(config):"},{"line_number":436,"context_line":"    engine \u003d sqlalchemy.create_engine("},{"line_number":437,"context_line":"        config.neutron_config.database.connection)"},{"line_number":438,"context_line":"    try:"},{"line_number":439,"context_line":"        conn \u003d engine.connect()"},{"line_number":440,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba63e191_45ed2024","line":437,"in_reply_to":"da6ed579_cb3f3785","updated":"2016-01-19 18:00:46.000000000","message":"I have added a context manager as suggested by Henry to handle connection and engine as per env.py.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"09ab3305978636682125901a7c2c52899b7d6c1a","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        # If there is at least one contract revision not applied to database,"},{"line_number":454,"context_line":"        # it means we should shut down all neutron-server instances before"},{"line_number":455,"context_line":"        # proceeding with upgrade."},{"line_number":456,"context_line":"        return True"},{"line_number":457,"context_line":"    return False"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_6bb3ab4d","line":456,"updated":"2016-01-15 15:06:26.000000000","message":"What about returning a message here? It will help users to understand the result without looking into the guide. Like\n\n    ...\n    alembic_util.msg(_(\"Needs to apply migrations from contract branch\"))\n    return True\n    ...","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"62efb77c7d485309086f7040084501b448051ee5","unresolved":false,"context_lines":[{"line_number":453,"context_line":"        # If there is at least one contract revision not applied to database,"},{"line_number":454,"context_line":"        # it means we should shut down all neutron-server instances before"},{"line_number":455,"context_line":"        # proceeding with upgrade."},{"line_number":456,"context_line":"        return True"},{"line_number":457,"context_line":"    return False"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba63e191_c564b0e6","line":456,"in_reply_to":"da6ed579_6bb3ab4d","updated":"2016-01-19 18:00:46.000000000","message":"Good idea. Done.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"9b6aa612d22fc1714ecc460d374483b97101c879","unresolved":false,"context_lines":[{"line_number":503,"context_line":"        \u0027has_offline_migrations\u0027,"},{"line_number":504,"context_line":"        help\u003d\u0027Determine whether there are pending migration scripts that \u0027"},{"line_number":505,"context_line":"             \u0027require full shutdown for all services that directly access \u0027"},{"line_number":506,"context_line":"             \u0027database\u0027)"},{"line_number":507,"context_line":"    parser.set_defaults(func\u003dhas_offline_migrations)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_bd1b9ac9","line":506,"updated":"2015-11-24 03:03:21.000000000","message":"Nit :Fullstop","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"5bbd9fb4475911d470004b8e57d3e4c2428d85c6","unresolved":false,"context_lines":[{"line_number":503,"context_line":"        \u0027has_offline_migrations\u0027,"},{"line_number":504,"context_line":"        help\u003d\u0027Determine whether there are pending migration scripts that \u0027"},{"line_number":505,"context_line":"             \u0027require full shutdown for all services that directly access \u0027"},{"line_number":506,"context_line":"             \u0027database\u0027)"},{"line_number":507,"context_line":"    parser.set_defaults(func\u003dhas_offline_migrations)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_d8dc2775","line":506,"in_reply_to":"ba8a016a_bd1b9ac9","updated":"2016-01-14 16:50:16.000000000","message":"Sorry forgot; I will get it in next spin.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"62efb77c7d485309086f7040084501b448051ee5","unresolved":false,"context_lines":[{"line_number":503,"context_line":"        \u0027has_offline_migrations\u0027,"},{"line_number":504,"context_line":"        help\u003d\u0027Determine whether there are pending migration scripts that \u0027"},{"line_number":505,"context_line":"             \u0027require full shutdown for all services that directly access \u0027"},{"line_number":506,"context_line":"             \u0027database\u0027)"},{"line_number":507,"context_line":"    parser.set_defaults(func\u003dhas_offline_migrations)"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba63e191_855eb810","line":506,"in_reply_to":"da6ed579_d8dc2775","updated":"2016-01-19 18:00:46.000000000","message":"Added fullstop.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e08c5b899f2a837bf1853874a22977e799a6dc9c","unresolved":false,"context_lines":[{"line_number":716,"context_line":"    err \u003d False"},{"line_number":717,"context_line":"    for config in get_alembic_configs():"},{"line_number":718,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":719,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":720,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_5c295736","line":719,"updated":"2015-11-23 23:04:56.000000000","message":"I don\u0027t really like that approach, though relying on specific output from the command is also not ideal.\n\nOne issue with that approach is that in that way I identify True response to request \u0027has_offline_migrations\u0027 with return code \u003d 1 which is often used for \u0027False\u0027 responses in Unix shell context. Should I revert the meaning of return codes in Python to accommodate shell guidelines?","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"9b6aa612d22fc1714ecc460d374483b97101c879","unresolved":false,"context_lines":[{"line_number":716,"context_line":"    err \u003d False"},{"line_number":717,"context_line":"    for config in get_alembic_configs():"},{"line_number":718,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":719,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":720,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_9d06d61e","line":719,"in_reply_to":"ba8a016a_5c295736","updated":"2015-11-24 03:03:21.000000000","message":"Shell guidelines generally want 0 to be successful, and Non-Zero to be failure.\n(Sample Reference: \nhttp://tldp.org/LDP/abs/html/exit-status.html , second paragraph)\n\nHowever, here the objective is not Success/Failure but if the offline_migrations is required or not.\n( IMO) Keeping the objective in mind, we can go with the proposal that :\n0 - No Offline Migrations required\n1 - Offline Migrations required \nas mentioned in doc/source/devref/upgrade.rst \n\nIn the end, the user would be looking into the guide to understand how it works, so in the end the definition depends on developers, how they want a return code to be handled.\n\nP.S. : I tried to return True and False from a simple Python script and it always gave \"echo $?\" as Zero.\nHope the code is working successfully at your end","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"5bbd9fb4475911d470004b8e57d3e4c2428d85c6","unresolved":false,"context_lines":[{"line_number":716,"context_line":"    err \u003d False"},{"line_number":717,"context_line":"    for config in get_alembic_configs():"},{"line_number":718,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":719,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":720,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_388a231c","line":719,"in_reply_to":"ba8a016a_9d06d61e","updated":"2016-01-14 16:50:16.000000000","message":"Left it as is for the moment. I can update if we want it changed.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"62efb77c7d485309086f7040084501b448051ee5","unresolved":false,"context_lines":[{"line_number":716,"context_line":"    err \u003d False"},{"line_number":717,"context_line":"    for config in get_alembic_configs():"},{"line_number":718,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":719,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":720,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba63e191_a5973c8f","line":719,"in_reply_to":"da6ed579_388a231c","updated":"2016-01-19 18:00:46.000000000","message":"Returning message now instead.","commit_id":"c4e388907bedbc737d66beeaa387fc83533e4e02"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c5b4400332c3832f6150c7481a9357545f6cf06f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"VERSION_TABLES \u003d {\u0027neutron\u0027: DEFAULT_VERSION_TABLE,"},{"line_number":70,"context_line":"                  \u0027neutron-fwaas\u0027: \u0027alembic_version_fwaas\u0027,"},{"line_number":71,"context_line":"                  \u0027neutron-lbaas\u0027: \u0027alembic_version_lbaas\u0027,"},{"line_number":72,"context_line":"                  \u0027neutron-vpnaas\u0027: \u0027alembic_version_vpnaas\u0027}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"_core_opts \u003d ["},{"line_number":75,"context_line":"    cfg.StrOpt(\u0027core_plugin\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_626dfa31","line":72,"updated":"2016-01-18 18:48:12.000000000","message":"These subproject alembic version table names should not be managed here in core neutron. More on this below.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"c54a528b7a7f046be932a8465a8bf8bdca26f6ee","unresolved":false,"context_lines":[{"line_number":69,"context_line":"VERSION_TABLES \u003d {\u0027neutron\u0027: DEFAULT_VERSION_TABLE,"},{"line_number":70,"context_line":"                  \u0027neutron-fwaas\u0027: \u0027alembic_version_fwaas\u0027,"},{"line_number":71,"context_line":"                  \u0027neutron-lbaas\u0027: \u0027alembic_version_lbaas\u0027,"},{"line_number":72,"context_line":"                  \u0027neutron-vpnaas\u0027: \u0027alembic_version_vpnaas\u0027}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"_core_opts \u003d ["},{"line_number":75,"context_line":"    cfg.StrOpt(\u0027core_plugin\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_a5217c4f","line":72,"in_reply_to":"ba63e191_626dfa31","updated":"2016-01-19 18:08:33.000000000","message":"Sure, agreed. Removed.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"53650bbd4393206b31c9419cec6686b1c967a0d7","unresolved":false,"context_lines":[{"line_number":444,"context_line":""},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"def _get_current_database_heads(config):"},{"line_number":447,"context_line":"    engine \u003d sqlalchemy.create_engine("},{"line_number":448,"context_line":"        config.neutron_config.database.connection)"},{"line_number":449,"context_line":"    try:"},{"line_number":450,"context_line":"        conn \u003d engine.connect()"},{"line_number":451,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_4b958830","line":448,"range":{"start_line":447,"start_character":4,"end_line":448,"end_character":50},"updated":"2016-01-15 15:08:06.000000000","message":"I think we should do the same as in env, check if engine is not already exists https://github.com/openstack/neutron/blob/master/neutron/db/migration/alembic_migrations/env.py#L111-L115","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c5b4400332c3832f6150c7481a9357545f6cf06f","unresolved":false,"context_lines":[{"line_number":444,"context_line":""},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"def _get_current_database_heads(config):"},{"line_number":447,"context_line":"    engine \u003d sqlalchemy.create_engine("},{"line_number":448,"context_line":"        config.neutron_config.database.connection)"},{"line_number":449,"context_line":"    try:"},{"line_number":450,"context_line":"        conn \u003d engine.connect()"},{"line_number":451,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_e040c409","line":448,"range":{"start_line":447,"start_character":4,"end_line":448,"end_character":50},"in_reply_to":"da6ed579_4b958830","updated":"2016-01-18 18:48:12.000000000","message":"I agree, it looks like we could have a nice context manager for these.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"c54a528b7a7f046be932a8465a8bf8bdca26f6ee","unresolved":false,"context_lines":[{"line_number":444,"context_line":""},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"def _get_current_database_heads(config):"},{"line_number":447,"context_line":"    engine \u003d sqlalchemy.create_engine("},{"line_number":448,"context_line":"        config.neutron_config.database.connection)"},{"line_number":449,"context_line":"    try:"},{"line_number":450,"context_line":"        conn \u003d engine.connect()"},{"line_number":451,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_65c5c43a","line":448,"range":{"start_line":447,"start_character":4,"end_line":448,"end_character":50},"in_reply_to":"da6ed579_e040c409","updated":"2016-01-19 18:08:33.000000000","message":"I agree Ann also. Good idea Henry of using a context manager for the connection. I have added new class DBConnection which is a context manager and handles the connection.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c5b4400332c3832f6150c7481a9357545f6cf06f","unresolved":false,"context_lines":[{"line_number":691,"context_line":"        config.set_main_option(\u0027script_location\u0027, script_location)"},{"line_number":692,"context_line":"        _set_version_locations(config)"},{"line_number":693,"context_line":"        config.neutron_config \u003d CONF"},{"line_number":694,"context_line":"        if project not in VERSION_TABLES:"},{"line_number":695,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d DEFAULT_VERSION_TABLE"},{"line_number":696,"context_line":"        else:"},{"line_number":697,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d VERSION_TABLES[project]"},{"line_number":698,"context_line":"        configs.append(config)"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"    return configs"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_c2d5c6b9","line":697,"range":{"start_line":694,"start_character":0,"end_line":697,"end_character":72},"updated":"2016-01-18 18:48:12.000000000","message":"Instead of this, you can have a method to look up the version table name from the config:\n\ndef get_alembic_version_table(config):\n    script_dir \u003d alembic_script.ScriptDirectory.from_config(config)\n    alembic_version_table \u003d [None]\n\n    def alembic_version_table_from_env(rev, context):\n        alembic_version_table[0] \u003d context.version_table\n        return []\n\n    with environment.EnvironmentContext(config, script_dir,\n                                        fn\u003dalembic_version_table_from_env):\n        script_dir.run_env()\n\n    return alembic_version_table[0]","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"c54a528b7a7f046be932a8465a8bf8bdca26f6ee","unresolved":false,"context_lines":[{"line_number":691,"context_line":"        config.set_main_option(\u0027script_location\u0027, script_location)"},{"line_number":692,"context_line":"        _set_version_locations(config)"},{"line_number":693,"context_line":"        config.neutron_config \u003d CONF"},{"line_number":694,"context_line":"        if project not in VERSION_TABLES:"},{"line_number":695,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d DEFAULT_VERSION_TABLE"},{"line_number":696,"context_line":"        else:"},{"line_number":697,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d VERSION_TABLES[project]"},{"line_number":698,"context_line":"        configs.append(config)"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"    return configs"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_a58adcbd","line":697,"range":{"start_line":694,"start_character":0,"end_line":697,"end_character":72},"in_reply_to":"ba63e191_b306c61e","updated":"2016-01-19 18:08:33.000000000","message":"I have added the method to return the version table per config.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"de1b298cd52a94a8a2a08e0539e8161e4cb70c96","unresolved":false,"context_lines":[{"line_number":691,"context_line":"        config.set_main_option(\u0027script_location\u0027, script_location)"},{"line_number":692,"context_line":"        _set_version_locations(config)"},{"line_number":693,"context_line":"        config.neutron_config \u003d CONF"},{"line_number":694,"context_line":"        if project not in VERSION_TABLES:"},{"line_number":695,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d DEFAULT_VERSION_TABLE"},{"line_number":696,"context_line":"        else:"},{"line_number":697,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d VERSION_TABLES[project]"},{"line_number":698,"context_line":"        configs.append(config)"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"    return configs"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_b306c61e","line":697,"range":{"start_line":694,"start_character":0,"end_line":697,"end_character":72},"in_reply_to":"ba63e191_bd7233ac","updated":"2016-01-19 09:19:12.000000000","message":"+1","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"c54a528b7a7f046be932a8465a8bf8bdca26f6ee","unresolved":false,"context_lines":[{"line_number":691,"context_line":"        config.set_main_option(\u0027script_location\u0027, script_location)"},{"line_number":692,"context_line":"        _set_version_locations(config)"},{"line_number":693,"context_line":"        config.neutron_config \u003d CONF"},{"line_number":694,"context_line":"        if project not in VERSION_TABLES:"},{"line_number":695,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d DEFAULT_VERSION_TABLE"},{"line_number":696,"context_line":"        else:"},{"line_number":697,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d VERSION_TABLES[project]"},{"line_number":698,"context_line":"        configs.append(config)"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"    return configs"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_654f04be","line":697,"range":{"start_line":694,"start_character":0,"end_line":697,"end_character":72},"in_reply_to":"ba63e191_bd7233ac","updated":"2016-01-19 18:08:33.000000000","message":"Thanks for elaborating on the local variable.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"c54a528b7a7f046be932a8465a8bf8bdca26f6ee","unresolved":false,"context_lines":[{"line_number":691,"context_line":"        config.set_main_option(\u0027script_location\u0027, script_location)"},{"line_number":692,"context_line":"        _set_version_locations(config)"},{"line_number":693,"context_line":"        config.neutron_config \u003d CONF"},{"line_number":694,"context_line":"        if project not in VERSION_TABLES:"},{"line_number":695,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d DEFAULT_VERSION_TABLE"},{"line_number":696,"context_line":"        else:"},{"line_number":697,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d VERSION_TABLES[project]"},{"line_number":698,"context_line":"        configs.append(config)"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"    return configs"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_c5691027","line":697,"range":{"start_line":694,"start_character":0,"end_line":697,"end_character":72},"in_reply_to":"ba63e191_c2d5c6b9","updated":"2016-01-19 18:08:33.000000000","message":"Nice Henry, thanks for the pattern. Much better approach.","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"61453f25e7e4d3e42e4889d2791eedb10283a7b5","unresolved":false,"context_lines":[{"line_number":691,"context_line":"        config.set_main_option(\u0027script_location\u0027, script_location)"},{"line_number":692,"context_line":"        _set_version_locations(config)"},{"line_number":693,"context_line":"        config.neutron_config \u003d CONF"},{"line_number":694,"context_line":"        if project not in VERSION_TABLES:"},{"line_number":695,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d DEFAULT_VERSION_TABLE"},{"line_number":696,"context_line":"        else:"},{"line_number":697,"context_line":"            config.attributes[\u0027version_table\u0027] \u003d VERSION_TABLES[project]"},{"line_number":698,"context_line":"        configs.append(config)"},{"line_number":699,"context_line":""},{"line_number":700,"context_line":"    return configs"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba63e191_bd7233ac","line":697,"range":{"start_line":694,"start_character":0,"end_line":697,"end_character":72},"in_reply_to":"ba63e191_c2d5c6b9","updated":"2016-01-18 18:54:14.000000000","message":"P.S. The reason why the local variable alembic_version_table is a list: http://stackoverflow.com/questions/7935966","commit_id":"b2c330f0d2505a8a51a1c7da68820aa140214b16"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"fd52570fe25ad9651e56b1b95aa12bad0fe9a0fd","unresolved":false,"context_lines":[{"line_number":438,"context_line":""},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"def _get_current_database_heads(config):"},{"line_number":441,"context_line":"    with DBConnection(config.neutron_config.database.connection) \\"},{"line_number":442,"context_line":"        as conn:"},{"line_number":443,"context_line":"        opts \u003d {"},{"line_number":444,"context_line":"            \u0027version_table\u0027: get_alembic_version_table(config)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_1cf77af6","line":441,"range":{"start_line":441,"start_character":65,"end_line":441,"end_character":66},"updated":"2016-01-19 20:42:05.000000000","message":"No need to break this line.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"f158f075d8c084a8a1ff03b946c49f6ab08b43e1","unresolved":false,"context_lines":[{"line_number":438,"context_line":""},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"def _get_current_database_heads(config):"},{"line_number":441,"context_line":"    with DBConnection(config.neutron_config.database.connection) \\"},{"line_number":442,"context_line":"        as conn:"},{"line_number":443,"context_line":"        opts \u003d {"},{"line_number":444,"context_line":"            \u0027version_table\u0027: get_alembic_version_table(config)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_e2abc31b","line":441,"range":{"start_line":441,"start_character":65,"end_line":441,"end_character":66},"in_reply_to":"ba63e191_1cf77af6","updated":"2016-01-20 11:25:03.000000000","message":"Sure, had longer line originally. Now joined as one line.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"fd52570fe25ad9651e56b1b95aa12bad0fe9a0fd","unresolved":false,"context_lines":[{"line_number":454,"context_line":"        # If there is at least one contract revision not applied to database,"},{"line_number":455,"context_line":"        # it means we should shut down all neutron-server instances before"},{"line_number":456,"context_line":"        # proceeding with upgrade."},{"line_number":457,"context_line":"        alembic_util.msg(_(\"Need to apply migrations from contract branch. \""},{"line_number":458,"context_line":"                           \"This will require all Neutron server instances \""},{"line_number":459,"context_line":"                           \"to be shutdown before proceeding with the \""},{"line_number":460,"context_line":"                           \"upgrade.\"))"},{"line_number":461,"context_line":"        return True"},{"line_number":462,"context_line":"    return False"},{"line_number":463,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_1c10daa7","line":460,"range":{"start_line":457,"start_character":0,"end_line":460,"end_character":39},"updated":"2016-01-19 20:42:05.000000000","message":"This will get printed once for each subproject that has offline migrations pending. You should insert the project name (\"... from %(project)s contract branch...\") which can be retrieved by:\n\n    project \u003d config.get_main_option(\u0027neutron_project\u0027)","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"f158f075d8c084a8a1ff03b946c49f6ab08b43e1","unresolved":false,"context_lines":[{"line_number":454,"context_line":"        # If there is at least one contract revision not applied to database,"},{"line_number":455,"context_line":"        # it means we should shut down all neutron-server instances before"},{"line_number":456,"context_line":"        # proceeding with upgrade."},{"line_number":457,"context_line":"        alembic_util.msg(_(\"Need to apply migrations from contract branch. \""},{"line_number":458,"context_line":"                           \"This will require all Neutron server instances \""},{"line_number":459,"context_line":"                           \"to be shutdown before proceeding with the \""},{"line_number":460,"context_line":"                           \"upgrade.\"))"},{"line_number":461,"context_line":"        return True"},{"line_number":462,"context_line":"    return False"},{"line_number":463,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_bdd72c22","line":460,"range":{"start_line":457,"start_character":0,"end_line":460,"end_character":39},"in_reply_to":"ba63e191_1c10daa7","updated":"2016-01-20 11:25:03.000000000","message":"Ok, makes sense. Added project to the message.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"ef7de207e3951d71108e77dcce53496756833148","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                           \"to be shutdown before proceeding with the \""},{"line_number":460,"context_line":"                           \"upgrade.\"))"},{"line_number":461,"context_line":"        return True"},{"line_number":462,"context_line":"    return False"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"def add_command_parsers(subparsers):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_40fbb2c1","line":462,"updated":"2016-01-20 06:11:11.000000000","message":"I think we need to return here message too that no contract migrations need to be applied.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c3e60b070721bf4748fb9166869f12738aa604db","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                           \"to be shutdown before proceeding with the \""},{"line_number":460,"context_line":"                           \"upgrade.\"))"},{"line_number":461,"context_line":"        return True"},{"line_number":462,"context_line":"    return False"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"def add_command_parsers(subparsers):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_44b9df2d","line":462,"in_reply_to":"9a68dd71_30ad0989","updated":"2016-01-20 15:09:01.000000000","message":"I tend to agree with Ann.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"8c4801d80f14e1dacbecd38cea0e618b76618d2b","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                           \"to be shutdown before proceeding with the \""},{"line_number":460,"context_line":"                           \"upgrade.\"))"},{"line_number":461,"context_line":"        return True"},{"line_number":462,"context_line":"    return False"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"def add_command_parsers(subparsers):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_089bf1ca","line":462,"in_reply_to":"9a68dd71_30ad0989","updated":"2016-01-21 17:39:43.000000000","message":"Ok, agree. Good counter point!:) Added message for success if not pending offline migrations.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"f158f075d8c084a8a1ff03b946c49f6ab08b43e1","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                           \"to be shutdown before proceeding with the \""},{"line_number":460,"context_line":"                           \"upgrade.\"))"},{"line_number":461,"context_line":"        return True"},{"line_number":462,"context_line":"    return False"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"def add_command_parsers(subparsers):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_7debf4b0","line":462,"in_reply_to":"ba63e191_40fbb2c1","updated":"2016-01-20 11:25:03.000000000","message":"The command is to inform the user if there is a need for offline migration and in this case we return a message to say this for each project that has the contract branch. I am not sure if there is a need to also tell the user the projects that are not needing offline migrations as well. I think this could lead to some confusion.  What do reviewers think?","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"e4103361e464cb8cd946cac3574f15eb4b2ea394","unresolved":false,"context_lines":[{"line_number":459,"context_line":"                           \"to be shutdown before proceeding with the \""},{"line_number":460,"context_line":"                           \"upgrade.\"))"},{"line_number":461,"context_line":"        return True"},{"line_number":462,"context_line":"    return False"},{"line_number":463,"context_line":""},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"def add_command_parsers(subparsers):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_30ad0989","line":462,"in_reply_to":"ba63e191_7debf4b0","updated":"2016-01-20 14:33:54.000000000","message":"In my opinion nothing will be confusion to user because the first question will be \"hey, does this thing work at all?\"","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"7f882467ac29dd7e50480eb5c3ea7d70a6ff64f4","unresolved":false,"context_lines":[{"line_number":460,"context_line":"                           \u0027proceeding with the upgrade.\u0027) %"},{"line_number":461,"context_line":"            {\"project\": project})"},{"line_number":462,"context_line":"        return True"},{"line_number":463,"context_line":"    return False"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"def add_command_parsers(subparsers):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_6751450e","line":463,"range":{"start_line":463,"start_character":4,"end_line":463,"end_character":16},"updated":"2016-01-21 15:01:30.000000000","message":"As mentioned in the previous patch set, we should print a \"No offline migrations pending\" message here. Actually, you\u0027ll need to do it from main() because you only want to print it once after checking all the subprojects.","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"efe610627de82344462cdb1c71c3c5b2e85d92d9","unresolved":false,"context_lines":[{"line_number":460,"context_line":"                           \u0027proceeding with the upgrade.\u0027) %"},{"line_number":461,"context_line":"            {\"project\": project})"},{"line_number":462,"context_line":"        return True"},{"line_number":463,"context_line":"    return False"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"def add_command_parsers(subparsers):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_f6987c1d","line":463,"range":{"start_line":463,"start_character":4,"end_line":463,"end_character":16},"in_reply_to":"9a68dd71_6751450e","updated":"2016-01-21 17:50:01.000000000","message":"Sure, agreed. Added message.","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"31f297728ec321cad40988e474fe09c4b0e1ae42","unresolved":false,"context_lines":[{"line_number":738,"context_line":"def main():"},{"line_number":739,"context_line":"    CONF(project\u003d\u0027neutron\u0027)"},{"line_number":740,"context_line":"    validate_cli_options()"},{"line_number":741,"context_line":"    err \u003d False"},{"line_number":742,"context_line":"    for config in get_alembic_configs():"},{"line_number":743,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":744,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_2b56a55c","line":741,"range":{"start_line":741,"start_character":4,"end_line":741,"end_character":7},"updated":"2016-01-21 20:56:44.000000000","message":"\"err\" as variable name is confusing, indeed according to the code when err \u003d\u003d True means we are in the nominal case?","commit_id":"927445776892330093504ccd28ea07e63fba8879"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"9433ce925d29ae03d3e4496b58ee17c8d7bf7681","unresolved":false,"context_lines":[{"line_number":738,"context_line":"def main():"},{"line_number":739,"context_line":"    CONF(project\u003d\u0027neutron\u0027)"},{"line_number":740,"context_line":"    validate_cli_options()"},{"line_number":741,"context_line":"    err \u003d False"},{"line_number":742,"context_line":"    for config in get_alembic_configs():"},{"line_number":743,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":744,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_757d3de6","line":741,"range":{"start_line":741,"start_character":4,"end_line":741,"end_character":7},"in_reply_to":"9a68dd71_2b56a55c","updated":"2016-01-22 10:47:55.000000000","message":"Agreed, that it is not a very good variable name. Changed to return_val.","commit_id":"927445776892330093504ccd28ea07e63fba8879"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"251e1023632318aee31855eaa45c98b9a9bc4ad6","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":744,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    if not err:"},{"line_number":747,"context_line":"        alembic_util.msg(_(\u0027No offline migrations pending.\u0027))"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_cd828600","line":746,"updated":"2016-01-21 18:18:24.000000000","message":"You also need to check if the command is has_offline_migrations before printing this.","commit_id":"927445776892330093504ccd28ea07e63fba8879"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"9433ce925d29ae03d3e4496b58ee17c8d7bf7681","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":744,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    if not err:"},{"line_number":747,"context_line":"        alembic_util.msg(_(\u0027No offline migrations pending.\u0027))"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_557a79f2","line":746,"in_reply_to":"9a68dd71_0c3c052e","updated":"2016-01-22 10:47:55.000000000","message":"Ditto.","commit_id":"927445776892330093504ccd28ea07e63fba8879"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"9433ce925d29ae03d3e4496b58ee17c8d7bf7681","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":744,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    if not err:"},{"line_number":747,"context_line":"        alembic_util.msg(_(\u0027No offline migrations pending.\u0027))"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_551359b8","line":746,"in_reply_to":"9a68dd71_3127f4cb","updated":"2016-01-22 10:47:55.000000000","message":"I understand now, my bad. I had forgotten about the other commands. I have added variables to handle off_line_migrations and if not pending offline migrations.","commit_id":"927445776892330093504ccd28ea07e63fba8879"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"33593e2af7ebf09d87346e404e317ae3272a9f98","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":744,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    if not err:"},{"line_number":747,"context_line":"        alembic_util.msg(_(\u0027No offline migrations pending.\u0027))"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_0c3c052e","line":746,"in_reply_to":"9a68dd71_3127f4cb","updated":"2016-01-22 08:11:51.000000000","message":"Yes, now we will have message \"No offline migrations pending.\" running every command: current, branches, head, etc, but we may need to apply contract migrations. May be can move this message to line 462?","commit_id":"927445776892330093504ccd28ea07e63fba8879"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"79e4f5d0c13687a51cdd9d237faab1f11eddd445","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":744,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    if not err:"},{"line_number":747,"context_line":"        alembic_util.msg(_(\u0027No offline migrations pending.\u0027))"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_3127f4cb","line":746,"in_reply_to":"9a68dd71_abea950d","updated":"2016-01-21 21:51:58.000000000","message":"I mean \u0027has_offline_migrations\u0027 is not the only command for neutron-db-manage. Try running \u0027neutron-db-manage current\u0027 for example.","commit_id":"927445776892330093504ccd28ea07e63fba8879"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"7333a089624de15541af97d0f57906cb59482359","unresolved":false,"context_lines":[{"line_number":743,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":744,"context_line":"        err |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    if not err:"},{"line_number":747,"context_line":"        alembic_util.msg(_(\u0027No offline migrations pending.\u0027))"},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"    return err"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_abea950d","line":746,"in_reply_to":"9a68dd71_cd828600","updated":"2016-01-21 20:41:33.000000000","message":"I think this is what the \"err\" variable does. It checks the return code of each run of the \u0027has_offline_migrations\u0027 method per project and OR\u0027s it with the previous run. This therefore will be \u0027True\u0027 if at least one of the runs has a pending offline migration. Is that a correct understanding?","commit_id":"927445776892330093504ccd28ea07e63fba8879"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"6e8425c8606431cece182dbcb2ecc73031aa54bd","unresolved":false,"context_lines":[{"line_number":110,"context_line":"CONF.register_cli_opts(_db_opts, \u0027database\u0027)"},{"line_number":111,"context_line":"CONF.register_opts(_quota_opts, \u0027QUOTAS\u0027)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"PENDING_OFFLINE_MIGRATIONS_CMD \u003d False"},{"line_number":114,"context_line":"PENDING_OFFLINE_MIGRATIONS \u003d False"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def do_alembic_command(config, cmd, revision\u003dNone, desc\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_7101c804","line":114,"range":{"start_line":113,"start_character":0,"end_line":114,"end_character":34},"updated":"2016-01-22 13:28:02.000000000","message":"I don\u0027t like global variables, sorry. See below.","commit_id":"921555c6f4491ff0c7489ac200c6cf062ed077d5"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"3f11b7f33d9f4ca942bcc44f4f1b0472e5abbb2c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"CONF.register_cli_opts(_db_opts, \u0027database\u0027)"},{"line_number":111,"context_line":"CONF.register_opts(_quota_opts, \u0027QUOTAS\u0027)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"PENDING_OFFLINE_MIGRATIONS_CMD \u003d False"},{"line_number":114,"context_line":"PENDING_OFFLINE_MIGRATIONS \u003d False"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"def do_alembic_command(config, cmd, revision\u003dNone, desc\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_c01bff71","line":114,"range":{"start_line":113,"start_character":0,"end_line":114,"end_character":34},"in_reply_to":"9a68dd71_7101c804","updated":"2016-01-22 13:57:54.000000000","message":"Fair enough. Throw back to C days!:) Removed.","commit_id":"921555c6f4491ff0c7489ac200c6cf062ed077d5"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"6e8425c8606431cece182dbcb2ecc73031aa54bd","unresolved":false,"context_lines":[{"line_number":750,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":751,"context_line":"        return_val |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":"    if PENDING_OFFLINE_MIGRATIONS_CMD and not PENDING_OFFLINE_MIGRATIONS:"},{"line_number":754,"context_line":"        alembic_util.msg(_(\u0027No offline migrations pending.\u0027))"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"    return return_val"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_719d48bb","line":753,"updated":"2016-01-22 13:28:02.000000000","message":"I think it would be better to check like this:\n\n    if CONF.command.name is \u0027has_offline_migrations\u0027 and return_val is False:","commit_id":"921555c6f4491ff0c7489ac200c6cf062ed077d5"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"3f11b7f33d9f4ca942bcc44f4f1b0472e5abbb2c","unresolved":false,"context_lines":[{"line_number":750,"context_line":"        #TODO(gongysh) enable logging"},{"line_number":751,"context_line":"        return_val |\u003d bool(CONF.command.func(config, CONF.command.name))"},{"line_number":752,"context_line":""},{"line_number":753,"context_line":"    if PENDING_OFFLINE_MIGRATIONS_CMD and not PENDING_OFFLINE_MIGRATIONS:"},{"line_number":754,"context_line":"        alembic_util.msg(_(\u0027No offline migrations pending.\u0027))"},{"line_number":755,"context_line":""},{"line_number":756,"context_line":"    return return_val"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_401e2f60","line":753,"in_reply_to":"9a68dd71_719d48bb","updated":"2016-01-22 13:57:54.000000000","message":"Agreed, better alternative. Updated.","commit_id":"921555c6f4491ff0c7489ac200c6cf062ed077d5"}],"neutron/db/migration/connection.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"fd52570fe25ad9651e56b1b95aa12bad0fe9a0fd","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __init__(self, connection_url, connection\u003dNone):"},{"line_number":26,"context_line":"        self.connection \u003d connection"},{"line_number":27,"context_line":"        self.connection_url \u003d connection_url"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __enter__(self):"},{"line_number":30,"context_line":"        self.new_engine \u003d self.connection is None"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_8156a5d0","line":27,"updated":"2016-01-19 20:42:05.000000000","message":"I would set self.new_engine to False here in __init__ just in case something weird happens with __enter__.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"f158f075d8c084a8a1ff03b946c49f6ab08b43e1","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __init__(self, connection_url, connection\u003dNone):"},{"line_number":26,"context_line":"        self.connection \u003d connection"},{"line_number":27,"context_line":"        self.connection_url \u003d connection_url"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def __enter__(self):"},{"line_number":30,"context_line":"        self.new_engine \u003d self.connection is None"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_9d7a68f0","line":27,"in_reply_to":"ba63e191_8156a5d0","updated":"2016-01-20 11:25:03.000000000","message":"Probably best. Initialised now.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a5e7c8e475f3cdad5c1a0a118166455d3fb38b72","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from oslo_db.sqlalchemy import session"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"class DBConnection(object):"},{"line_number":17,"context_line":"    \"\"\"Context manager class which handles a DB connection."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"       An existing connection can be passed as a parameter and when"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_af3178ee","line":16,"range":{"start_line":16,"start_character":19,"end_line":16,"end_character":25},"updated":"2016-01-20 23:50:47.000000000","message":"This context is not thread-safe.\n\nIMO it should be highlighted to avoid its use as it in the future in neutron services.","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"efe610627de82344462cdb1c71c3c5b2e85d92d9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from oslo_db.sqlalchemy import session"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"class DBConnection(object):"},{"line_number":17,"context_line":"    \"\"\"Context manager class which handles a DB connection."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"       An existing connection can be passed as a parameter and when"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_565f0841","line":16,"range":{"start_line":16,"start_character":19,"end_line":16,"end_character":25},"in_reply_to":"9a68dd71_912b5794","updated":"2016-01-21 17:50:01.000000000","message":"Doc string is sufficient.","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"efe610627de82344462cdb1c71c3c5b2e85d92d9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from oslo_db.sqlalchemy import session"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"class DBConnection(object):"},{"line_number":17,"context_line":"    \"\"\"Context manager class which handles a DB connection."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"       An existing connection can be passed as a parameter and when"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_1682f094","line":16,"range":{"start_line":16,"start_character":19,"end_line":16,"end_character":25},"in_reply_to":"9a68dd71_af3178ee","updated":"2016-01-21 17:50:01.000000000","message":"Agreed on IRC today to add class doc string to specify that it is not thread safe. Added doc string.","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"7f882467ac29dd7e50480eb5c3ea7d70a6ff64f4","unresolved":false,"context_lines":[{"line_number":13,"context_line":"from oslo_db.sqlalchemy import session"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"class DBConnection(object):"},{"line_number":17,"context_line":"    \"\"\"Context manager class which handles a DB connection."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"       An existing connection can be passed as a parameter and when"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_912b5794","line":16,"range":{"start_line":16,"start_character":19,"end_line":16,"end_character":25},"in_reply_to":"9a68dd71_af3178ee","updated":"2016-01-21 15:01:30.000000000","message":"Is this a problem for neutron-db-manage? (And what is the recipe for a thread-safe context manager?)","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a5e7c8e475f3cdad5c1a0a118166455d3fb38b72","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def __exit__(self, type, value, traceback):"},{"line_number":36,"context_line":"        if self.new_engine:"},{"line_number":37,"context_line":"            self.connection.close()"},{"line_number":38,"context_line":"            self.engine.dispose()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_6c1dce72","line":38,"range":{"start_line":38,"start_character":17,"end_line":38,"end_character":23},"updated":"2016-01-20 23:50:47.000000000","message":"this line is not called if self.engine.connect() fails in __enter__, is it fine?","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"7f882467ac29dd7e50480eb5c3ea7d70a6ff64f4","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def __exit__(self, type, value, traceback):"},{"line_number":36,"context_line":"        if self.new_engine:"},{"line_number":37,"context_line":"            self.connection.close()"},{"line_number":38,"context_line":"            self.engine.dispose()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_6c304a9f","line":38,"range":{"start_line":38,"start_character":17,"end_line":38,"end_character":23},"in_reply_to":"9a68dd71_6c1dce72","updated":"2016-01-21 15:01:30.000000000","message":"This line will be called because self.new_engine is initialized before self.engine.connect() is attempted.\n\nOn the other hand, if self.engine.connect() fails then line 37 could be a problem. Maybe here we should have:\n\n    if self.new_engine:\n        try:\n            self.connection.close()\n        finally:\n            self.engine.dispose()","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"efe610627de82344462cdb1c71c3c5b2e85d92d9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def __exit__(self, type, value, traceback):"},{"line_number":36,"context_line":"        if self.new_engine:"},{"line_number":37,"context_line":"            self.connection.close()"},{"line_number":38,"context_line":"            self.engine.dispose()"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_0a008400","line":38,"range":{"start_line":38,"start_character":17,"end_line":38,"end_character":23},"in_reply_to":"9a68dd71_6c304a9f","updated":"2016-01-21 17:50:01.000000000","message":"Added code block suggested by Henry.","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"}],"neutron/tests/functional/db/test_migrations.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"ef7de207e3951d71108e77dcce53496756833148","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                   and table !\u003d \u0027alembic_version\u0027]"},{"line_number":285,"context_line":"            self.assertEqual(0, len(res), \"%s non InnoDB tables created\" % res)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _test_has_offline_migrations(self, revision, expected):"},{"line_number":288,"context_line":"        engine \u003d self.get_engine()"},{"line_number":289,"context_line":"        cfg.CONF.set_override(\u0027connection\u0027, engine.url, group\u003d\u0027database\u0027)"},{"line_number":290,"context_line":"        migration.do_alembic_command(self.alembic_config, \u0027upgrade\u0027, revision)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_a0b86ee6","line":287,"updated":"2016-01-20 06:11:11.000000000","message":"Why we need to have functional test on this? I think this is more just unit test.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"8c4801d80f14e1dacbecd38cea0e618b76618d2b","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                   and table !\u003d \u0027alembic_version\u0027]"},{"line_number":285,"context_line":"            self.assertEqual(0, len(res), \"%s non InnoDB tables created\" % res)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _test_has_offline_migrations(self, revision, expected):"},{"line_number":288,"context_line":"        engine \u003d self.get_engine()"},{"line_number":289,"context_line":"        cfg.CONF.set_override(\u0027connection\u0027, engine.url, group\u003d\u0027database\u0027)"},{"line_number":290,"context_line":"        migration.do_alembic_command(self.alembic_config, \u0027upgrade\u0027, revision)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_d6821852","line":287,"in_reply_to":"9a68dd71_9297e28f","updated":"2016-01-21 17:39:43.000000000","message":"@Ann: Not a bother. At least we worked it out that unit tests are not a runner.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"75ff584c114264b36bb816ecd7c223b8fa66746b","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                   and table !\u003d \u0027alembic_version\u0027]"},{"line_number":285,"context_line":"            self.assertEqual(0, len(res), \"%s non InnoDB tables created\" % res)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _test_has_offline_migrations(self, revision, expected):"},{"line_number":288,"context_line":"        engine \u003d self.get_engine()"},{"line_number":289,"context_line":"        cfg.CONF.set_override(\u0027connection\u0027, engine.url, group\u003d\u0027database\u0027)"},{"line_number":290,"context_line":"        migration.do_alembic_command(self.alembic_config, \u0027upgrade\u0027, revision)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_9297e28f","line":287,"in_reply_to":"ba63e191_7dec548f","updated":"2016-01-21 11:29:01.000000000","message":"Sorry I mess up with this test, this should be a functional test, just not part of TestModelsMigrations.","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"f158f075d8c084a8a1ff03b946c49f6ab08b43e1","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                   and table !\u003d \u0027alembic_version\u0027]"},{"line_number":285,"context_line":"            self.assertEqual(0, len(res), \"%s non InnoDB tables created\" % res)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _test_has_offline_migrations(self, revision, expected):"},{"line_number":288,"context_line":"        engine \u003d self.get_engine()"},{"line_number":289,"context_line":"        cfg.CONF.set_override(\u0027connection\u0027, engine.url, group\u003d\u0027database\u0027)"},{"line_number":290,"context_line":"        migration.do_alembic_command(self.alembic_config, \u0027upgrade\u0027, revision)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_7dec548f","line":287,"in_reply_to":"ba63e191_a0b86ee6","updated":"2016-01-20 11:25:03.000000000","message":"Not sure, as I did not add it. @Ihar: could you possibly shed some light why functional tests?","commit_id":"91ba2e4bb3f0546e576342c28da3b57577f70cb2"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a5e7c8e475f3cdad5c1a0a118166455d3fb38b72","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                                                          \u0027unused\u0027))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def test_has_offline_migrations_pending_contract_scripts(self):"},{"line_number":296,"context_line":"        self._test_has_offline_migrations(\u0027kilo\u0027, True)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def test_has_offline_migrations_all_heads_upgraded(self):"},{"line_number":299,"context_line":"        self._test_has_offline_migrations(\u0027heads\u0027, False)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_ef6530e1","line":296,"updated":"2016-01-20 23:50:47.000000000","message":"Is it bulletproof to use kilo and heads?","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":9551,"name":"Martin Hickey","email":"martin.hickey@ie.ibm.com","username":"mhickey"},"change_message_id":"efe610627de82344462cdb1c71c3c5b2e85d92d9","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                                                          \u0027unused\u0027))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def test_has_offline_migrations_pending_contract_scripts(self):"},{"line_number":296,"context_line":"        self._test_has_offline_migrations(\u0027kilo\u0027, True)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def test_has_offline_migrations_all_heads_upgraded(self):"},{"line_number":299,"context_line":"        self._test_has_offline_migrations(\u0027heads\u0027, False)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_4a351cd8","line":296,"in_reply_to":"9a68dd71_115be72f","updated":"2016-01-21 17:50:01.000000000","message":"Ok, left as is for now.","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"7f882467ac29dd7e50480eb5c3ea7d70a6ff64f4","unresolved":false,"context_lines":[{"line_number":293,"context_line":"                                                          \u0027unused\u0027))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def test_has_offline_migrations_pending_contract_scripts(self):"},{"line_number":296,"context_line":"        self._test_has_offline_migrations(\u0027kilo\u0027, True)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def test_has_offline_migrations_all_heads_upgraded(self):"},{"line_number":299,"context_line":"        self._test_has_offline_migrations(\u0027heads\u0027, False)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_115be72f","line":296,"in_reply_to":"9a68dd71_ef6530e1","updated":"2016-01-21 15:01:30.000000000","message":"It is OK for now until we roll up migrations again.","commit_id":"507efe7d28256ce0e8143b939a8f9746f2cde70d"}]}
