)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fd3360b9ebd24bf2be5dc1c1b0c676cff69bf850","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds the capture process for exception.InvalidArchitectureName"},{"line_number":10,"context_line":" and returns HTTPBadRequest."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I25eff0271c856a8d3e83867b448e1dec6f6732ab"},{"line_number":13,"context_line":"Closes-Bug: #1861749"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1fa4df85_dced76f0","line":11,"updated":"2020-03-06 01:45:47.000000000","message":"It would be nice to have more details in the commit message to explain what is happening in the patch. This makes code review easier.\n\nFor example, it could say something like:\n\nCurrently, when attempting to rebuild an instance with an image with invalid architecture, the API raises a 500 error and leaves the instance stuck in the REBUILDING task state.\n\nThis adds an early arch validation check during the rebuild to fail fast before modifying instance state and raise a 400 bad request from the API.","commit_id":"d0be02388bbdc08905fd5d7b018bf474767c8ffd"}],"nova/compute/api.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"ac011b1285e08e53e267389875abd50ec7f90f15","unresolved":false,"context_lines":[{"line_number":3411,"context_line":"        image_id, image \u003d self._get_image(context, image_href)"},{"line_number":3412,"context_line":"        self._check_auto_disk_config(image\u003dimage,"},{"line_number":3413,"context_line":"                                     auto_disk_config\u003dauto_disk_config)"},{"line_number":3414,"context_line":"        self._check_image_arch(image\u003dimage)"},{"line_number":3415,"context_line":""},{"line_number":3416,"context_line":"        flavor \u003d instance.get_flavor()"},{"line_number":3417,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_95e919b8","line":3414,"updated":"2020-03-05 23:59:47.000000000","message":"Sorry, why is this change added? It was not added in PS1 and according to the bug report, this should not be needed to reproduce the bug.\n\nThe bug fix should be about handling the existing error correctly, and not introduce a new check in the code, right?\n\nIf there is something else missing in the image arch handling, I\u0027d think that\u0027s a separate bug and a separate patch, no?","commit_id":"d0be02388bbdc08905fd5d7b018bf474767c8ffd"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fd3360b9ebd24bf2be5dc1c1b0c676cff69bf850","unresolved":false,"context_lines":[{"line_number":3411,"context_line":"        image_id, image \u003d self._get_image(context, image_href)"},{"line_number":3412,"context_line":"        self._check_auto_disk_config(image\u003dimage,"},{"line_number":3413,"context_line":"                                     auto_disk_config\u003dauto_disk_config)"},{"line_number":3414,"context_line":"        self._check_image_arch(image\u003dimage)"},{"line_number":3415,"context_line":""},{"line_number":3416,"context_line":"        flavor \u003d instance.get_flavor()"},{"line_number":3417,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_5c0c26eb","line":3414,"in_reply_to":"1fa4df85_014acbaa","updated":"2020-03-06 01:45:47.000000000","message":"I am not sure I understand, so I will try to repeat what I think you are saying.\n\nAre you saying that this new change is required to avoid getting the instance stuck with a REBUILDING task_state when the invalid architecture is encountered?\n\n(later) OK, I looked through the code more and I think I understand now. This is adding some earlier validation to avoid doing a bunch of unnecessary work and state changes that will all be for nothing if the arch ends up invalid at L3543.\n\nThis makes sense.","commit_id":"d0be02388bbdc08905fd5d7b018bf474767c8ffd"},{"author":{"_account_id":23950,"name":"Eric Xie","email":"eric_xiett@163.com","username":"ericxie"},"change_message_id":"599ec4d4277b6d85329cd9a9690d36ec90f252f0","unresolved":false,"context_lines":[{"line_number":3411,"context_line":"        image_id, image \u003d self._get_image(context, image_href)"},{"line_number":3412,"context_line":"        self._check_auto_disk_config(image\u003dimage,"},{"line_number":3413,"context_line":"                                     auto_disk_config\u003dauto_disk_config)"},{"line_number":3414,"context_line":"        self._check_image_arch(image\u003dimage)"},{"line_number":3415,"context_line":""},{"line_number":3416,"context_line":"        flavor \u003d instance.get_flavor()"},{"line_number":3417,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_014acbaa","line":3414,"in_reply_to":"1fa4df85_95e919b8","updated":"2020-03-06 00:48:00.000000000","message":"I added this change before updating instance\u0027s task_state, and  will avoid changing the state in api/openstack/compute/servers.py.","commit_id":"d0be02388bbdc08905fd5d7b018bf474767c8ffd"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fd3360b9ebd24bf2be5dc1c1b0c676cff69bf850","unresolved":false,"context_lines":[{"line_number":3509,"context_line":"                image, auto_disk_config)"},{"line_number":3510,"context_line":"        instance.update(options_from_image)"},{"line_number":3511,"context_line":""},{"line_number":3512,"context_line":"        instance.task_state \u003d task_states.REBUILDING"},{"line_number":3513,"context_line":"        # An empty instance.image_ref is currently used as an indication"},{"line_number":3514,"context_line":"        # of BFV.  Preserve that over a rebuild to not break users."},{"line_number":3515,"context_line":"        if not is_volume_backed:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_1c230e58","line":3512,"updated":"2020-03-06 01:45:47.000000000","message":"OK, here is where the REBUILDING state is set.","commit_id":"d0be02388bbdc08905fd5d7b018bf474767c8ffd"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"ac011b1285e08e53e267389875abd50ec7f90f15","unresolved":false,"context_lines":[{"line_number":3540,"context_line":"            # to contain the new image. We persist this since we\u0027ve already"},{"line_number":3541,"context_line":"            # changed the instance.image_ref above so we\u0027re being"},{"line_number":3542,"context_line":"            # consistent."},{"line_number":3543,"context_line":"            request_spec.image \u003d objects.ImageMeta.from_dict(image)"},{"line_number":3544,"context_line":"            request_spec.save()"},{"line_number":3545,"context_line":"            if \u0027scheduler_hints\u0027 not in request_spec:"},{"line_number":3546,"context_line":"                request_spec.scheduler_hints \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_1571a90c","line":3543,"updated":"2020-03-05 23:59:47.000000000","message":"Here is where the error from the bug report is raised ^","commit_id":"d0be02388bbdc08905fd5d7b018bf474767c8ffd"},{"author":{"_account_id":23950,"name":"Eric Xie","email":"eric_xiett@163.com","username":"ericxie"},"change_message_id":"599ec4d4277b6d85329cd9a9690d36ec90f252f0","unresolved":false,"context_lines":[{"line_number":3540,"context_line":"            # to contain the new image. We persist this since we\u0027ve already"},{"line_number":3541,"context_line":"            # changed the instance.image_ref above so we\u0027re being"},{"line_number":3542,"context_line":"            # consistent."},{"line_number":3543,"context_line":"            request_spec.image \u003d objects.ImageMeta.from_dict(image)"},{"line_number":3544,"context_line":"            request_spec.save()"},{"line_number":3545,"context_line":"            if \u0027scheduler_hints\u0027 not in request_spec:"},{"line_number":3546,"context_line":"                request_spec.scheduler_hints \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_21b3479a","line":3543,"in_reply_to":"1fa4df85_1571a90c","updated":"2020-03-06 00:48:00.000000000","message":"Yes. It raises ValueError that can not get its true meaning from the name.","commit_id":"d0be02388bbdc08905fd5d7b018bf474767c8ffd"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fd3360b9ebd24bf2be5dc1c1b0c676cff69bf850","unresolved":false,"context_lines":[{"line_number":3540,"context_line":"            # to contain the new image. We persist this since we\u0027ve already"},{"line_number":3541,"context_line":"            # changed the instance.image_ref above so we\u0027re being"},{"line_number":3542,"context_line":"            # consistent."},{"line_number":3543,"context_line":"            request_spec.image \u003d objects.ImageMeta.from_dict(image)"},{"line_number":3544,"context_line":"            request_spec.save()"},{"line_number":3545,"context_line":"            if \u0027scheduler_hints\u0027 not in request_spec:"},{"line_number":3546,"context_line":"                request_spec.scheduler_hints \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_5c8186fa","line":3543,"in_reply_to":"1fa4df85_21b3479a","updated":"2020-03-06 01:45:47.000000000","message":"Ah, thanks. I see now:\n\nhttps://github.com/openstack/nova/blob/f176ffe6e57e21c4c5d9f33a3c9e47476d10acc9/nova/objects/fields.py#L226-L228","commit_id":"d0be02388bbdc08905fd5d7b018bf474767c8ffd"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f34b1648c0bba86555e4f30eba552b8c5c709246","unresolved":false,"context_lines":[{"line_number":3359,"context_line":"                                            block_device_info\u003dNone,"},{"line_number":3360,"context_line":"                                            reboot_type\u003d\u0027HARD\u0027)"},{"line_number":3361,"context_line":""},{"line_number":3362,"context_line":"    def _check_image_arch(self, image\u003dNone):"},{"line_number":3363,"context_line":"        if image:"},{"line_number":3364,"context_line":"            img_arch \u003d image.get(\"properties\", {}).get(\u0027hw_architecture\u0027)"},{"line_number":3365,"context_line":"            if img_arch:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_0a7d9fe6","line":3362,"range":{"start_line":3362,"start_character":0,"end_line":3362,"end_character":44},"updated":"2020-03-12 17:21:52.000000000","message":"A docstring stating that this can raise an exception would be helpful","commit_id":"8dada6d0f66f6c53a78725fb54f6a8e5d36fb127"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f34b1648c0bba86555e4f30eba552b8c5c709246","unresolved":false,"context_lines":[{"line_number":3359,"context_line":"                                            block_device_info\u003dNone,"},{"line_number":3360,"context_line":"                                            reboot_type\u003d\u0027HARD\u0027)"},{"line_number":3361,"context_line":""},{"line_number":3362,"context_line":"    def _check_image_arch(self, image\u003dNone):"},{"line_number":3363,"context_line":"        if image:"},{"line_number":3364,"context_line":"            img_arch \u003d image.get(\"properties\", {}).get(\u0027hw_architecture\u0027)"},{"line_number":3365,"context_line":"            if img_arch:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_ca11c7ae","line":3362,"range":{"start_line":3362,"start_character":37,"end_line":3362,"end_character":42},"updated":"2020-03-12 17:21:52.000000000","message":"This is always provided so the default\u0027s a bit meaningless","commit_id":"8dada6d0f66f6c53a78725fb54f6a8e5d36fb127"}],"nova/tests/unit/api/openstack/compute/test_server_actions.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"90aaa2c8d497583212233441b3c33f15cc94d143","unresolved":false,"context_lines":[{"line_number":670,"context_line":""},{"line_number":671,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest,"},{"line_number":672,"context_line":"                          self.controller._action_rebuild,"},{"line_number":673,"context_line":"                          self.req, FAKE_UUID, body\u003dbody)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"    def test_resize_server(self):"},{"line_number":676,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_d656c95c","line":673,"updated":"2020-03-05 00:09:57.000000000","message":"The bug describes the instance stuck in REBUILD before the bug fix. Can we also assert the status of the instance as ACTIVE in this test?","commit_id":"a10d2338711917e3874cf874112f5890b676f2bf"},{"author":{"_account_id":23950,"name":"Eric Xie","email":"eric_xiett@163.com","username":"ericxie"},"change_message_id":"1c7b4808a0f1dba58205f8359557aed73824f0c2","unresolved":false,"context_lines":[{"line_number":670,"context_line":""},{"line_number":671,"context_line":"        self.assertRaises(webob.exc.HTTPBadRequest,"},{"line_number":672,"context_line":"                          self.controller._action_rebuild,"},{"line_number":673,"context_line":"                          self.req, FAKE_UUID, body\u003dbody)"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"    def test_resize_server(self):"},{"line_number":676,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1fa4df85_ef56885c","line":673,"in_reply_to":"1fa4df85_d656c95c","updated":"2020-03-05 07:24:35.000000000","message":"@melanie, i add it at `nova.tests.unit.compute.test_compute_api.ComputeAPIUnitTestCase.test_rebuild_with_invalid_image_arch`\nDone","commit_id":"a10d2338711917e3874cf874112f5890b676f2bf"}]}
