)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"90963c6a5fe47efd89110828e7f5f9e1e3baaea7","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                                                 *args, **kwargs)"},{"line_number":123,"context_line":"                migration \u003d keyed_args[\u0027migration\u0027]"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"                # NOTE(rajesht): If InstanceNotFound error is thrown from"},{"line_number":126,"context_line":"                # decorated function, migration status should be set to"},{"line_number":127,"context_line":"                # \u0027error\u0027, without checking current migration status."},{"line_number":128,"context_line":"                if not isinstance(ex, exception.InstanceNotFound):"},{"line_number":129,"context_line":"                    status \u003d migration.status"},{"line_number":130,"context_line":"                    if status not in [\u0027migrating\u0027, \u0027post-migrating\u0027]:"},{"line_number":131,"context_line":"                        return"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"                migration.status \u003d \u0027error\u0027"},{"line_number":134,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_9bf1c8d0","side":"PARENT","line":131,"range":{"start_line":125,"start_character":0,"end_line":131,"end_character":30},"updated":"2017-07-03 16:33:42.000000000","message":"This seems to be the only thing that\u0027s changed, other than the scope. Couldn\u0027t we have just removed this check?","commit_id":"4c6831d1b15d44d3edaa6e0ce4777f04a8e4e6ef"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"7be8fce0ec61f471cb4375c2fd3fc53317550f71","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                                                 *args, **kwargs)"},{"line_number":123,"context_line":"                migration \u003d keyed_args[\u0027migration\u0027]"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"                # NOTE(rajesht): If InstanceNotFound error is thrown from"},{"line_number":126,"context_line":"                # decorated function, migration status should be set to"},{"line_number":127,"context_line":"                # \u0027error\u0027, without checking current migration status."},{"line_number":128,"context_line":"                if not isinstance(ex, exception.InstanceNotFound):"},{"line_number":129,"context_line":"                    status \u003d migration.status"},{"line_number":130,"context_line":"                    if status not in [\u0027migrating\u0027, \u0027post-migrating\u0027]:"},{"line_number":131,"context_line":"                        return"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"                migration.status \u003d \u0027error\u0027"},{"line_number":134,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_9b50a85f","side":"PARENT","line":131,"range":{"start_line":125,"start_character":0,"end_line":131,"end_character":30},"in_reply_to":"3f1d235d_9bf1c8d0","updated":"2017-07-03 16:43:29.000000000","message":"No, because the purpose of this seems to have been to limit the scope of the decorator. I\u0027m guessing because it\u0027s undocumented, but it does have that effect. Instead we do this explicitly.","commit_id":"4c6831d1b15d44d3edaa6e0ce4777f04a8e4e6ef"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bcdbbf70254782f48ef5e259cdba8841d2da8be","unresolved":false,"context_lines":[{"line_number":3694,"context_line":""},{"line_number":3695,"context_line":"        \"\"\""},{"line_number":3696,"context_line":""},{"line_number":3697,"context_line":"        quotas \u003d objects.Quotas.from_reservations(context, reservations,"},{"line_number":3698,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3699,"context_line":""},{"line_number":3700,"context_line":"        with errors_out_migration_ctxt(migration), \\"},{"line_number":3701,"context_line":"             self._error_out_instance_on_exception(context, instance,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_c0ccef6b","line":3698,"range":{"start_line":3697,"start_character":0,"end_line":3698,"end_character":68},"updated":"2017-07-03 16:31:22.000000000","message":"unrelated","commit_id":"5538c0f1ebeec2a52acbfbaf5ac25705edb6229d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9bcdbbf70254782f48ef5e259cdba8841d2da8be","unresolved":false,"context_lines":[{"line_number":3697,"context_line":"        quotas \u003d objects.Quotas.from_reservations(context, reservations,"},{"line_number":3698,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3699,"context_line":""},{"line_number":3700,"context_line":"        with errors_out_migration_ctxt(migration), \\"},{"line_number":3701,"context_line":"             self._error_out_instance_on_exception(context, instance,"},{"line_number":3702,"context_line":"                                                   quotas\u003dquotas):"},{"line_number":3703,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_3b0994dc","line":3700,"range":{"start_line":3700,"start_character":8,"end_line":3700,"end_character":52},"updated":"2017-07-03 16:31:22.000000000","message":"Why do we need to change the scope of this? There doesn\u0027t seem to be any changes to migration before this, and pretty much the entire function is contained within the contextmanager. What exactly is interfering?","commit_id":"5538c0f1ebeec2a52acbfbaf5ac25705edb6229d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5e5c56482e4adce5db61936efc8eabfb0a5f6065","unresolved":false,"context_lines":[{"line_number":3973,"context_line":"            instance.task_state \u003d task_states.RESIZE_MIGRATED"},{"line_number":3974,"context_line":"            instance.save(expected_task_state\u003dtask_states.RESIZE_MIGRATING)"},{"line_number":3975,"context_line":""},{"line_number":3976,"context_line":"            self.compute_rpcapi.finish_resize(context, instance,"},{"line_number":3977,"context_line":"                    migration, image, disk_info,"},{"line_number":3978,"context_line":"                    migration.dest_compute, reservations\u003dquotas.reservations)"},{"line_number":3979,"context_line":""},{"line_number":3980,"context_line":"        self._notify_about_instance_usage(context, instance, \"resize.end\","},{"line_number":3981,"context_line":"                                          network_info\u003dnetwork_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_fb867cdb","line":3978,"range":{"start_line":3976,"start_character":0,"end_line":3978,"end_character":77},"updated":"2017-07-03 16:42:48.000000000","message":"So this is the thing that\u0027s causing issues. Per discussion on IRC, this does a cast and allowing the context to continue after this cast is a race. We harness this in the next change","commit_id":"5538c0f1ebeec2a52acbfbaf5ac25705edb6229d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0b3bed4c0e28762f4a34e07b7155414eeae082a8","unresolved":false,"context_lines":[{"line_number":3916,"context_line":"                                                  reservations,"},{"line_number":3917,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3918,"context_line":""},{"line_number":3919,"context_line":"        with errors_out_migration_ctxt(migration), \\"},{"line_number":3920,"context_line":"             self._error_out_instance_on_exception(context, instance,"},{"line_number":3921,"context_line":"                                                   quotas\u003dquotas):"},{"line_number":3922,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_b64222aa","line":3919,"range":{"start_line":3919,"start_character":49,"end_line":3919,"end_character":52},"updated":"2017-07-17 23:07:06.000000000","message":"FWIW, I hate this syntax. We avoid \\ for line continuations in most of the rest of nova, and I think I see only two lines in the tests where we use this currently.\n\nI appreciate the saving of an indent level, and that the with statement can\u0027t span a line with a paren like most other statements.","commit_id":"2f42b2d2821b8a57b2604c6b984ecddf2cf11a23"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0743688360703ef94c38f8915a685444686e1a7f","unresolved":false,"context_lines":[{"line_number":3916,"context_line":"                                                  reservations,"},{"line_number":3917,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3918,"context_line":""},{"line_number":3919,"context_line":"        with errors_out_migration_ctxt(migration), \\"},{"line_number":3920,"context_line":"             self._error_out_instance_on_exception(context, instance,"},{"line_number":3921,"context_line":"                                                   quotas\u003dquotas):"},{"line_number":3922,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_e543d8ae","line":3919,"range":{"start_line":3919,"start_character":49,"end_line":3919,"end_character":52},"in_reply_to":"1f1a1f67_7c09a893","updated":"2017-07-20 13:13:35.000000000","message":"So put the meat in a helper function and use the decorator?","commit_id":"2f42b2d2821b8a57b2604c6b984ecddf2cf11a23"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"c90397c08eefa494481e8ffe7f531e5947703418","unresolved":false,"context_lines":[{"line_number":3916,"context_line":"                                                  reservations,"},{"line_number":3917,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3918,"context_line":""},{"line_number":3919,"context_line":"        with errors_out_migration_ctxt(migration), \\"},{"line_number":3920,"context_line":"             self._error_out_instance_on_exception(context, instance,"},{"line_number":3921,"context_line":"                                                   quotas\u003dquotas):"},{"line_number":3922,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_7c09a893","line":3919,"range":{"start_line":3919,"start_character":49,"end_line":3919,"end_character":52},"in_reply_to":"1f1a1f67_b64222aa","updated":"2017-07-20 10:02:34.000000000","message":"Seems we\u0027re not allowed to use contextlib.nested any more:\n\npep8 runtests: commands[0] | bash tools/flake8wrap.sh -HEAD\nRunning flake8 on nova/compute/manager.py \n./nova/compute/manager.py:3823:9: N341  contextlib.nested is deprecated. With Python 2.7 and later the with-statement supports multiple nested objects. See https://docs.python.org/2/library/contextlib.html#contextlib.nested for more information. nova.test.nested() is an alternative as well.\n\nOh, wait... are you suggesting nesting the contexts separately? Eww... I agree this syntax is horrible, but ewww... We should write a strongly worded letter to Guido ;)","commit_id":"2f42b2d2821b8a57b2604c6b984ecddf2cf11a23"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0b3bed4c0e28762f4a34e07b7155414eeae082a8","unresolved":false,"context_lines":[{"line_number":3919,"context_line":"        with errors_out_migration_ctxt(migration), \\"},{"line_number":3920,"context_line":"             self._error_out_instance_on_exception(context, instance,"},{"line_number":3921,"context_line":"                                                   quotas\u003dquotas):"},{"line_number":3922,"context_line":""},{"line_number":3923,"context_line":"            # TODO(chaochin) Remove this until v5 RPC API"},{"line_number":3924,"context_line":"            # Code downstream may expect extra_specs to be populated since it"},{"line_number":3925,"context_line":"            # is receiving an object, so lookup the flavor to ensure this."}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_e16a167f","line":3922,"updated":"2017-07-17 23:07:06.000000000","message":"Unrelated whitespace damage.","commit_id":"2f42b2d2821b8a57b2604c6b984ecddf2cf11a23"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"c90397c08eefa494481e8ffe7f531e5947703418","unresolved":false,"context_lines":[{"line_number":3919,"context_line":"        with errors_out_migration_ctxt(migration), \\"},{"line_number":3920,"context_line":"             self._error_out_instance_on_exception(context, instance,"},{"line_number":3921,"context_line":"                                                   quotas\u003dquotas):"},{"line_number":3922,"context_line":""},{"line_number":3923,"context_line":"            # TODO(chaochin) Remove this until v5 RPC API"},{"line_number":3924,"context_line":"            # Code downstream may expect extra_specs to be populated since it"},{"line_number":3925,"context_line":"            # is receiving an object, so lookup the flavor to ensure this."}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_7fc19ae4","line":3922,"in_reply_to":"1f1a1f67_e16a167f","updated":"2017-07-20 10:02:34.000000000","message":"Done","commit_id":"2f42b2d2821b8a57b2604c6b984ecddf2cf11a23"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0b3bed4c0e28762f4a34e07b7155414eeae082a8","unresolved":false,"context_lines":[{"line_number":4096,"context_line":"        new host machine."},{"line_number":4097,"context_line":""},{"line_number":4098,"context_line":"        \"\"\""},{"line_number":4099,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(image)"},{"line_number":4100,"context_line":"        quotas \u003d objects.Quotas.from_reservations(context,"},{"line_number":4101,"context_line":"                                                  reservations,"},{"line_number":4102,"context_line":"                                                  instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_e18e9677","line":4099,"updated":"2017-07-17 23:07:06.000000000","message":"This can fail pretty hard. Moving it outside the try block below means we will no longer error out the migration right?","commit_id":"2f42b2d2821b8a57b2604c6b984ecddf2cf11a23"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"c90397c08eefa494481e8ffe7f531e5947703418","unresolved":false,"context_lines":[{"line_number":4096,"context_line":"        new host machine."},{"line_number":4097,"context_line":""},{"line_number":4098,"context_line":"        \"\"\""},{"line_number":4099,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(image)"},{"line_number":4100,"context_line":"        quotas \u003d objects.Quotas.from_reservations(context,"},{"line_number":4101,"context_line":"                                                  reservations,"},{"line_number":4102,"context_line":"                                                  instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_3fed628b","line":4099,"in_reply_to":"1f1a1f67_e18e9677","updated":"2017-07-20 10:02:34.000000000","message":"I hadn\u0027t appreciated that, thought it was just bit-shuffling. On second thoughts, it should still have been within the context manager.","commit_id":"2f42b2d2821b8a57b2604c6b984ecddf2cf11a23"}]}
