)]}'
{"nova/objects/instance.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b8316fd201b817b21ff08a44f2302778786d2fbd","unresolved":false,"context_lines":[{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    @base.remotable"},{"line_number":722,"context_line":"    def save(self, expected_vm_state\u003dNone,"},{"line_number":723,"context_line":"             expected_task_state\u003dNone, admin_state_reset\u003dFalse):"},{"line_number":724,"context_line":"        \"\"\"Save updates to this instance"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        Column-wise updates will be made based on the result of"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_3c18d21b","side":"PARENT","line":723,"range":{"start_line":723,"start_character":39,"end_line":723,"end_character":62},"updated":"2019-04-12 23:12:34.000000000","message":"TODO(stephenfin): remove admin_state_reset in version X.Y","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"82f1d2fcbd3f63b9409efe4ced5a91f47f612cef","unresolved":false,"context_lines":[{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    @base.remotable"},{"line_number":722,"context_line":"    def save(self, expected_vm_state\u003dNone,"},{"line_number":723,"context_line":"             expected_task_state\u003dNone, admin_state_reset\u003dFalse):"},{"line_number":724,"context_line":"        \"\"\"Save updates to this instance"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"        Column-wise updates will be made based on the result of"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_53ab3688","side":"PARENT","line":723,"range":{"start_line":723,"start_character":39,"end_line":723,"end_character":62},"in_reply_to":"3fce034c_3c18d21b","updated":"2019-04-15 13:04:46.000000000","message":"Done in a follow-up:\n\n  https://review.openstack.org/652649","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b8316fd201b817b21ff08a44f2302778786d2fbd","unresolved":false,"context_lines":[{"line_number":737,"context_line":"        \"\"\""},{"line_number":738,"context_line":"        # Store this on the class because _cell_name_blocks_sync is useless"},{"line_number":739,"context_line":"        # after the db update call below."},{"line_number":740,"context_line":"        self._sync_cells \u003d not self._cell_name_blocks_sync()"},{"line_number":741,"context_line":""},{"line_number":742,"context_line":"        context \u003d self._context"},{"line_number":743,"context_line":"        cell_type \u003d cells_opts.get_cell_type()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_5cd03ef8","side":"PARENT","line":740,"range":{"start_line":740,"start_character":8,"end_line":740,"end_character":60},"updated":"2019-04-12 23:12:34.000000000","message":"Hm, why is it okay to remove this?\n\nSee ** below","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"82f1d2fcbd3f63b9409efe4ced5a91f47f612cef","unresolved":false,"context_lines":[{"line_number":737,"context_line":"        \"\"\""},{"line_number":738,"context_line":"        # Store this on the class because _cell_name_blocks_sync is useless"},{"line_number":739,"context_line":"        # after the db update call below."},{"line_number":740,"context_line":"        self._sync_cells \u003d not self._cell_name_blocks_sync()"},{"line_number":741,"context_line":""},{"line_number":742,"context_line":"        context \u003d self._context"},{"line_number":743,"context_line":"        cell_type \u003d cells_opts.get_cell_type()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_d302c6b4","side":"PARENT","line":740,"range":{"start_line":740,"start_character":8,"end_line":740,"end_character":60},"in_reply_to":"3fce034c_5cd03ef8","updated":"2019-04-15 13:04:46.000000000","message":"The only reason this appears to have been here was to avoid triggering notifications for certain cells v1 operations. Because nothing should be setting the \u0027cell_name\u0027 field any more, this will never trigger going forward and can therefore be removed. As noted below, I remove the rest of the name setting business later in the series [1]\n\n[1] https://review.openstack.org/#/c/651305/1","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b8316fd201b817b21ff08a44f2302778786d2fbd","unresolved":false,"context_lines":[{"line_number":763,"context_line":"                cells_api.instance_update_from_api(context, stale_instance,"},{"line_number":764,"context_line":"                            expected_vm_state,"},{"line_number":765,"context_line":"                            expected_task_state,"},{"line_number":766,"context_line":"                            admin_state_reset)"},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"        self._extra_values_to_save \u003d {}"},{"line_number":769,"context_line":"        updates \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_7cf5faca","side":"PARENT","line":766,"range":{"start_line":766,"start_character":28,"end_line":766,"end_character":45},"updated":"2019-04-12 23:12:34.000000000","message":"oh, there it goes :)","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b8316fd201b817b21ff08a44f2302778786d2fbd","unresolved":false,"context_lines":[{"line_number":792,"context_line":"                    # as a result of bug."},{"line_number":793,"context_line":"                    raise exception.InstanceNotFound(instance_id\u003dself.uuid)"},{"line_number":794,"context_line":"            elif field in changes:"},{"line_number":795,"context_line":"                if (field \u003d\u003d \u0027cell_name\u0027 and self[field] is not None and"},{"line_number":796,"context_line":"                        self[field].startswith(cells_utils.BLOCK_SYNC_FLAG)):"},{"line_number":797,"context_line":"                    updates[field] \u003d self[field].replace("},{"line_number":798,"context_line":"                            cells_utils.BLOCK_SYNC_FLAG, \u0027\u0027, 1)"},{"line_number":799,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_bcafe292","side":"PARENT","line":796,"range":{"start_line":795,"start_character":20,"end_line":796,"end_character":75},"updated":"2019-04-12 23:12:34.000000000","message":"looks like this might could have been replaced by a call to the _cell_name_blocks_sync method you removed","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"82f1d2fcbd3f63b9409efe4ced5a91f47f612cef","unresolved":false,"context_lines":[{"line_number":792,"context_line":"                    # as a result of bug."},{"line_number":793,"context_line":"                    raise exception.InstanceNotFound(instance_id\u003dself.uuid)"},{"line_number":794,"context_line":"            elif field in changes:"},{"line_number":795,"context_line":"                if (field \u003d\u003d \u0027cell_name\u0027 and self[field] is not None and"},{"line_number":796,"context_line":"                        self[field].startswith(cells_utils.BLOCK_SYNC_FLAG)):"},{"line_number":797,"context_line":"                    updates[field] \u003d self[field].replace("},{"line_number":798,"context_line":"                            cells_utils.BLOCK_SYNC_FLAG, \u0027\u0027, 1)"},{"line_number":799,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_d35406cd","side":"PARENT","line":796,"range":{"start_line":795,"start_character":20,"end_line":796,"end_character":75},"in_reply_to":"3fce034c_bcafe292","updated":"2019-04-15 13:04:46.000000000","message":"Note that I remove all this stuff in [1]. I probably could/should have squashed that here but I didn\u0027t\n\nhttps://review.openstack.org/#/c/651305/1","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b8316fd201b817b21ff08a44f2302778786d2fbd","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        # NOTE(alaski): If cell synchronization is blocked it means we have"},{"line_number":852,"context_line":"        # already run this block of code in either the parent or child of this"},{"line_number":853,"context_line":"        # cell.  Therefore this notification has already been sent."},{"line_number":854,"context_line":"        if not self._sync_cells:"},{"line_number":855,"context_line":"            _notify \u003d lambda: None  # noqa: F811"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        _notify()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_dc050e7c","side":"PARENT","line":854,"range":{"start_line":854,"start_character":7,"end_line":854,"end_character":32},"updated":"2019-04-12 23:12:34.000000000","message":"** because it looks like this was still reachable to avoid sending the notification (again)","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b8316fd201b817b21ff08a44f2302778786d2fbd","unresolved":false,"context_lines":[{"line_number":840,"context_line":"        if cells_update_from_api:"},{"line_number":841,"context_line":"            _handle_cell_update_from_api()"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"        def _notify():"},{"line_number":844,"context_line":"            # NOTE(danms): We have to be super careful here not to trigger"},{"line_number":845,"context_line":"            # any lazy-loads that will unmigrate or unbackport something. So,"},{"line_number":846,"context_line":"            # make a copy of the instance for notifications first."},{"line_number":847,"context_line":"            new_ref \u003d self.obj_clone()"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"            notifications.send_update(context, old_ref, new_ref)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        # NOTE(alaski): If cell synchronization is blocked it means we have"},{"line_number":852,"context_line":"        # already run this block of code in either the parent or child of this"},{"line_number":853,"context_line":"        # cell.  Therefore this notification has already been sent."},{"line_number":854,"context_line":"        if not self._sync_cells:"},{"line_number":855,"context_line":"            _notify \u003d lambda: None  # noqa: F811"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        _notify()"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"        self.obj_reset_changes()"},{"line_number":860,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_5ca27e9c","side":"PARENT","line":857,"range":{"start_line":843,"start_character":0,"end_line":857,"end_character":17},"updated":"2019-04-12 23:12:34.000000000","message":"This was bizarre. Why wasn\u0027t it\n\n if self._sync_cells:\n     new_ref \u003d ...\n     notifications.send_update(...)\n\n??","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"81a716ac76956efe27c31a7d9cdda45da782566b","unresolved":false,"context_lines":[{"line_number":840,"context_line":"        if cells_update_from_api:"},{"line_number":841,"context_line":"            _handle_cell_update_from_api()"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"        def _notify():"},{"line_number":844,"context_line":"            # NOTE(danms): We have to be super careful here not to trigger"},{"line_number":845,"context_line":"            # any lazy-loads that will unmigrate or unbackport something. So,"},{"line_number":846,"context_line":"            # make a copy of the instance for notifications first."},{"line_number":847,"context_line":"            new_ref \u003d self.obj_clone()"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"            notifications.send_update(context, old_ref, new_ref)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        # NOTE(alaski): If cell synchronization is blocked it means we have"},{"line_number":852,"context_line":"        # already run this block of code in either the parent or child of this"},{"line_number":853,"context_line":"        # cell.  Therefore this notification has already been sent."},{"line_number":854,"context_line":"        if not self._sync_cells:"},{"line_number":855,"context_line":"            _notify \u003d lambda: None  # noqa: F811"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        _notify()"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"        self.obj_reset_changes()"},{"line_number":860,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_395beb54","side":"PARENT","line":857,"range":{"start_line":843,"start_character":0,"end_line":857,"end_character":17},"in_reply_to":"3fce034c_33f54a84","updated":"2019-04-15 14:56:26.000000000","message":"Yeah, in v1 the save would be called from the child cell and the parent cell (because that\u0027s how cellsv1 gets out of ^W^W^W^Wworks). The quadruple negative logic we have here is super hard to follow, but I think it\u0027s saying:\n\n if we\u0027re not a special blocked cell thing, then sync_cells \u003d True\n If we\u0027re syncing cells (or are not cells, because we\u0027re not a special blocked thing), then do the notify\n else skip notify\n\nBut that seems really, um, strange, unless the parent cell is always the \"blocked\" thing.\n\nSo it\u0027s hard to convince myself of this, but there\u0027s no other notify on save in this path, so I think that provides more evidence that we keep it after removal, right?","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"b6554dde1322802c3bfd563e8e69f66cf843a3de","unresolved":false,"context_lines":[{"line_number":840,"context_line":"        if cells_update_from_api:"},{"line_number":841,"context_line":"            _handle_cell_update_from_api()"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"        def _notify():"},{"line_number":844,"context_line":"            # NOTE(danms): We have to be super careful here not to trigger"},{"line_number":845,"context_line":"            # any lazy-loads that will unmigrate or unbackport something. So,"},{"line_number":846,"context_line":"            # make a copy of the instance for notifications first."},{"line_number":847,"context_line":"            new_ref \u003d self.obj_clone()"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"            notifications.send_update(context, old_ref, new_ref)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        # NOTE(alaski): If cell synchronization is blocked it means we have"},{"line_number":852,"context_line":"        # already run this block of code in either the parent or child of this"},{"line_number":853,"context_line":"        # cell.  Therefore this notification has already been sent."},{"line_number":854,"context_line":"        if not self._sync_cells:"},{"line_number":855,"context_line":"            _notify \u003d lambda: None  # noqa: F811"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        _notify()"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"        self.obj_reset_changes()"},{"line_number":860,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_cb3a0e97","side":"PARENT","line":857,"range":{"start_line":843,"start_character":0,"end_line":857,"end_character":17},"in_reply_to":"3fce034c_395beb54","updated":"2019-04-15 15:02:24.000000000","message":"I vote for keeping it. \n\n@Stephen: As an extra check you can remove it and run the functional test to see how the notification functional tests start failing. I think we will loose couple of instance.update notification there.","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"82f1d2fcbd3f63b9409efe4ced5a91f47f612cef","unresolved":false,"context_lines":[{"line_number":840,"context_line":"        if cells_update_from_api:"},{"line_number":841,"context_line":"            _handle_cell_update_from_api()"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"        def _notify():"},{"line_number":844,"context_line":"            # NOTE(danms): We have to be super careful here not to trigger"},{"line_number":845,"context_line":"            # any lazy-loads that will unmigrate or unbackport something. So,"},{"line_number":846,"context_line":"            # make a copy of the instance for notifications first."},{"line_number":847,"context_line":"            new_ref \u003d self.obj_clone()"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"            notifications.send_update(context, old_ref, new_ref)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        # NOTE(alaski): If cell synchronization is blocked it means we have"},{"line_number":852,"context_line":"        # already run this block of code in either the parent or child of this"},{"line_number":853,"context_line":"        # cell.  Therefore this notification has already been sent."},{"line_number":854,"context_line":"        if not self._sync_cells:"},{"line_number":855,"context_line":"            _notify \u003d lambda: None  # noqa: F811"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        _notify()"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"        self.obj_reset_changes()"},{"line_number":860,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_f3ba6208","side":"PARENT","line":857,"range":{"start_line":843,"start_character":0,"end_line":857,"end_character":17},"in_reply_to":"3fce034c_5ca27e9c","updated":"2019-04-15 13:04:46.000000000","message":"Haven\u0027t a notion. I\u0027d be tempted to get dansmith/gibi on this but I personally don\u0027t think there\u0027s any particular reason for this","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"98059780f3faa8bb228ccd442cb85b18bf15d266","unresolved":false,"context_lines":[{"line_number":840,"context_line":"        if cells_update_from_api:"},{"line_number":841,"context_line":"            _handle_cell_update_from_api()"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"        def _notify():"},{"line_number":844,"context_line":"            # NOTE(danms): We have to be super careful here not to trigger"},{"line_number":845,"context_line":"            # any lazy-loads that will unmigrate or unbackport something. So,"},{"line_number":846,"context_line":"            # make a copy of the instance for notifications first."},{"line_number":847,"context_line":"            new_ref \u003d self.obj_clone()"},{"line_number":848,"context_line":""},{"line_number":849,"context_line":"            notifications.send_update(context, old_ref, new_ref)"},{"line_number":850,"context_line":""},{"line_number":851,"context_line":"        # NOTE(alaski): If cell synchronization is blocked it means we have"},{"line_number":852,"context_line":"        # already run this block of code in either the parent or child of this"},{"line_number":853,"context_line":"        # cell.  Therefore this notification has already been sent."},{"line_number":854,"context_line":"        if not self._sync_cells:"},{"line_number":855,"context_line":"            _notify \u003d lambda: None  # noqa: F811"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"        _notify()"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"        self.obj_reset_changes()"},{"line_number":860,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_33f54a84","side":"PARENT","line":857,"range":{"start_line":843,"start_character":0,"end_line":857,"end_character":17},"in_reply_to":"3fce034c_f3ba6208","updated":"2019-04-15 13:19:18.000000000","message":"I\u0027m not a cell v1 (or v2) expert but based on other deleted code in this patch we try to avoid sending notification twice. So I guess for some reason in cellv1 there was two calls to the save() even for a single update of the object. If you are sure that this double save cannot happen now then I\u0027m OK with the simplification you made in this patch.","commit_id":"7cffd17c5983000632488038b8c4548317e9465e"}]}
