)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"e2fd028d63c9e7cf8a2888196c752a21ad1de69a","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Remove ep_slices from klb on endpoint delete event"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Bug 1939512"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Ia0a9ae82c46a43a64c916194a272f0a85618fa34"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"a7537880_449ee13f","line":9,"updated":"2021-08-11 07:16:06.000000000","message":"Perhaps something like:\n\n  Closes-Bug: 1939512\n\nwould be more appropriate :)","commit_id":"178156329090704ab44b0677c49f0a346c6e3dcd"}],"kuryr_kubernetes/controller/handlers/lbaas.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"ce98dd294bf7f78adc5a0cff228f1dccaecc5638","unresolved":true,"context_lines":[{"line_number":453,"context_line":"                                          \u0027endpointSlices\u0027,"},{"line_number":454,"context_line":"                                          action\u003d\u0027remove\u0027)"},{"line_number":455,"context_line":"        except k_exc.K8sResourceNotFound:"},{"line_number":456,"context_line":"            LOG.debug(\u0027KuryrLoadBalancer CRD not found %s\u0027, loadbalancer_crd)"},{"line_number":457,"context_line":"            return None"},{"line_number":458,"context_line":"        except k_exc.K8sClientException:"},{"line_number":459,"context_line":"            LOG.exception(\u0027Error updating KuryrLoadBalancer CRD %s\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"6b4f0623_fe64ab1f","line":456,"range":{"start_line":456,"start_character":23,"end_line":456,"end_character":57},"updated":"2021-08-11 06:58:51.000000000","message":"perhaps adding a bit more info here may help debugging in case of problems, something like \"KuryrLoadBalancer CRD not found when trying to deleted the endpointSlices\"","commit_id":"b51d1b86137da2eec0db9da68cb3facced924998"},{"author":{"_account_id":19521,"name":"Robin Cernin","email":"rcernin@redhat.com","username":"rcernin"},"change_message_id":"7b0348a8ae2e30c9204605146fa6cfe7570df8e5","unresolved":true,"context_lines":[{"line_number":453,"context_line":"                                          \u0027endpointSlices\u0027,"},{"line_number":454,"context_line":"                                          action\u003d\u0027remove\u0027)"},{"line_number":455,"context_line":"        except k_exc.K8sResourceNotFound:"},{"line_number":456,"context_line":"            LOG.debug(\u0027KuryrLoadBalancer CRD not found %s\u0027, loadbalancer_crd)"},{"line_number":457,"context_line":"            return None"},{"line_number":458,"context_line":"        except k_exc.K8sClientException:"},{"line_number":459,"context_line":"            LOG.exception(\u0027Error updating KuryrLoadBalancer CRD %s\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"77fe7659_231d5837","line":456,"range":{"start_line":456,"start_character":23,"end_line":456,"end_character":57},"in_reply_to":"6b4f0623_fe64ab1f","updated":"2021-08-11 07:47:29.000000000","message":"There is another debug message containing patch operation and path, and it\u0027s printed before this one: https://opendev.org/openstack/kuryr-kubernetes/src/branch/master/kuryr_kubernetes/k8s_client.py#L190-L191","commit_id":"b51d1b86137da2eec0db9da68cb3facced924998"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e92ab2382d1eef818b1ddcd6de957ec5214d3948","unresolved":true,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def on_deleted(self, endpoints, *args, **kwargs):"},{"line_number":336,"context_line":"        k8s \u003d clients.get_kubernetes_client()"},{"line_number":337,"context_line":"        loadbalancer_crd \u003d k8s.get_loadbalancer_crd(endpoints)"},{"line_number":338,"context_line":"        if self._has_endpoints(loadbalancer_crd):"},{"line_number":339,"context_line":"            self._remove_endpoints(loadbalancer_crd)"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def _has_pods(self, endpoints):"},{"line_number":342,"context_line":"        ep_subsets \u003d endpoints.get(\u0027subsets\u0027, [])"}],"source_content_type":"text/x-python","patch_set":4,"id":"b2b0bd4b_7a96ac22","line":339,"range":{"start_line":337,"start_character":0,"end_line":339,"end_character":52},"updated":"2021-08-11 08:12:09.000000000","message":"This is prone to race conditions - if `endpointSlices` got removed by something else between the API calls we\u0027d get an uncaught exception here (K8sUnprocessableEntity IIRC). I\u0027d rather just patch without checking and if K8sUnprocessableEntity happens - ignore it.","commit_id":"848f797c53066925b0e1c766b9b885e27a1c9e36"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e92ab2382d1eef818b1ddcd6de957ec5214d3948","unresolved":true,"context_lines":[{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def _has_endpoints(self, loadbalancer_crd):"},{"line_number":350,"context_line":"        ep_slices \u003d loadbalancer_crd[\u0027spec\u0027].get(\u0027endpointSlices\u0027, [])"},{"line_number":351,"context_line":"        if not ep_slices:"},{"line_number":352,"context_line":"            return False"},{"line_number":353,"context_line":"        return True"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def _convert_subsets_to_endpointslice(self, endpoints_obj):"},{"line_number":356,"context_line":"        endpointslices \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"40f67b0e_fa6c2389","line":353,"range":{"start_line":351,"start_character":0,"end_line":353,"end_character":19},"updated":"2021-08-11 08:12:09.000000000","message":"That could be `return bool(ep_slices), but I don\u0027t think this method will be needed.","commit_id":"848f797c53066925b0e1c766b9b885e27a1c9e36"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e92ab2382d1eef818b1ddcd6de957ec5214d3948","unresolved":true,"context_lines":[{"line_number":447,"context_line":"    def _remove_endpoints(self, loadbalancer_crd):"},{"line_number":448,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"},{"line_number":449,"context_line":"        try:"},{"line_number":450,"context_line":"            status \u003d kubernetes.patch_crd(\u0027spec\u0027,"},{"line_number":451,"context_line":"                                          utils.get_res_link("},{"line_number":452,"context_line":"                                              loadbalancer_crd),"},{"line_number":453,"context_line":"                                          \u0027endpointSlices\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"a321eab5_4bb5caa5","line":450,"range":{"start_line":450,"start_character":12,"end_line":450,"end_character":18},"updated":"2021-08-11 08:12:09.000000000","message":"You\u0027re not using status anywhere?","commit_id":"848f797c53066925b0e1c766b9b885e27a1c9e36"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"e3615ed71a1801d94f87acf25841e62c82a7ed5c","unresolved":true,"context_lines":[{"line_number":456,"context_line":"            LOG.exception(\u0027Error updating KuryrLoadBalancer CRD %s\u0027,"},{"line_number":457,"context_line":"                          loadbalancer_crd)"},{"line_number":458,"context_line":"            raise"},{"line_number":459,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"af2d35df_d0c2e776","line":459,"updated":"2021-08-11 08:59:54.000000000","message":"You don\u0027t use return value anywhere in the code, why returning boolean?","commit_id":"869dd8c2d0d6eee7d0e390ad059ada5a43f9c2b1"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"45de581dd893d8b15484970f966ebe609176f3a9","unresolved":true,"context_lines":[{"line_number":446,"context_line":"                                 \u0027endpointSlices\u0027,"},{"line_number":447,"context_line":"                                 action\u003d\u0027remove\u0027)"},{"line_number":448,"context_line":"        except k_exc.K8sResourceNotFound:"},{"line_number":449,"context_line":"            LOG.debug(\u0027KuryrLoadBalancer CRD not found %s\u0027, loadbalancer_crd)"},{"line_number":450,"context_line":"        except k_exc.K8sUnprocessableEntity:"},{"line_number":451,"context_line":"            LOG.warning(\u0027KuryrLoadBalancer %s modified, retrying later.\u0027,"},{"line_number":452,"context_line":"                        utils.get_res_unique_name(loadbalancer_crd))"}],"source_content_type":"text/x-python","patch_set":8,"id":"70a5a3ea_40b6e80c","line":449,"range":{"start_line":449,"start_character":60,"end_line":449,"end_character":76},"updated":"2021-08-11 10:30:50.000000000","message":"Could we just use a name here instead of the full structure? You can use utils.get_res_unique_name(). And yes, I see where this comes from. ;)","commit_id":"a89b8ef3937bea0bfc10ae1be27547b1b928d5bd"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"45de581dd893d8b15484970f966ebe609176f3a9","unresolved":true,"context_lines":[{"line_number":448,"context_line":"        except k_exc.K8sResourceNotFound:"},{"line_number":449,"context_line":"            LOG.debug(\u0027KuryrLoadBalancer CRD not found %s\u0027, loadbalancer_crd)"},{"line_number":450,"context_line":"        except k_exc.K8sUnprocessableEntity:"},{"line_number":451,"context_line":"            LOG.warning(\u0027KuryrLoadBalancer %s modified, retrying later.\u0027,"},{"line_number":452,"context_line":"                        utils.get_res_unique_name(loadbalancer_crd))"},{"line_number":453,"context_line":"        except k_exc.K8sClientException:"},{"line_number":454,"context_line":"            LOG.exception(\u0027Error updating KuryrLoadBalancer CRD %s\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"957c5c3e_897c5adc","line":451,"range":{"start_line":451,"start_character":55,"end_line":451,"end_character":70},"updated":"2021-08-11 10:30:50.000000000","message":"`on_deleted` isn\u0027t something that will be retried, this is a bit misleading.","commit_id":"a89b8ef3937bea0bfc10ae1be27547b1b928d5bd"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"45de581dd893d8b15484970f966ebe609176f3a9","unresolved":true,"context_lines":[{"line_number":452,"context_line":"                        utils.get_res_unique_name(loadbalancer_crd))"},{"line_number":453,"context_line":"        except k_exc.K8sClientException:"},{"line_number":454,"context_line":"            LOG.exception(\u0027Error updating KuryrLoadBalancer CRD %s\u0027,"},{"line_number":455,"context_line":"                          loadbalancer_crd)"},{"line_number":456,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":8,"id":"2f3a801a_8212546b","line":455,"range":{"start_line":455,"start_character":26,"end_line":455,"end_character":42},"updated":"2021-08-11 10:30:50.000000000","message":"Same here, no need to log full CRD.","commit_id":"a89b8ef3937bea0bfc10ae1be27547b1b928d5bd"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"8fdd57f573bc36c621c0f551324a05ac7293aa11","unresolved":true,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def on_deleted(self, endpoints, *args, **kwargs):"},{"line_number":336,"context_line":"        k8s \u003d clients.get_kubernetes_client()"},{"line_number":337,"context_line":"        loadbalancer_crd \u003d k8s.get_loadbalancer_crd(endpoints)"},{"line_number":338,"context_line":"        self._remove_endpoints(loadbalancer_crd)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def _has_pods(self, endpoints):"}],"source_content_type":"text/x-python","patch_set":9,"id":"4ff6e651_e62a73de","line":337,"range":{"start_line":337,"start_character":0,"end_line":337,"end_character":62},"updated":"2021-08-12 09:52:57.000000000","message":"Ah, I just noticed this. So technically this call is not really required, we have a rule that KuryrLoadBalancer will have the same name as Endpoints object, so you can build it without fetching the actual object you want to patch.\n\nYou can see how it\u0027s built in line 406 of this file. Maybe it\u0027s worth extracting into a utility method.","commit_id":"07e20f90fcfb7d4e5c26454de1001557e6b80335"},{"author":{"_account_id":19521,"name":"Robin Cernin","email":"rcernin@redhat.com","username":"rcernin"},"change_message_id":"0413e418d5348fe139ed6ef71ddca6e9317be768","unresolved":true,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def on_deleted(self, endpoints, *args, **kwargs):"},{"line_number":336,"context_line":"        k8s \u003d clients.get_kubernetes_client()"},{"line_number":337,"context_line":"        loadbalancer_crd \u003d k8s.get_loadbalancer_crd(endpoints)"},{"line_number":338,"context_line":"        self._remove_endpoints(loadbalancer_crd)"},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"    def _has_pods(self, endpoints):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7c829bcf_2d40cc44","line":337,"range":{"start_line":337,"start_character":0,"end_line":337,"end_character":62},"in_reply_to":"4ff6e651_e62a73de","updated":"2021-08-12 21:17:49.000000000","message":"I noticed the same thing that basically we have to have same name, I actually tried creating different name but it didn\u0027t work. Yeah. I will modify this, but this same method is used everywhere. I just tried to stick as close to the project code as possible.","commit_id":"07e20f90fcfb7d4e5c26454de1001557e6b80335"}],"kuryr_kubernetes/tests/unit/controller/handlers/test_lbaas.py":[{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"4b46d84c868c4e94ddbf74f1f0e8a89e4c90a3bc","unresolved":true,"context_lines":[{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        k8s.patch_crd.side_effect \u003d k_exc.K8sClientException(self._ep)"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        self.assertRaises(k_exc.K8sClientException,"},{"line_number":451,"context_line":"                          k8s.patch_crd)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    @mock.patch(\u0027kuryr_kubernetes.clients.get_kubernetes_client\u0027)"},{"line_number":454,"context_line":"    def test__remove_endpoints_unprocessable_entity(self, get_k8s_client):"}],"source_content_type":"text/x-python","patch_set":17,"id":"ea7b0ffe_4aea6209","line":451,"range":{"start_line":450,"start_character":8,"end_line":451,"end_character":40},"updated":"2021-08-13 16:47:57.000000000","message":"instead of k8s.patch_crd, you should check tested method (_remove_endpoints), i.e.:\n\n  self.assertRaises(k_exc.K8sClientException,\n                    h_lbaas.EndpointsHandler._remove_endpoints,\n                    self, self._ep)","commit_id":"96f1aa87ba992b346fd3d47b2df5794b2b822447"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"4b46d84c868c4e94ddbf74f1f0e8a89e4c90a3bc","unresolved":true,"context_lines":[{"line_number":450,"context_line":"        self.assertRaises(k_exc.K8sClientException,"},{"line_number":451,"context_line":"                          k8s.patch_crd)"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"    @mock.patch(\u0027kuryr_kubernetes.clients.get_kubernetes_client\u0027)"},{"line_number":454,"context_line":"    def test__remove_endpoints_unprocessable_entity(self, get_k8s_client):"},{"line_number":455,"context_line":"        k8s \u003d mock.Mock()"},{"line_number":456,"context_line":"        get_k8s_client.return_value \u003d k8s"},{"line_number":457,"context_line":"        h_lbaas.EndpointsHandler._remove_endpoints(self, self._ep)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        k8s.patch_crd.side_effect \u003d k_exc.K8sUnprocessableEntity(self._ep)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        self.assertRaises(k_exc.K8sUnprocessableEntity,"},{"line_number":462,"context_line":"                          k8s.patch_crd)"}],"source_content_type":"text/x-python","patch_set":17,"id":"b1f387dd_94bbd827","line":462,"range":{"start_line":453,"start_character":0,"end_line":462,"end_character":40},"updated":"2021-08-13 16:47:57.000000000","message":"this test, and test__remove_endpoints_not_found doesn\u0027t make any sense. I guess, we could either skip it, or patch LOG to check if methods warning/debug was called.","commit_id":"96f1aa87ba992b346fd3d47b2df5794b2b822447"}],"kuryr_kubernetes/utils.py":[{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"599d311b525c966020b77af2e8e648d0f53d0fdb","unresolved":true,"context_lines":[{"line_number":92,"context_line":"def get_klb_crd_path(obj):"},{"line_number":93,"context_line":"    \"\"\"Return klb crd path from provided resource\"\"\""},{"line_number":94,"context_line":"    namespace \u003d obj[\u0027metadata\u0027][\u0027namespace\u0027]"},{"line_number":95,"context_line":"    lb_name \u003d obj[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    return (f\"{constants.K8S_API_CRD_NAMESPACES}/\""},{"line_number":98,"context_line":"            f\"{namespace}/\""}],"source_content_type":"text/x-python","patch_set":20,"id":"10fffa29_42679a09","line":95,"range":{"start_line":95,"start_character":4,"end_line":95,"end_character":11},"updated":"2021-08-16 10:14:36.000000000","message":"super tiny (no need to avoid merging): the lb name is composed by namespace+name, consequently this variable might correspond to the k8s_resource_name instead","commit_id":"164095b0e71bdb3712494e060ad880b9560c87aa"}],"test-requirements.txt":[{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"cf31bdc38539dd9f020affd6aa5fc1e02cf570ff","unresolved":true,"context_lines":[{"line_number":7,"context_line":"coverage!\u003d4.4,\u003e\u003d4.0 # Apache-2.0"},{"line_number":8,"context_line":"ddt\u003e\u003d1.0.1 # MIT"},{"line_number":9,"context_line":"docutils\u003e\u003d0.11 # OSI-Approved Open Source, Public Domain"},{"line_number":10,"context_line":"oslo.log\u003e\u003d3.36.0 # Apache-2.0"},{"line_number":11,"context_line":"python-subunit\u003e\u003d1.0.0 # Apache-2.0/BSD"},{"line_number":12,"context_line":"stestr\u003e\u003d1.0.0 # Apache-2.0"},{"line_number":13,"context_line":"oslotest\u003e\u003d3.2.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":19,"id":"8ace2c24_4dc8b1c4","line":10,"updated":"2021-08-14 06:38:51.000000000","message":"You don\u0027t need to add this here. It\u0027s already on requirements.txt.","commit_id":"a708c80aaf61c8120761a9b4ea8215defd6e4190"}]}
