)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"03c1a8af8bb144b0abb645370ea57f242b2ebec0","unresolved":false,"context_lines":[{"line_number":9,"context_line":"We currently execute the whole of resize_instance in the context of"},{"line_number":10,"context_line":"the errors_out_migration decorator, meaning that any error will result"},{"line_number":11,"context_line":"in the migration objection being set to error. However, we cast the"},{"line_number":12,"context_line":"migration process to the destination compute before sending local"},{"line_number":13,"context_line":"notification before sending instance notifications from the source"},{"line_number":14,"context_line":"host. This means that an error sending instance notifications on the"},{"line_number":15,"context_line":"source compute would set the error state of a migration which is"},{"line_number":16,"context_line":"currently executing on a different compute host. Setting error here"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7f287b81_2f58ac2e","line":13,"range":{"start_line":12,"start_character":45,"end_line":13,"end_character":50},"updated":"2017-08-31 14:16:08.000000000","message":"nit: I guess we only need one of the before statement","commit_id":"316c410a19bbb52ba2f88d23f21e5c754a500e44"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"185a118dd9cd73a103534faac487b411a3095d0b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"after the cast to the destination compute."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"In adding a test for the reduced scope, we also refactor"},{"line_number":23,"context_line":"test_resize_instance_failure to reuse its suite of resize_insetance"},{"line_number":24,"context_line":"mocks. We take the opportunity to remove unnecessary mocks and"},{"line_number":25,"context_line":"simplify others, and to remove assertions which don\u0027t relate to code"},{"line_number":26,"context_line":"correctness or what we\u0027re testing."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7f287b81_b5697f8c","line":23,"range":{"start_line":23,"start_character":58,"end_line":23,"end_character":67},"updated":"2017-08-22 13:26:24.000000000","message":"instance","commit_id":"316c410a19bbb52ba2f88d23f21e5c754a500e44"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"185a118dd9cd73a103534faac487b411a3095d0b","unresolved":false,"context_lines":[{"line_number":5445,"context_line":""},{"line_number":5446,"context_line":"    @contextlib.contextmanager"},{"line_number":5447,"context_line":"    def _mock_resize_instance(self):"},{"line_number":5448,"context_line":"        with test.nested("},{"line_number":5449,"context_line":"            mock.patch.object(self.compute.driver,"},{"line_number":5450,"context_line":"                              \u0027migrate_disk_and_power_off\u0027),"},{"line_number":5451,"context_line":"            mock.patch.object(db, \u0027instance_fault_create\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f287b81_f5cb876f","line":5448,"range":{"start_line":5448,"start_character":8,"end_line":5448,"end_character":25},"updated":"2017-08-22 13:26:24.000000000","message":"I was pretty sure we weren\u0027t supposed to use this any more? Can\u0027t the below be decorators?","commit_id":"316c410a19bbb52ba2f88d23f21e5c754a500e44"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"787193e0d94d8e163a89903500e9810ee4d76051","unresolved":false,"context_lines":[{"line_number":5445,"context_line":""},{"line_number":5446,"context_line":"    @contextlib.contextmanager"},{"line_number":5447,"context_line":"    def _mock_resize_instance(self):"},{"line_number":5448,"context_line":"        with test.nested("},{"line_number":5449,"context_line":"            mock.patch.object(self.compute.driver,"},{"line_number":5450,"context_line":"                              \u0027migrate_disk_and_power_off\u0027),"},{"line_number":5451,"context_line":"            mock.patch.object(db, \u0027instance_fault_create\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f287b81_f8c7fe44","line":5448,"range":{"start_line":5448,"start_character":8,"end_line":5448,"end_character":25},"in_reply_to":"7f287b81_f5cb876f","updated":"2017-08-22 14:13:16.000000000","message":"I leave mechanical things like that to pep8. I wasn\u0027t changing it, so didn\u0027t want to over-think it. I already get myself in enough trouble trying to fix all the things.\n\nI think a context manager is the most ergonomic way to create a re-usable set of mocks. I don\u0027t think you can put these as decorators on a re-usable decorator, as the execution context would be wrong. I think you\u0027d still end up wanting a context manager.\n\nIn another patch in this series I\u0027ve used the native python multiple context manager \u0027with\u0027 syntax, and I\u0027ve been called on that, too, for aesthetic reasons.\n\nWhich is to say that this code is fine, imho, and not worth the time spent searching for complex technical solutions to trivial aesthetic problems.\n\nOr I could cut and paste the whole messy block.","commit_id":"316c410a19bbb52ba2f88d23f21e5c754a500e44"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"177193d9ae5d036dd2a435edeb9ed623e197502f","unresolved":false,"context_lines":[{"line_number":5445,"context_line":""},{"line_number":5446,"context_line":"    @contextlib.contextmanager"},{"line_number":5447,"context_line":"    def _mock_resize_instance(self):"},{"line_number":5448,"context_line":"        with test.nested("},{"line_number":5449,"context_line":"            mock.patch.object(self.compute.driver,"},{"line_number":5450,"context_line":"                              \u0027migrate_disk_and_power_off\u0027),"},{"line_number":5451,"context_line":"            mock.patch.object(db, \u0027instance_fault_create\u0027),"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f287b81_2c24efc5","line":5448,"range":{"start_line":5448,"start_character":8,"end_line":5448,"end_character":25},"in_reply_to":"7f287b81_f8c7fe44","updated":"2017-09-04 15:04:15.000000000","message":"Getting rid of \"self\" here would take ages. Cutting and pasting this all seems terrible too. Seems like the right call. Had not thought to do this before actually, seems better than many of the other options.","commit_id":"316c410a19bbb52ba2f88d23f21e5c754a500e44"}]}
