)]}'
{"tempest/cmd/cleanup_service.py":[{"author":{"_account_id":27078,"name":"Manik Bindlish","email":"manikbindlish19@gmail.com","username":"manik"},"change_message_id":"875cc7611165d95b56a0fe5a5159a6e878f7ec0a","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        keypairs \u003d self.list()"},{"line_number":262,"context_line":"        for k in keypairs:"},{"line_number":263,"context_line":"            try:"},{"line_number":264,"context_line":"                name \u003d k[\u0027keypair\u0027][\u0027name\u0027]"},{"line_number":265,"context_line":"                client.delete_keypair(name)"},{"line_number":266,"context_line":"            except Exception:"},{"line_number":267,"context_line":"                LOG.exception(\"Delete Keypair %s exception.\", name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_85730916","line":264,"range":{"start_line":264,"start_character":16,"end_line":264,"end_character":43},"updated":"2019-02-28 04:47:37.000000000","message":"1.) It should be out of try block as if this statement gets failed then it will wrongly display exception.\n2.) name used in log.exception will not be found if name is not assigned in L[264] due to failure","commit_id":"8373aba8a04306ff4d2408feda4fc34c3eb47ae4"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"f423d3da0e8713ab8d0eaf6ca9bf2ce716fd30e0","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        try:"},{"line_number":324,"context_line":"            client.delete_quota_set(self.project_id)"},{"line_number":325,"context_line":"        except Exception:"},{"line_number":326,"context_line":"            LOG.exception(\"Delete Volume Quotas exception for %s project.\","},{"line_number":327,"context_line":"                          self.project_id)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"    def dry_run(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_4cff8901","line":326,"range":{"start_line":326,"start_character":61,"end_line":326,"end_character":72},"updated":"2019-02-28 07:40:54.000000000","message":"should be \u0027project %s\u0027","commit_id":"8373aba8a04306ff4d2408feda4fc34c3eb47ae4"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"f423d3da0e8713ab8d0eaf6ca9bf2ce716fd30e0","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        try:"},{"line_number":344,"context_line":"            client.delete_quota_set(self.project_id)"},{"line_number":345,"context_line":"        except Exception:"},{"line_number":346,"context_line":"            LOG.exception(\"Delete Quotas exception for %s project.\","},{"line_number":347,"context_line":"                          self.project_id)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def dry_run(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_8c09f131","line":346,"range":{"start_line":346,"start_character":54,"end_line":346,"end_character":65},"updated":"2019-02-28 07:40:54.000000000","message":"should be \u0027project %s\u0027","commit_id":"8373aba8a04306ff4d2408feda4fc34c3eb47ae4"},{"author":{"_account_id":27078,"name":"Manik Bindlish","email":"manikbindlish19@gmail.com","username":"manik"},"change_message_id":"875cc7611165d95b56a0fe5a5159a6e878f7ec0a","unresolved":false,"context_lines":[{"line_number":471,"context_line":"        routers \u003d self.list()"},{"line_number":472,"context_line":"        for router in routers:"},{"line_number":473,"context_line":"            try:"},{"line_number":474,"context_line":"                rid \u003d router[\u0027id\u0027]"},{"line_number":475,"context_line":"                ports \u003d [port for port"},{"line_number":476,"context_line":"                         in ports_client.list_ports(device_id\u003drid)[\u0027ports\u0027]"},{"line_number":477,"context_line":"                         if net_info.is_router_interface_port(port)]"},{"line_number":478,"context_line":"                for port in ports:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                client.delete_router(rid)"},{"line_number":481,"context_line":"            except Exception:"},{"line_number":482,"context_line":"                LOG.exception(\"Delete Router %s exception.\", rid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_a56e4d29","line":479,"range":{"start_line":474,"start_character":17,"end_line":479,"end_character":75},"updated":"2019-02-28 04:47:37.000000000","message":"ditto","commit_id":"8373aba8a04306ff4d2408feda4fc34c3eb47ae4"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"485c3db79fe33254c58173c7cb1bec3573e746e8","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            ports \u003d [port for port"},{"line_number":475,"context_line":"                     in ports_client.list_ports(device_id\u003drid)[\u0027ports\u0027]"},{"line_number":476,"context_line":"                     if net_info.is_router_interface_port(port)]"},{"line_number":477,"context_line":"            try:"},{"line_number":478,"context_line":"                for port in ports:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_86fa2572","line":477,"updated":"2019-02-28 14:44:07.000000000","message":"This doesn\u0027t cove a case if exception happens at remove_router_interface. Can you  use two try..except blocks?\n\n       for port in ports:\n           try:\n                client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])\n           except Exception:\n                 with save_and_reraise():\n                     LOG.exception(\"Remove Router Interface exception for \u0027port %s\u0027.\", port[\u0027id\u0027])","commit_id":"dbf2dde3214c1baad4c7f07e62f50287afb7e17e"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"d26227e5c002e97405d7635321a3277fa2474c73","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            ports \u003d [port for port"},{"line_number":475,"context_line":"                     in ports_client.list_ports(device_id\u003drid)[\u0027ports\u0027]"},{"line_number":476,"context_line":"                     if net_info.is_router_interface_port(port)]"},{"line_number":477,"context_line":"            try:"},{"line_number":478,"context_line":"                for port in ports:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9fdfeff1_37d7e1f0","line":477,"in_reply_to":"9fdfeff1_86fa2572","updated":"2019-02-28 16:02:00.000000000","message":"sure, that\u0027s a good idea, thanks.","commit_id":"dbf2dde3214c1baad4c7f07e62f50287afb7e17e"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"43a7c61a01423fea1bd47f22cc7e62d2722677be","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                try:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                except Exception:"},{"line_number":481,"context_line":"                    LOG.exception(\"Delete Router Interface exception for \""},{"line_number":482,"context_line":"                                  \"\u0027port %s\u0027.\", port[\u0027id\u0027])"},{"line_number":483,"context_line":"            try:"},{"line_number":484,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_737a5c77","line":481,"updated":"2019-02-28 16:16:50.000000000","message":"no no no, the exception must be raised here, use `oslo_utils.excutils.save_and_reraise_exception` function\nNow, the exception will be omitted and it will try to delete next port and delete router, but the original code doesn\u0027t do this, it just skips router deleting if something happened with an interface","commit_id":"b82f386ea9017746b1a1c1aa1ce489c5468a3994"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"afa5a211602064109fc3723c82d51b02f4d6a48c","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                try:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                except Exception:"},{"line_number":481,"context_line":"                    LOG.exception(\"Delete Router Interface exception for \""},{"line_number":482,"context_line":"                                  \"\u0027port %s\u0027.\", port[\u0027id\u0027])"},{"line_number":483,"context_line":"            try:"},{"line_number":484,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_57290899","line":481,"in_reply_to":"5fc1f717_1734e0fa","updated":"2019-04-01 17:23:59.000000000","message":"you are already doing it - https://review.openstack.org/#/c/649053/2","commit_id":"b82f386ea9017746b1a1c1aa1ce489c5468a3994"},{"author":{"_account_id":8911,"name":"Sergey Vilgelm","email":"sergey@vilgelm.info","username":"sergey.vilgelm"},"change_message_id":"a07ee411826cd1b22b3b7c8fb27ac4a59b7059d1","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                try:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                except Exception:"},{"line_number":481,"context_line":"                    LOG.exception(\"Delete Router Interface exception for \""},{"line_number":482,"context_line":"                                  \"\u0027port %s\u0027.\", port[\u0027id\u0027])"},{"line_number":483,"context_line":"            try:"},{"line_number":484,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_8bcbfca1","line":481,"in_reply_to":"9fdfeff1_3c849cb0","updated":"2019-03-01 02:59:55.000000000","message":"It\u0027s not so bad, but it changes a current behavior, so update the commit message. I mean in this case it\u0027s not just improving a logging","commit_id":"b82f386ea9017746b1a1c1aa1ce489c5468a3994"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"11cbb8816601f75ac00cf806e58cfb2dc5e15a0d","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                try:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                except Exception:"},{"line_number":481,"context_line":"                    LOG.exception(\"Delete Router Interface exception for \""},{"line_number":482,"context_line":"                                  \"\u0027port %s\u0027.\", port[\u0027id\u0027])"},{"line_number":483,"context_line":"            try:"},{"line_number":484,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_3c849cb0","line":481,"in_reply_to":"9fdfeff1_737a5c77","updated":"2019-02-28 22:02:23.000000000","message":"hmm, and is that bad? cleanup should delete as many resources as possible. If one interface failed to delete, other one doesn\u0027t have to. And then the router, no matter if all interfaces were or weren\u0027t deleted, cleanup can try to delete the router.","commit_id":"b82f386ea9017746b1a1c1aa1ce489c5468a3994"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"0d30fc046f613ec475e7a6efa3bc1c861b0ab83d","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                try:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                except Exception:"},{"line_number":481,"context_line":"                    LOG.exception(\"Delete Router Interface exception for \""},{"line_number":482,"context_line":"                                  \"\u0027port %s\u0027.\", port[\u0027id\u0027])"},{"line_number":483,"context_line":"            try:"},{"line_number":484,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_25cc7c5f","line":481,"in_reply_to":"9fdfeff1_86f21304","updated":"2019-03-01 08:06:51.000000000","message":"I\u0027m sorry, so you\u0027re saying that before it was better, do I get it right?\n\nBefore we tried to delete interfaces and then the router and if anywhere during this process an exception occurred, we logged it and moved on.\n\nNow the code will try to remove all interfaces - if any exception occurs, it will be logged and the process will continue with another interface and at the end the process will try to delete the router - and again, if it\u0027s not successful, it\u0027s logged.\n\nSo which approach you think is the best?","commit_id":"b82f386ea9017746b1a1c1aa1ce489c5468a3994"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"c0b8b114bc0a5b8366326d37a31c7e6504bef93d","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                try:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                except Exception:"},{"line_number":481,"context_line":"                    LOG.exception(\"Delete Router Interface exception for \""},{"line_number":482,"context_line":"                                  \"\u0027port %s\u0027.\", port[\u0027id\u0027])"},{"line_number":483,"context_line":"            try:"},{"line_number":484,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_86f21304","line":481,"in_reply_to":"9fdfeff1_8bcbfca1","updated":"2019-03-01 04:23:06.000000000","message":"Instead of raising the exception we should only LOG the exception as cleanup CLI should continue. We can do if Exception in removing the interface then do not try delete and log that we are not proceeding the delete router because of this exception. \nWe can handle this with flag instead of nested if else.","commit_id":"b82f386ea9017746b1a1c1aa1ce489c5468a3994"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"0d30fc046f613ec475e7a6efa3bc1c861b0ab83d","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                try:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                except Exception:"},{"line_number":481,"context_line":"                    LOG.exception(\"Delete Router Interface exception for \""},{"line_number":482,"context_line":"                                  \"\u0027port %s\u0027.\", port[\u0027id\u0027])"},{"line_number":483,"context_line":"            try:"},{"line_number":484,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fdfeff1_c517b0ed","line":481,"in_reply_to":"9fdfeff1_8bcbfca1","updated":"2019-03-01 08:06:51.000000000","message":"yeah, sure, I\u0027ll update the commit message, at the beginning I didn\u0027t know I was gonna edit anything else apart from logging.","commit_id":"b82f386ea9017746b1a1c1aa1ce489c5468a3994"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"eecac9ef3cc4e3a78e23c7ea899ee2199ec73d05","unresolved":false,"context_lines":[{"line_number":478,"context_line":"                try:"},{"line_number":479,"context_line":"                    client.remove_router_interface(rid, port_id\u003dport[\u0027id\u0027])"},{"line_number":480,"context_line":"                except Exception:"},{"line_number":481,"context_line":"                    LOG.exception(\"Delete Router Interface exception for \""},{"line_number":482,"context_line":"                                  \"\u0027port %s\u0027.\", port[\u0027id\u0027])"},{"line_number":483,"context_line":"            try:"},{"line_number":484,"context_line":"                client.delete_router(rid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5fc1f717_1734e0fa","line":481,"in_reply_to":"9fdfeff1_c517b0ed","updated":"2019-04-01 17:23:14.000000000","message":"sorry, I missed your reply. \n\nI did not mean the earlier code is better. trying to remove the interface one by one is a good way. \n\nI do not know why I said it is reraising the exception. This PS4 code is good. thanks for explaining. \n\nAs this improvement is separate than current patch, you can propose this in followup one.","commit_id":"b82f386ea9017746b1a1c1aa1ce489c5468a3994"}]}
