)]}'
{"nova/compute/api.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"4d68024c8785427fd4f1e84434d76f8de39ffa2c","unresolved":true,"context_lines":[{"line_number":2243,"context_line":"                    # The instance was deleted or is already gone."},{"line_number":2244,"context_line":"                    self._local_delete_cleanup(context, instance)"},{"line_number":2245,"context_line":"                    return"},{"line_number":2246,"context_line":"                if not instance:"},{"line_number":2247,"context_line":"                    # Instance is already deleted."},{"line_number":2248,"context_line":"                    self._local_delete_cleanup(context, stale_instance)"},{"line_number":2249,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":2,"id":"12112489_6ea50d78","line":2246,"updated":"2021-02-18 15:56:44.000000000","message":"I think I approved this. What was I smoking... 🤦","commit_id":"bc1f8688bd0c1b81c966bf90cc85082cd6199390"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"4d68024c8785427fd4f1e84434d76f8de39ffa2c","unresolved":true,"context_lines":[{"line_number":2245,"context_line":"                    return"},{"line_number":2246,"context_line":"                if not instance:"},{"line_number":2247,"context_line":"                    # Instance is already deleted."},{"line_number":2248,"context_line":"                    self._local_delete_cleanup(context, stale_instance)"},{"line_number":2249,"context_line":"                    return"},{"line_number":2250,"context_line":"            except exception.ObjectActionError:"},{"line_number":2251,"context_line":"                # NOTE(melwitt): This means the instance.host changed"}],"source_content_type":"text/x-python","patch_set":2,"id":"61c2f722_ff9383c1","line":2248,"updated":"2021-02-18 15:56:44.000000000","message":"So we don\u0027t actually want/need the whole instance object here. We simply need the UUID. \u0027_local_delete_cleanup\u0027 is only calling placement with the UUID and it calls \u0027_update_queued_for_deletion\u0027 which gets an \u0027InstanceMapping\u0027 by instance UUID (\u0027InstanceMapping.get_by_instance_uuid\u0027). The logging handler can also handle being called with \u0027instance_uuid\u0027 instead of \u0027instance\u0027 (can\u0027t find the code for that rn but it\u0027s around somewhere and there are existing examples in e.g. \u0027nova/scheduler/utils.py\u0027).\n\nCould we just store the UUID instead? I\u0027d be okay with doing this in a follow-up to ease backporting but it seems...less hacky (?) than saving a dirty copy of an object when the underlying DB record has been deleted","commit_id":"bc1f8688bd0c1b81c966bf90cc85082cd6199390"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9e806010f6460488d254a80099b320aec5b159fd","unresolved":true,"context_lines":[{"line_number":2245,"context_line":"                    return"},{"line_number":2246,"context_line":"                if not instance:"},{"line_number":2247,"context_line":"                    # Instance is already deleted."},{"line_number":2248,"context_line":"                    self._local_delete_cleanup(context, stale_instance)"},{"line_number":2249,"context_line":"                    return"},{"line_number":2250,"context_line":"            except exception.ObjectActionError:"},{"line_number":2251,"context_line":"                # NOTE(melwitt): This means the instance.host changed"}],"source_content_type":"text/x-python","patch_set":2,"id":"2611c4e8_4fbf7b49","line":2248,"in_reply_to":"61c2f722_ff9383c1","updated":"2021-02-18 16:41:53.000000000","message":"I superficially considered that but wasn\u0027t sure about the logging handler thing and I also thought to myself, \"what if someone wanted to expand _local_delete_cleanup in the future?\" and didn\u0027t look deeper into it, but maybe I was overthinking it. Let me take a look at it again because I agree it would feel less odd and more targeted to pass only instance_uuid.","commit_id":"bc1f8688bd0c1b81c966bf90cc85082cd6199390"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c33d29b6a597bf98efd2b2301fc9694d31065ef5","unresolved":true,"context_lines":[{"line_number":2173,"context_line":"                context, instance_uuid)"},{"line_number":2174,"context_line":"        except exception.AllocationDeleteFailed:"},{"line_number":2175,"context_line":"            LOG.info(\"Allocation delete failed during local delete cleanup.\","},{"line_number":2176,"context_line":"                     instance_uuid\u003dinstance_uuid)"},{"line_number":2177,"context_line":""},{"line_number":2178,"context_line":"        try:"},{"line_number":2179,"context_line":"            self._update_queued_for_deletion(context, instance_uuid, True)"}],"source_content_type":"text/x-python","patch_set":3,"id":"29713805_98480441","line":2176,"updated":"2021-02-19 07:22:12.000000000","message":"Note to reviewers: here is where instance_uuid is handled for the \u0027[instance: \u003cuuid\u003e]\u0027 log formatting:\n\nhttps://github.com/openstack/oslo.log/blob/3.36.0/oslo_log/formatters.py#L409","commit_id":"123f6262f63477d3f50dfad09688978e044bd9e0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8c40a108d25313f430232c95aff5e58863cd4d04","unresolved":false,"context_lines":[{"line_number":2173,"context_line":"                context, instance_uuid)"},{"line_number":2174,"context_line":"        except exception.AllocationDeleteFailed:"},{"line_number":2175,"context_line":"            LOG.info(\"Allocation delete failed during local delete cleanup.\","},{"line_number":2176,"context_line":"                     instance_uuid\u003dinstance_uuid)"},{"line_number":2177,"context_line":""},{"line_number":2178,"context_line":"        try:"},{"line_number":2179,"context_line":"            self._update_queued_for_deletion(context, instance_uuid, True)"}],"source_content_type":"text/x-python","patch_set":3,"id":"2aaaf988_583139c1","line":2176,"in_reply_to":"29713805_98480441","updated":"2021-02-19 11:05:01.000000000","message":"Ack","commit_id":"123f6262f63477d3f50dfad09688978e044bd9e0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d5e574e141c142b81592b6b4ad4eb02369f535d6","unresolved":true,"context_lines":[{"line_number":2255,"context_line":"                # NOTE(danms): If instance.host is set, we should be able to"},{"line_number":2256,"context_line":"                # do the following lookup. If not, there\u0027s not much we can"},{"line_number":2257,"context_line":"                # do to recover."},{"line_number":2258,"context_line":"                cell, instance \u003d self._lookup_instance(context, instance.uuid)"},{"line_number":2259,"context_line":"                if not instance:"},{"line_number":2260,"context_line":"                    # Instance is already deleted"},{"line_number":2261,"context_line":"                    self._local_delete_cleanup(context, instance_uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"12246f0d_2439308f","line":2258,"updated":"2021-02-23 11:29:47.000000000","message":"an simpler alternative would be to store the instance as old_instance before we try to look it up again. If the look up produces None then we can use the old instance in _local_delete_cleanup()\n\n                old_instance \u003d instance\n                cell, instance \u003d self._lookup_instance(context, instance.uuid)\n                if not instance:\n                    # Instance is already deleted\n                    self._local_delete_cleanup(context, old_instance)","commit_id":"123f6262f63477d3f50dfad09688978e044bd9e0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e283ff9693489e5fa151f3ffa4dc73b4afd47347","unresolved":false,"context_lines":[{"line_number":2255,"context_line":"                # NOTE(danms): If instance.host is set, we should be able to"},{"line_number":2256,"context_line":"                # do the following lookup. If not, there\u0027s not much we can"},{"line_number":2257,"context_line":"                # do to recover."},{"line_number":2258,"context_line":"                cell, instance \u003d self._lookup_instance(context, instance.uuid)"},{"line_number":2259,"context_line":"                if not instance:"},{"line_number":2260,"context_line":"                    # Instance is already deleted"},{"line_number":2261,"context_line":"                    self._local_delete_cleanup(context, instance_uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ef829d8_d70dba56","line":2258,"in_reply_to":"12246f0d_2439308f","updated":"2021-02-23 11:51:17.000000000","message":"https://review.opendev.org/c/openstack/nova/+/775308/2/nova/compute/api.py#2248 😉","commit_id":"123f6262f63477d3f50dfad09688978e044bd9e0"}],"nova/tests/functional/regressions/test_bug_1914777.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"833ab39b1b0c2fb6145ea565ced1526f948a5b7d","unresolved":true,"context_lines":[{"line_number":76,"context_line":"            # \"delete while booting\" in compute/api fails after a different"},{"line_number":77,"context_line":"            # request has deleted it."},{"line_number":78,"context_line":"            br_not_found \u003d exception.BuildRequestNotFound(uuid\u003dserver[\u0027id\u0027])"},{"line_number":79,"context_line":"            mock_get_br.side_effect \u003d [br, br_not_found, br_not_found]"},{"line_number":80,"context_line":"            self._delete_server(server)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def test_deleting_instance_at_the_same_time(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"0dcd7595_185d71a1","line":79,"updated":"2021-02-12 02:39:07.000000000","message":"Note to reviewers: the reason this and subsequent mocks need an extra return value is because the self._delete_server method includes a server \u0027show\u0027 at the end of it to verify a 404 that the instance is gone after deletion. With the bug fixed, the \u0027show\u0027 step of self._delete_server is reached.","commit_id":"3ac2453964ce0722e289ceb539d0c6713c076e99"}]}
