)]}'
{"kuryr_kubernetes/controller/handlers/vif.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"2fed8ab6f6c0d9ffc91d50a7cb3056680d1064b4","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        # finalizer exists."},{"line_number":77,"context_line":"        k8s \u003d clients.get_kubernetes_client()"},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            k8s.add_finalizer(pod, constants.POD_FINALIZER)"},{"line_number":80,"context_line":"        except k_exc.K8sClientException as ex:"},{"line_number":81,"context_line":"            # NOTE(gryf) It might happen, that pod will be deleted even before"},{"line_number":82,"context_line":"            # we got here."}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_a2e5b23a","line":79,"range":{"start_line":79,"start_character":16,"end_line":79,"end_character":29},"updated":"2020-09-04 11:28:01.000000000","message":"According to logs in https://bugzilla.redhat.com/show_bug.cgi?id\u003d1867534 it\u0027s either K8sForbidden or K8sNotFound. I\u0027d rather handle both cases inside add_finalizer and change it to return True if adding was successful or False if either resource got deleted or is being deleted. That way we can easily fix it for all CRDs in a single patch, as this will affect other too.","commit_id":"180ebef73314f0cc0d1be7f1e501aa4117569f50"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"c067015972158445ecd5e4c0106484c047a09e5d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        k8s \u003d clients.get_kubernetes_client()"},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            k8s.add_finalizer(pod, constants.POD_FINALIZER)"},{"line_number":80,"context_line":"        except k_exc.K8sClientException as ex:"},{"line_number":81,"context_line":"            # NOTE(gryf) It might happen, that pod will be deleted even before"},{"line_number":82,"context_line":"            # we got here."},{"line_number":83,"context_line":"            LOG.error(\u0027Failed to add finalizer to pod object: %s\u0027, ex)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_279ed406","line":80,"range":{"start_line":80,"start_character":8,"end_line":80,"end_character":46},"updated":"2020-09-04 10:58:34.000000000","message":"I\u0027m not sure if we care about other cases than 404 (pod not found) and 422 (forbidden to add to finalizers list to object being deleted). Perhaps parsing k8s message and get the error code might be good thing to have?","commit_id":"180ebef73314f0cc0d1be7f1e501aa4117569f50"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"9bd3382e24a0dd83530cdf45379725d3db09730d","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        k8s \u003d clients.get_kubernetes_client()"},{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            k8s.add_finalizer(pod, constants.POD_FINALIZER)"},{"line_number":80,"context_line":"        except k_exc.K8sClientException as ex:"},{"line_number":81,"context_line":"            # NOTE(gryf) It might happen, that pod will be deleted even before"},{"line_number":82,"context_line":"            # we got here."},{"line_number":83,"context_line":"            LOG.error(\u0027Failed to add finalizer to pod object: %s\u0027, ex)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_a262d2d6","line":80,"range":{"start_line":80,"start_character":8,"end_line":80,"end_character":46},"in_reply_to":"9f560f44_279ed406","updated":"2020-09-04 11:19:29.000000000","message":"What if there is another client exception? shouldn\u0027t we raise a ResourceNotReady instead to retry? If the object is gone it will be simple dropped","commit_id":"180ebef73314f0cc0d1be7f1e501aa4117569f50"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"9bd3382e24a0dd83530cdf45379725d3db09730d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        try:"},{"line_number":79,"context_line":"            k8s.add_finalizer(pod, constants.POD_FINALIZER)"},{"line_number":80,"context_line":"        except k_exc.K8sClientException as ex:"},{"line_number":81,"context_line":"            # NOTE(gryf) It might happen, that pod will be deleted even before"},{"line_number":82,"context_line":"            # we got here."},{"line_number":83,"context_line":"            LOG.error(\u0027Failed to add finalizer to pod object: %s\u0027, ex)"},{"line_number":84,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_c277069f","line":81,"range":{"start_line":81,"start_character":40,"end_line":81,"end_character":41},"updated":"2020-09-04 11:19:29.000000000","message":"no need for \",\"","commit_id":"180ebef73314f0cc0d1be7f1e501aa4117569f50"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"2fed8ab6f6c0d9ffc91d50a7cb3056680d1064b4","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        except k_exc.K8sClientException as ex:"},{"line_number":81,"context_line":"            # NOTE(gryf) It might happen, that pod will be deleted even before"},{"line_number":82,"context_line":"            # we got here."},{"line_number":83,"context_line":"            LOG.error(\u0027Failed to add finalizer to pod object: %s\u0027, ex)"},{"line_number":84,"context_line":"            return"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        if self._move_annotations_to_crd(pod):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_22cb62a5","line":83,"range":{"start_line":83,"start_character":0,"end_line":83,"end_character":70},"updated":"2020-09-04 11:28:01.000000000","message":"I wouldn\u0027t log it if it\u0027s K8sForbidden or K8sNotFound.","commit_id":"180ebef73314f0cc0d1be7f1e501aa4117569f50"}]}
