)]}'
{"kuryr_kubernetes/controller/handlers/vif.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"401a3cdf02d5bc56f667fa40da2c488729cfe737","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                drivers.ServiceSecurityGroupsDriver.get_instance())"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def on_present(self, pod):"},{"line_number":66,"context_line":"        if (self._is_pod_completed(pod)):"},{"line_number":67,"context_line":"            self.on_deleted(pod)"},{"line_number":68,"context_line":"            try:"},{"line_number":69,"context_line":"                self._set_pod_state(pod, None)"},{"line_number":70,"context_line":"            except k_exc.K8sClientException:"},{"line_number":71,"context_line":"                LOG.warning(\"Could not clear pod annotation:\")"},{"line_number":72,"context_line":"            return"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        if (driver_utils.is_host_network(pod) or"},{"line_number":75,"context_line":"                not self._is_pod_scheduled(pod)):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1fa4df85_b4f573ef","line":72,"range":{"start_line":66,"start_character":0,"end_line":72,"end_character":18},"updated":"2020-03-19 08:10:56.000000000","message":"shouldn\u0027t we avoid calling on_delete many times once we complete the first deletion action?\n\nOtherwise, when we trigger _set_pod_state a new on_present event will be trigger and on_deleted will be re-executed","commit_id":"1ab115e2d7c63b44d1f28da7e3f50f60f3fc2b33"},{"author":{"_account_id":14570,"name":"Ashish Billore","email":"ash.billore@samsung.com","username":"ashish.billore"},"change_message_id":"8ec9f1c2f65caae07010ba65cd12e677b092ec98","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                drivers.ServiceSecurityGroupsDriver.get_instance())"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def on_present(self, pod):"},{"line_number":66,"context_line":"        state \u003d driver_utils.get_pod_state(pod)"},{"line_number":67,"context_line":"        if (self._is_pod_completed(pod)):"},{"line_number":68,"context_line":"            if state:"},{"line_number":69,"context_line":"                self.on_deleted(pod)"},{"line_number":70,"context_line":"                try:"},{"line_number":71,"context_line":"                    self._set_pod_state(pod, None)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_ef2d56fd","line":68,"range":{"start_line":66,"start_character":0,"end_line":68,"end_character":21},"updated":"2020-03-19 09:53:14.000000000","message":"Minor comment:\nSome level of nesting can be reduced by\n\nif (driver_utils.get_pod_state(pod) and\n    self._is_pod_completed(pod)):\n        ...\n        ...","commit_id":"7c97f249ed7afc3d314cc91d6aede7eb4d1f7bd4"},{"author":{"_account_id":29615,"name":"Nayan Deshmukh","email":"n.deshmukh@samsung.com","username":"n.deshmukh"},"change_message_id":"3a3b030533ab6728b6c1f580487f2406bc4c56ab","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                drivers.ServiceSecurityGroupsDriver.get_instance())"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def on_present(self, pod):"},{"line_number":66,"context_line":"        state \u003d driver_utils.get_pod_state(pod)"},{"line_number":67,"context_line":"        if (self._is_pod_completed(pod)):"},{"line_number":68,"context_line":"            if state:"},{"line_number":69,"context_line":"                self.on_deleted(pod)"},{"line_number":70,"context_line":"                try:"},{"line_number":71,"context_line":"                    self._set_pod_state(pod, None)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_6f7166de","line":68,"range":{"start_line":66,"start_character":0,"end_line":68,"end_character":21},"in_reply_to":"1fa4df85_ef2d56fd","updated":"2020-03-19 10:06:59.000000000","message":"There is a return statement which depends on the output of is_pod_completed hence I cannot merge the two if statements","commit_id":"7c97f249ed7afc3d314cc91d6aede7eb4d1f7bd4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"ec82eb974ad342f64965ff0f81c661b36c55f1cc","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                try:"},{"line_number":71,"context_line":"                    self._set_pod_state(pod, None)"},{"line_number":72,"context_line":"                except k_exc.K8sClientException:"},{"line_number":73,"context_line":"                    LOG.warning(\"Could not clear pod annotation:\")"},{"line_number":74,"context_line":"            return"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        if (driver_utils.is_host_network(pod) or"}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_2747124f","line":73,"range":{"start_line":73,"start_character":0,"end_line":73,"end_character":66},"updated":"2020-03-19 13:00:28.000000000","message":"Please make sure to log whole exception - best to use LOG.exception, it\u0027ll produce traceback manually.","commit_id":"7c97f249ed7afc3d314cc91d6aede7eb4d1f7bd4"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"ec82eb974ad342f64965ff0f81c661b36c55f1cc","unresolved":false,"context_lines":[{"line_number":221,"context_line":"    @staticmethod"},{"line_number":222,"context_line":"    def _is_pod_completed(pod):"},{"line_number":223,"context_line":"        try:"},{"line_number":224,"context_line":"            return ((pod[\u0027status\u0027][\u0027phase\u0027] \u003d\u003d"},{"line_number":225,"context_line":"                    constants.K8S_POD_STATUS_SUCCEEDED) or"},{"line_number":226,"context_line":"                    (pod[\u0027status\u0027][\u0027phase\u0027] \u003d\u003d"},{"line_number":227,"context_line":"                    constants.K8S_POD_STATUS_FAILED))"},{"line_number":228,"context_line":"        except KeyError:"},{"line_number":229,"context_line":"            return False"},{"line_number":230,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1fa4df85_a7a1c2f9","line":227,"range":{"start_line":224,"start_character":0,"end_line":227,"end_character":53},"updated":"2020-03-19 13:00:28.000000000","message":"return pod[\u0027status\u0027][\u0027phase\u0027] in (constants.K8S_POD_STATUS_SUCCEEDED, constants.K8S_POD_STATUS_FAILED)","commit_id":"7c97f249ed7afc3d314cc91d6aede7eb4d1f7bd4"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"f736fd6738401147b15d94df71b51bc54c0b08c9","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                self.on_deleted(pod)"},{"line_number":70,"context_line":"                try:"},{"line_number":71,"context_line":"                    self._set_pod_state(pod, None)"},{"line_number":72,"context_line":"                    raise k_exc.K8sClientException"},{"line_number":73,"context_line":"                except k_exc.K8sClientException:"},{"line_number":74,"context_line":"                    LOG.warning(\"Could not clear pod annotation:\")"},{"line_number":75,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_78a577b5","line":72,"range":{"start_line":72,"start_character":20,"end_line":72,"end_character":50},"updated":"2020-03-23 08:05:55.000000000","message":"shouldn\u0027t this be after L74 instead?","commit_id":"bb439cd772edf011209ec444e5b2803f5e0b166d"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"6e020e76f0d0e54071b44a38b77a695364b3333c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                self.on_deleted(pod)"},{"line_number":70,"context_line":"                try:"},{"line_number":71,"context_line":"                    self._set_pod_state(pod, None)"},{"line_number":72,"context_line":"                    raise k_exc.K8sClientException"},{"line_number":73,"context_line":"                except k_exc.K8sClientException:"},{"line_number":74,"context_line":"                    LOG.warning(\"Could not clear pod annotation:\")"},{"line_number":75,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_f8ffc731","line":72,"range":{"start_line":72,"start_character":20,"end_line":72,"end_character":50},"in_reply_to":"df33271e_78a577b5","updated":"2020-03-23 08:42:18.000000000","message":"+1. Also, shouldn\u0027t a ResourceNotReady be raised when a K8sClientException happens?","commit_id":"bb439cd772edf011209ec444e5b2803f5e0b166d"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"6e020e76f0d0e54071b44a38b77a695364b3333c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                try:"},{"line_number":71,"context_line":"                    self._set_pod_state(pod, None)"},{"line_number":72,"context_line":"                    raise k_exc.K8sClientException"},{"line_number":73,"context_line":"                except k_exc.K8sClientException:"},{"line_number":74,"context_line":"                    LOG.warning(\"Could not clear pod annotation:\")"},{"line_number":75,"context_line":"            return"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_7899f71d","line":73,"range":{"start_line":73,"start_character":16,"end_line":73,"end_character":48},"updated":"2020-03-23 08:42:18.000000000","message":"For safety, it\u0027s also good to catch K8sResourceNotFound and just skip the event.","commit_id":"bb439cd772edf011209ec444e5b2803f5e0b166d"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"4fafee262a37388f8f9eb1ff28f139dddcb0c9b9","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    self._set_pod_state(pod, None)"},{"line_number":72,"context_line":"                    raise k_exc.K8sClientException"},{"line_number":73,"context_line":"                except k_exc.K8sClientException:"},{"line_number":74,"context_line":"                    LOG.warning(\"Could not clear pod annotation:\")"},{"line_number":75,"context_line":"            return"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        if (driver_utils.is_host_network(pod) or"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_18cb8b53","line":74,"range":{"start_line":74,"start_character":20,"end_line":74,"end_character":66},"updated":"2020-03-23 08:15:44.000000000","message":"Please, change it to LOG.excpetion. Also, log message seems somehow unfinished (or the colon meant to be here for following stack trace, but still, LOG.warning will not include it anyway).","commit_id":"bb439cd772edf011209ec444e5b2803f5e0b166d"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"6e020e76f0d0e54071b44a38b77a695364b3333c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                    raise k_exc.K8sClientException"},{"line_number":73,"context_line":"                except k_exc.K8sClientException:"},{"line_number":74,"context_line":"                    LOG.warning(\"Could not clear pod annotation:\")"},{"line_number":75,"context_line":"            return"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        if (driver_utils.is_host_network(pod) or"},{"line_number":78,"context_line":"                not self._is_pod_scheduled(pod)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_f8d6a7c3","line":75,"range":{"start_line":75,"start_character":12,"end_line":75,"end_character":18},"updated":"2020-03-23 08:42:18.000000000","message":"It would be good to add a LOG message stating that the event is skipped due to pod with no state.","commit_id":"bb439cd772edf011209ec444e5b2803f5e0b166d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8993407d0006c3529f3e29b8761152ebd4d6f8ca","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def on_present(self, pod):"},{"line_number":66,"context_line":"        state \u003d driver_utils.get_pod_state(pod)"},{"line_number":67,"context_line":"        if (self._is_pod_completed(pod)):"},{"line_number":68,"context_line":"            if state:"},{"line_number":69,"context_line":"                LOG.debug(\"Pod has completed execution, removing the vifs\")"},{"line_number":70,"context_line":"                self.on_deleted(pod)"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_2621fbb5","line":67,"range":{"start_line":67,"start_character":11,"end_line":67,"end_character":40},"updated":"2020-03-24 10:25:16.000000000","message":"Unnecessary parentheses.","commit_id":"62673dfb8b8c8ba3a68ce52dd6499e447eeb774d"}]}
