)]}'
{"masakari/engine/manager.py":[{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"b784c948585cdef40e7e89a5e8fad474ce1172fe","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                    context, notification)"},{"line_number":297,"context_line":"            elif notification.type \u003d\u003d fields.NotificationType.COMPUTE_HOST:"},{"line_number":298,"context_line":"                host_status \u003d notification.payload.get(\u0027host_status\u0027)"},{"line_number":299,"context_line":"                if (host_status.upper() \u003d\u003d fields.HostStatusType.NORMAL):"},{"line_number":300,"context_line":"                    notification_status \u003d self._handle_notification_type_host("},{"line_number":301,"context_line":"                        context, notification)"},{"line_number":302,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_2cbeed64","line":299,"range":{"start_line":299,"start_character":16,"end_line":299,"end_character":72},"updated":"2020-04-14 23:07:20.000000000","message":"Move this validation to _handle_notification_type_host and return notification_status as fields.NotificationStatus.IGNORED so that code from line #314 -323 can be used to log and save the notification status.","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"0b4dc5e21002b7917c8acb3b17945ab607c56fc8","unresolved":false,"context_lines":[{"line_number":296,"context_line":"                    context, notification)"},{"line_number":297,"context_line":"            elif notification.type \u003d\u003d fields.NotificationType.COMPUTE_HOST:"},{"line_number":298,"context_line":"                host_status \u003d notification.payload.get(\u0027host_status\u0027)"},{"line_number":299,"context_line":"                if (host_status.upper() \u003d\u003d fields.HostStatusType.NORMAL):"},{"line_number":300,"context_line":"                    notification_status \u003d self._handle_notification_type_host("},{"line_number":301,"context_line":"                        context, notification)"},{"line_number":302,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_23b0b3f4","line":299,"range":{"start_line":299,"start_character":16,"end_line":299,"end_character":72},"in_reply_to":"3f4c43b2_2cbeed64","updated":"2020-04-15 10:25:04.000000000","message":"Done","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"b784c948585cdef40e7e89a5e8fad474ce1172fe","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    notification_status \u003d self._handle_notification_type_host("},{"line_number":301,"context_line":"                        context, notification)"},{"line_number":302,"context_line":"                else:"},{"line_number":303,"context_line":"                    # LP 1858762: Ignoring notification if host_status UNKNOWN"},{"line_number":304,"context_line":"                    LOG.warning(\"Ignoring Host recovery since host_status is\""},{"line_number":305,"context_line":"                                \" UNKNOWN.\")"},{"line_number":306,"context_line":"                    update_data \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_0cc331ef","line":303,"range":{"start_line":303,"start_character":22,"end_line":303,"end_character":33},"updated":"2020-04-14 23:07:20.000000000","message":"No need to mention about LP bug. you can simply add a note explaining why you want to ignore the notification.","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"0b4dc5e21002b7917c8acb3b17945ab607c56fc8","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                    notification_status \u003d self._handle_notification_type_host("},{"line_number":301,"context_line":"                        context, notification)"},{"line_number":302,"context_line":"                else:"},{"line_number":303,"context_line":"                    # LP 1858762: Ignoring notification if host_status UNKNOWN"},{"line_number":304,"context_line":"                    LOG.warning(\"Ignoring Host recovery since host_status is\""},{"line_number":305,"context_line":"                                \" UNKNOWN.\")"},{"line_number":306,"context_line":"                    update_data \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_83942746","line":303,"range":{"start_line":303,"start_character":22,"end_line":303,"end_character":33},"in_reply_to":"3f4c43b2_0cc331ef","updated":"2020-04-15 10:25:04.000000000","message":"Done","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"c51636cbe748dc583755e3bbd81cf9321359d286","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        exception_info \u003d None"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        if host_status.upper() !\u003d fields.HostStatusType.NORMAL:"},{"line_number":181,"context_line":"            # masakari-hostmonitor sends a notification with \u0027NORMAL\u0027"},{"line_number":182,"context_line":"            # host_status when it confirms a failed host gets power off,"},{"line_number":183,"context_line":"            # otherwise it sends a notification with “UNKNOWN” host_status."},{"line_number":184,"context_line":"            # To avoid unsafe host recovery, ignoring processing of"},{"line_number":185,"context_line":"            # notification with “UNKNOWN” host_status."},{"line_number":186,"context_line":"            LOG.warning(\"Ignoring Host recovery since host_status is\""},{"line_number":187,"context_line":"                        \" UNKNOWN.\")"},{"line_number":188,"context_line":"            notification_status \u003d fields.NotificationStatus.IGNORED"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_aadda815","line":185,"range":{"start_line":181,"start_character":12,"end_line":185,"end_character":54},"updated":"2020-04-16 00:36:33.000000000","message":"# Note (\u003cyourname\u003e): Avoid host recovery for host_status other than \u0027NORMAL\u0027 otherwise it could lead to unsafe evacuation of instances running on the failed source host.","commit_id":"3ed6e7f71caf7f9f53bfde081597d7b6eadbe293"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"fefbe6846c73765d3e6101c69b8f603989c3798c","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        exception_info \u003d None"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        if host_status.upper() !\u003d fields.HostStatusType.NORMAL:"},{"line_number":181,"context_line":"            # masakari-hostmonitor sends a notification with \u0027NORMAL\u0027"},{"line_number":182,"context_line":"            # host_status when it confirms a failed host gets power off,"},{"line_number":183,"context_line":"            # otherwise it sends a notification with “UNKNOWN” host_status."},{"line_number":184,"context_line":"            # To avoid unsafe host recovery, ignoring processing of"},{"line_number":185,"context_line":"            # notification with “UNKNOWN” host_status."},{"line_number":186,"context_line":"            LOG.warning(\"Ignoring Host recovery since host_status is\""},{"line_number":187,"context_line":"                        \" UNKNOWN.\")"},{"line_number":188,"context_line":"            notification_status \u003d fields.NotificationStatus.IGNORED"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_2650b00a","line":185,"range":{"start_line":181,"start_character":12,"end_line":185,"end_character":54},"in_reply_to":"3f4c43b2_aadda815","updated":"2020-04-16 06:01:46.000000000","message":"Done","commit_id":"3ed6e7f71caf7f9f53bfde081597d7b6eadbe293"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"c51636cbe748dc583755e3bbd81cf9321359d286","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            # otherwise it sends a notification with “UNKNOWN” host_status."},{"line_number":184,"context_line":"            # To avoid unsafe host recovery, ignoring processing of"},{"line_number":185,"context_line":"            # notification with “UNKNOWN” host_status."},{"line_number":186,"context_line":"            LOG.warning(\"Ignoring Host recovery since host_status is\""},{"line_number":187,"context_line":"                        \" UNKNOWN.\")"},{"line_number":188,"context_line":"            notification_status \u003d fields.NotificationStatus.IGNORED"},{"line_number":189,"context_line":"        elif notification_event.upper() \u003d\u003d \u0027STARTED\u0027:"},{"line_number":190,"context_line":"            LOG.info(\"Notification type \u0027%(type)s\u0027 received for host \""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_2ad198fc","line":187,"range":{"start_line":186,"start_character":12,"end_line":187,"end_character":36},"updated":"2020-04-16 00:36:33.000000000","message":"LOG.warning(\"Notification %(uuid)s ignored as host_status is %(host_status)s\" % {\u0027uuid\u0027: notification.notification_uuid, \u0027host_status\u0027: host_status.upper()})","commit_id":"3ed6e7f71caf7f9f53bfde081597d7b6eadbe293"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"fefbe6846c73765d3e6101c69b8f603989c3798c","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            # otherwise it sends a notification with “UNKNOWN” host_status."},{"line_number":184,"context_line":"            # To avoid unsafe host recovery, ignoring processing of"},{"line_number":185,"context_line":"            # notification with “UNKNOWN” host_status."},{"line_number":186,"context_line":"            LOG.warning(\"Ignoring Host recovery since host_status is\""},{"line_number":187,"context_line":"                        \" UNKNOWN.\")"},{"line_number":188,"context_line":"            notification_status \u003d fields.NotificationStatus.IGNORED"},{"line_number":189,"context_line":"        elif notification_event.upper() \u003d\u003d \u0027STARTED\u0027:"},{"line_number":190,"context_line":"            LOG.info(\"Notification type \u0027%(type)s\u0027 received for host \""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_86570403","line":187,"range":{"start_line":186,"start_character":12,"end_line":187,"end_character":36},"in_reply_to":"3f4c43b2_2ad198fc","updated":"2020-04-16 06:01:46.000000000","message":"Done","commit_id":"3ed6e7f71caf7f9f53bfde081597d7b6eadbe293"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"d4b98c334cdcf17cce9161fb85a8dfea8a584ce3","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        exception_info \u003d None"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        if host_status.upper() !\u003d fields.HostStatusType.NORMAL:"},{"line_number":181,"context_line":"            # Note (shilpasd): Avoid host recovery for host_status other than"},{"line_number":182,"context_line":"            # `NORMAL` otherwise it could lead to unsafe evacuation of"},{"line_number":183,"context_line":"            # instances running on the failed source host."},{"line_number":184,"context_line":"            LOG.warning(\"Notification \u0027%(uuid)s\u0027 ignored as host_status\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_e97b3bbb","line":181,"range":{"start_line":181,"start_character":12,"end_line":181,"end_character":29},"updated":"2020-04-16 08:05:11.000000000","message":"nit: \n# NOTE(shilpasd):","commit_id":"0fa264be18d04bd334bcf23f3d3c02ff7b5f9c0d"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"363344b690703617c2f0fb6a0af8dc474855350a","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        exception_info \u003d None"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        if host_status.upper() !\u003d fields.HostStatusType.NORMAL:"},{"line_number":181,"context_line":"            # Note (shilpasd): Avoid host recovery for host_status other than"},{"line_number":182,"context_line":"            # `NORMAL` otherwise it could lead to unsafe evacuation of"},{"line_number":183,"context_line":"            # instances running on the failed source host."},{"line_number":184,"context_line":"            LOG.warning(\"Notification \u0027%(uuid)s\u0027 ignored as host_status\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_6c3e19db","line":181,"range":{"start_line":181,"start_character":12,"end_line":181,"end_character":29},"in_reply_to":"3f4c43b2_e97b3bbb","updated":"2020-04-16 09:08:51.000000000","message":"Done","commit_id":"0fa264be18d04bd334bcf23f3d3c02ff7b5f9c0d"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"d4b98c334cdcf17cce9161fb85a8dfea8a584ce3","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        if host_status.upper() !\u003d fields.HostStatusType.NORMAL:"},{"line_number":181,"context_line":"            # Note (shilpasd): Avoid host recovery for host_status other than"},{"line_number":182,"context_line":"            # `NORMAL` otherwise it could lead to unsafe evacuation of"},{"line_number":183,"context_line":"            # instances running on the failed source host."},{"line_number":184,"context_line":"            LOG.warning(\"Notification \u0027%(uuid)s\u0027 ignored as host_status\""},{"line_number":185,"context_line":"                        \"is \u0027%(host_status)s\u0027\","}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_494cef9d","line":182,"range":{"start_line":182,"start_character":14,"end_line":182,"end_character":22},"updated":"2020-04-16 08:05:11.000000000","message":"\u0027NORMAL\u0027","commit_id":"0fa264be18d04bd334bcf23f3d3c02ff7b5f9c0d"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"363344b690703617c2f0fb6a0af8dc474855350a","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        if host_status.upper() !\u003d fields.HostStatusType.NORMAL:"},{"line_number":181,"context_line":"            # Note (shilpasd): Avoid host recovery for host_status other than"},{"line_number":182,"context_line":"            # `NORMAL` otherwise it could lead to unsafe evacuation of"},{"line_number":183,"context_line":"            # instances running on the failed source host."},{"line_number":184,"context_line":"            LOG.warning(\"Notification \u0027%(uuid)s\u0027 ignored as host_status\""},{"line_number":185,"context_line":"                        \"is \u0027%(host_status)s\u0027\","}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_cc248dc9","line":182,"range":{"start_line":182,"start_character":14,"end_line":182,"end_character":22},"in_reply_to":"3f4c43b2_494cef9d","updated":"2020-04-16 09:08:51.000000000","message":"Done","commit_id":"0fa264be18d04bd334bcf23f3d3c02ff7b5f9c0d"}],"masakari/ha/api.py":[{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"61428eb86c5c468cd64b7d2da83258547bc9b6e7","unresolved":false,"context_lines":[{"line_number":338,"context_line":"                        context, notification)"},{"line_number":339,"context_line":"                else:"},{"line_number":340,"context_line":"                    # LP 1858762: Ignoring notification if host_status UNKNOWN"},{"line_number":341,"context_line":"                    LOG.info(\"Ignoring Host recovery since host_status is\""},{"line_number":342,"context_line":"                             \"UNKNOWN.\")"},{"line_number":343,"context_line":"                    update_data \u003d {"},{"line_number":344,"context_line":"                        \u0027status\u0027: fields.NotificationStatus.IGNORED,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4c43b2_c38e4c2d","line":341,"range":{"start_line":341,"start_character":24,"end_line":341,"end_character":28},"updated":"2020-04-14 09:05:19.000000000","message":"IMO, it should be warning as you are not taking any corrective action due to UNKNOWN host_status.","commit_id":"d0d7e96a372ffe16d73c3ad11195d622529e052a"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"61428eb86c5c468cd64b7d2da83258547bc9b6e7","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                    LOG.info(\"Ignoring Host recovery since host_status is\""},{"line_number":342,"context_line":"                             \"UNKNOWN.\")"},{"line_number":343,"context_line":"                    update_data \u003d {"},{"line_number":344,"context_line":"                        \u0027status\u0027: fields.NotificationStatus.IGNORED,"},{"line_number":345,"context_line":"                    }"},{"line_number":346,"context_line":"                    notification.update(update_data)"},{"line_number":347,"context_line":"                    notification.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f4c43b2_e35f08e3","line":344,"range":{"start_line":344,"start_character":34,"end_line":344,"end_character":67},"updated":"2020-04-14 09:05:19.000000000","message":"I think reading payload  and take corrective action should be the decision of masakari-engine instead of api layer.\nMove this logic to masakari engine.","commit_id":"d0d7e96a372ffe16d73c3ad11195d622529e052a"}],"masakari/tests/unit/engine/test_engine_mgr.py":[{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"b784c948585cdef40e7e89a5e8fad474ce1172fe","unresolved":false,"context_lines":[{"line_number":769,"context_line":"    @mock.patch.object(notification_obj.Notification, \"save\")"},{"line_number":770,"context_line":"    def test_process_notification_host_failure_with_host_status_unknown("},{"line_number":771,"context_line":"            self, mock_get_noti, mock_notification_save):"},{"line_number":772,"context_line":"        noti \u003d fakes.create_fake_notification("},{"line_number":773,"context_line":"            type\u003d\"COMPUTE_HOST\", id\u003d1, payload\u003d{"},{"line_number":774,"context_line":"                \u0027event\u0027: \u0027stopped\u0027, \u0027host_status\u0027: \u0027UNKNOWN\u0027,"},{"line_number":775,"context_line":"                \u0027cluster_status\u0027: \u0027ONLINE\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_4727d2b4","line":772,"range":{"start_line":772,"start_character":8,"end_line":772,"end_character":12},"updated":"2020-04-14 23:07:20.000000000","message":"rename it to notification","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"0b4dc5e21002b7917c8acb3b17945ab607c56fc8","unresolved":false,"context_lines":[{"line_number":769,"context_line":"    @mock.patch.object(notification_obj.Notification, \"save\")"},{"line_number":770,"context_line":"    def test_process_notification_host_failure_with_host_status_unknown("},{"line_number":771,"context_line":"            self, mock_get_noti, mock_notification_save):"},{"line_number":772,"context_line":"        noti \u003d fakes.create_fake_notification("},{"line_number":773,"context_line":"            type\u003d\"COMPUTE_HOST\", id\u003d1, payload\u003d{"},{"line_number":774,"context_line":"                \u0027event\u0027: \u0027stopped\u0027, \u0027host_status\u0027: \u0027UNKNOWN\u0027,"},{"line_number":775,"context_line":"                \u0027cluster_status\u0027: \u0027ONLINE\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_63911b53","line":772,"range":{"start_line":772,"start_character":8,"end_line":772,"end_character":12},"in_reply_to":"3f4c43b2_4727d2b4","updated":"2020-04-15 10:25:04.000000000","message":"Done","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"b784c948585cdef40e7e89a5e8fad474ce1172fe","unresolved":false,"context_lines":[{"line_number":775,"context_line":"                \u0027cluster_status\u0027: \u0027ONLINE\u0027"},{"line_number":776,"context_line":"            },"},{"line_number":777,"context_line":"            source_host_uuid\u003duuidsentinel.fake_host,"},{"line_number":778,"context_line":"            generated_time\u003dNOW, status\u003d\"new\","},{"line_number":779,"context_line":"            notification_uuid\u003duuidsentinel.fake_notification)"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"        noti_new \u003d noti"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_ec59a55a","line":778,"range":{"start_line":778,"start_character":40,"end_line":778,"end_character":43},"updated":"2020-04-14 23:07:20.000000000","message":"use NotificationStatus.NEW","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"0b4dc5e21002b7917c8acb3b17945ab607c56fc8","unresolved":false,"context_lines":[{"line_number":775,"context_line":"                \u0027cluster_status\u0027: \u0027ONLINE\u0027"},{"line_number":776,"context_line":"            },"},{"line_number":777,"context_line":"            source_host_uuid\u003duuidsentinel.fake_host,"},{"line_number":778,"context_line":"            generated_time\u003dNOW, status\u003d\"new\","},{"line_number":779,"context_line":"            notification_uuid\u003duuidsentinel.fake_notification)"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"        noti_new \u003d noti"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_a39b2370","line":778,"range":{"start_line":778,"start_character":40,"end_line":778,"end_character":43},"in_reply_to":"3f4c43b2_ec59a55a","updated":"2020-04-15 10:25:04.000000000","message":"Done","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"b784c948585cdef40e7e89a5e8fad474ce1172fe","unresolved":false,"context_lines":[{"line_number":779,"context_line":"            notification_uuid\u003duuidsentinel.fake_notification)"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"        noti_new \u003d noti"},{"line_number":782,"context_line":"        noti_new.status \u003d \u0027ignored\u0027"},{"line_number":783,"context_line":"        mock_get_noti.return_value \u003d noti_new"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        with mock.patch(\"masakari.engine.manager.LOG.warning\") as mock_log:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_2c31cd0c","line":782,"range":{"start_line":782,"start_character":26,"end_line":782,"end_character":35},"updated":"2020-04-14 23:07:20.000000000","message":"use NotificationStatus.IGNORED","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"0b4dc5e21002b7917c8acb3b17945ab607c56fc8","unresolved":false,"context_lines":[{"line_number":779,"context_line":"            notification_uuid\u003duuidsentinel.fake_notification)"},{"line_number":780,"context_line":""},{"line_number":781,"context_line":"        noti_new \u003d noti"},{"line_number":782,"context_line":"        noti_new.status \u003d \u0027ignored\u0027"},{"line_number":783,"context_line":"        mock_get_noti.return_value \u003d noti_new"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        with mock.patch(\"masakari.engine.manager.LOG.warning\") as mock_log:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_e38ecb2c","line":782,"range":{"start_line":782,"start_character":26,"end_line":782,"end_character":35},"in_reply_to":"3f4c43b2_2c31cd0c","updated":"2020-04-15 10:25:04.000000000","message":"Done","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"b784c948585cdef40e7e89a5e8fad474ce1172fe","unresolved":false,"context_lines":[{"line_number":780,"context_line":""},{"line_number":781,"context_line":"        noti_new \u003d noti"},{"line_number":782,"context_line":"        noti_new.status \u003d \u0027ignored\u0027"},{"line_number":783,"context_line":"        mock_get_noti.return_value \u003d noti_new"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        with mock.patch(\"masakari.engine.manager.LOG.warning\") as mock_log:"},{"line_number":786,"context_line":"            self.engine.process_notification(self.context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_e71c1e6c","line":783,"range":{"start_line":783,"start_character":8,"end_line":783,"end_character":34},"updated":"2020-04-14 23:07:20.000000000","message":"process_notification calls get_by_uuid but in this case, it should get the notification  type as NEW and not IGNORED.\n\nSo noti_new  should be noti.","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"0b4dc5e21002b7917c8acb3b17945ab607c56fc8","unresolved":false,"context_lines":[{"line_number":780,"context_line":""},{"line_number":781,"context_line":"        noti_new \u003d noti"},{"line_number":782,"context_line":"        noti_new.status \u003d \u0027ignored\u0027"},{"line_number":783,"context_line":"        mock_get_noti.return_value \u003d noti_new"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        with mock.patch(\"masakari.engine.manager.LOG.warning\") as mock_log:"},{"line_number":786,"context_line":"            self.engine.process_notification(self.context,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_4384df0c","line":783,"range":{"start_line":783,"start_character":8,"end_line":783,"end_character":34},"in_reply_to":"3f4c43b2_e71c1e6c","updated":"2020-04-15 10:25:04.000000000","message":"Done","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"b784c948585cdef40e7e89a5e8fad474ce1172fe","unresolved":false,"context_lines":[{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        with mock.patch(\"masakari.engine.manager.LOG.warning\") as mock_log:"},{"line_number":786,"context_line":"            self.engine.process_notification(self.context,"},{"line_number":787,"context_line":"                                             notification\u003dnoti)"},{"line_number":788,"context_line":"            mock_log.assert_called_once()"},{"line_number":789,"context_line":"            args \u003d mock_log.call_args[0]"},{"line_number":790,"context_line":"            expected_log \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_8738bad3","line":787,"range":{"start_line":787,"start_character":58,"end_line":787,"end_character":62},"updated":"2020-04-14 23:07:20.000000000","message":"you should also assert on noti.notifcation.status \u003d\u003d NotificationStatus.IGNORED","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"0b4dc5e21002b7917c8acb3b17945ab607c56fc8","unresolved":false,"context_lines":[{"line_number":784,"context_line":""},{"line_number":785,"context_line":"        with mock.patch(\"masakari.engine.manager.LOG.warning\") as mock_log:"},{"line_number":786,"context_line":"            self.engine.process_notification(self.context,"},{"line_number":787,"context_line":"                                             notification\u003dnoti)"},{"line_number":788,"context_line":"            mock_log.assert_called_once()"},{"line_number":789,"context_line":"            args \u003d mock_log.call_args[0]"},{"line_number":790,"context_line":"            expected_log \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"3f4c43b2_2389d322","line":787,"range":{"start_line":787,"start_character":58,"end_line":787,"end_character":62},"in_reply_to":"3f4c43b2_8738bad3","updated":"2020-04-15 10:25:04.000000000","message":"Done","commit_id":"4b100cf630cf9f078e4f5c01861d2a64432d1638"},{"author":{"_account_id":1011,"name":"Tushar Patil","email":"tushar.vitthal.patil@gmail.com","username":"tpatil"},"change_message_id":"c51636cbe748dc583755e3bbd81cf9321359d286","unresolved":false,"context_lines":[{"line_number":809,"context_line":"            notification_uuid\u003duuidsentinel.fake_notification)"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        mock_get_noti.return_value \u003d notification"},{"line_number":812,"context_line":"        notification_new \u003d notification"},{"line_number":813,"context_line":"        notification_new.status \u003d fields.NotificationStatus.IGNORED"},{"line_number":814,"context_line":"        mock_notification_save.side_effect \u003d [notification, notification_new]"},{"line_number":815,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_ca03d472","line":812,"range":{"start_line":812,"start_character":8,"end_line":812,"end_character":39},"updated":"2020-04-16 00:36:33.000000000","message":"You need to deep copy the object otherwise [notification, notification_new] will be exactly same.\n\nnotification_new \u003d notification.obj_clone()","commit_id":"3ed6e7f71caf7f9f53bfde081597d7b6eadbe293"},{"author":{"_account_id":27302,"name":"Shilpa Devharakar","email":"shilpa.devharakar@nttdata.com","username":"shilpa.devharakar"},"change_message_id":"fefbe6846c73765d3e6101c69b8f603989c3798c","unresolved":false,"context_lines":[{"line_number":809,"context_line":"            notification_uuid\u003duuidsentinel.fake_notification)"},{"line_number":810,"context_line":""},{"line_number":811,"context_line":"        mock_get_noti.return_value \u003d notification"},{"line_number":812,"context_line":"        notification_new \u003d notification"},{"line_number":813,"context_line":"        notification_new.status \u003d fields.NotificationStatus.IGNORED"},{"line_number":814,"context_line":"        mock_notification_save.side_effect \u003d [notification, notification_new]"},{"line_number":815,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4c43b2_665ab82a","line":812,"range":{"start_line":812,"start_character":8,"end_line":812,"end_character":39},"in_reply_to":"3f4c43b2_ca03d472","updated":"2020-04-16 06:01:46.000000000","message":"Done","commit_id":"3ed6e7f71caf7f9f53bfde081597d7b6eadbe293"}]}
