)]}'
{"kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"b5bbcd94cec2592bfda00502b6d2575d4aa0eb93","unresolved":true,"context_lines":[{"line_number":52,"context_line":"            self._drv_svc_sg \u003d drivers.ServiceSecurityGroupsDriver.get_instance()"},{"line_number":53,"context_line":"            self._drv_lbaas \u003d drivers.LBaaSDriver.get_instance()"},{"line_number":54,"context_line":"        else:"},{"line_number":55,"context_line":"\t    LOG.debug(\u0027Service disable %s\u0027)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _patch_kuryrnetworkpolicy_crd(self, knp, field, data,"},{"line_number":58,"context_line":"                                      action\u003d\u0027replace\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"894d3885_92296ac0","line":55,"range":{"start_line":55,"start_character":9,"end_line":55,"end_character":14},"updated":"2021-05-11 06:48:45.000000000","message":"Perhaps worth to have it as LOG.warning","commit_id":"55d40a9ab761faa9b55561aefcc916852c0764ee"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"629f8312d1daf53864a956f5c235a084c7632814","unresolved":true,"context_lines":[{"line_number":52,"context_line":"            self._drv_svc_sg \u003d drivers.ServiceSecurityGroupsDriver.get_instance()"},{"line_number":53,"context_line":"            self._drv_lbaas \u003d drivers.LBaaSDriver.get_instance()"},{"line_number":54,"context_line":"        else:"},{"line_number":55,"context_line":"\t    LOG.debug(\u0027Service disable %s\u0027)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _patch_kuryrnetworkpolicy_crd(self, knp, field, data,"},{"line_number":58,"context_line":"                                      action\u003d\u0027replace\u0027):"}],"source_content_type":"text/x-python","patch_set":1,"id":"08547d68_8437ad59","line":55,"range":{"start_line":55,"start_character":24,"end_line":55,"end_character":31},"updated":"2021-05-11 09:28:33.000000000","message":"typo: disabled","commit_id":"55d40a9ab761faa9b55561aefcc916852c0764ee"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"900969ac8b949305254c021caa68599cac57ca7c","unresolved":true,"context_lines":[{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from openstack import exceptions as os_exc"},{"line_number":16,"context_line":"from oslo_config import cfg as oslo_cfg"},{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3e64bf5d_1bd3aaa1","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":39},"updated":"2021-05-13 07:27:00.000000000","message":"you don\u0027t need this, you already have the line below importing it as cfg, so you just need to use cfg.xxxx instead of oslo_cfg.xxxx","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":33250,"name":"CAROLINA CABALLERO LOPEZ","email":"carolina.cl19@gmail.com","username":"carcablop19"},"change_message_id":"8be7680cfe3afcb5bc6432a54157a2978753b37c","unresolved":true,"context_lines":[{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from openstack import exceptions as os_exc"},{"line_number":16,"context_line":"from oslo_config import cfg as oslo_cfg"},{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ed5e621f_358c6720","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":39},"in_reply_to":"3e64bf5d_1bd3aaa1","updated":"2021-05-19 21:57:00.000000000","message":"If I use cfg.CONF.kubernetes.xx I get the following error: \"No such option enable_handler in group [kubernetes]\".","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"325185561da8ac50ef5d25c55b00526db1353285","unresolved":true,"context_lines":[{"line_number":13,"context_line":"# limitations under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from openstack import exceptions as os_exc"},{"line_number":16,"context_line":"from oslo_config import cfg as oslo_cfg"},{"line_number":17,"context_line":"from oslo_config import cfg"},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"e8507367_0871003b","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":39},"in_reply_to":"ed5e621f_358c6720","updated":"2021-05-20 06:41:22.000000000","message":"you should use CONF.kubernetes.xx","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"6b6b20b47a6615b060038c90ab5a4b7d307d8159","unresolved":true,"context_lines":[{"line_number":54,"context_line":"                drivers.ServiceSecurityGroupsDriver.get_instance()"},{"line_number":55,"context_line":"            self._drv_lbaas \u003d drivers.LBaaSDriver.get_instance()"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            LOG.warning(\"Service disabled %s\")"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _patch_kuryrnetworkpolicy_crd(self, knp, field, data,"},{"line_number":60,"context_line":"                                      action\u003d\u0027replace\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa2f0538_d521ca9c","line":57,"range":{"start_line":57,"start_character":12,"end_line":57,"end_character":46},"updated":"2021-05-13 15:58:49.000000000","message":"Missing to allow the %s to be replaced by the name of the service","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"325185561da8ac50ef5d25c55b00526db1353285","unresolved":true,"context_lines":[{"line_number":54,"context_line":"                drivers.ServiceSecurityGroupsDriver.get_instance()"},{"line_number":55,"context_line":"            self._drv_lbaas \u003d drivers.LBaaSDriver.get_instance()"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            LOG.warning(\"Service disabled %s\")"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _patch_kuryrnetworkpolicy_crd(self, knp, field, data,"},{"line_number":60,"context_line":"                                      action\u003d\u0027replace\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"666133d2_7dbc48e0","line":57,"range":{"start_line":57,"start_character":12,"end_line":57,"end_character":46},"in_reply_to":"484f980d_1bb81705","updated":"2021-05-20 06:41:22.000000000","message":"this is not about the k8s service, but about the Service/Endpoint handlers, and the policy driver being enabled or not. As this is used to decide to load the lbaas and svc_sg drivers, I would simply print something like: \"ServiceSecurityGroup and LBaaS driver not loaded as Service/Endpoint handlers and policy driver are not enabled\".","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":33250,"name":"CAROLINA CABALLERO LOPEZ","email":"carolina.cl19@gmail.com","username":"carcablop19"},"change_message_id":"8be7680cfe3afcb5bc6432a54157a2978753b37c","unresolved":true,"context_lines":[{"line_number":54,"context_line":"                drivers.ServiceSecurityGroupsDriver.get_instance()"},{"line_number":55,"context_line":"            self._drv_lbaas \u003d drivers.LBaaSDriver.get_instance()"},{"line_number":56,"context_line":"        else:"},{"line_number":57,"context_line":"            LOG.warning(\"Service disabled %s\")"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def _patch_kuryrnetworkpolicy_crd(self, knp, field, data,"},{"line_number":60,"context_line":"                                      action\u003d\u0027replace\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"484f980d_1bb81705","line":57,"range":{"start_line":57,"start_character":12,"end_line":57,"end_character":46},"in_reply_to":"fa2f0538_d521ca9c","updated":"2021-05-19 21:57:00.000000000","message":"How could I get the name of the service ?, I could get it in the following way: namespaces \u003d service [\u0027metadata\u0027], [\u0027namespace\u0027], therefore I would have to modify my function, and pass the service as a parameter ?. Or remove the %s.\nchecking, the previous option is not valid.","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"900969ac8b949305254c021caa68599cac57ca7c","unresolved":true,"context_lines":[{"line_number":186,"context_line":"        # FIXME(dulek): We should not need this one day."},{"line_number":187,"context_line":"        policy \u003d self._get_networkpolicy(knp[\u0027metadata\u0027][\u0027annotations\u0027]"},{"line_number":188,"context_line":"                                         [\u0027networkPolicyLink\u0027])"},{"line_number":189,"context_line":"        if (self._is_service_enable() and pods_to_update and"},{"line_number":190,"context_line":"                CONF.octavia_defaults.enforce_sg_rules and"},{"line_number":191,"context_line":"                not self._is_egress_only_policy(policy)):"},{"line_number":192,"context_line":"            # NOTE(ltomasbo): only need to change services if the pods that"}],"source_content_type":"text/x-python","patch_set":3,"id":"48a98c33_be417746","line":189,"range":{"start_line":189,"start_character":12,"end_line":189,"end_character":38},"updated":"2021-05-13 07:27:00.000000000","message":"perhaps instead of having to call this function all the time, it is better to define a variable at __init__ function and use it here, for example self._service_enabled","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":33250,"name":"CAROLINA CABALLERO LOPEZ","email":"carolina.cl19@gmail.com","username":"carcablop19"},"change_message_id":"8be7680cfe3afcb5bc6432a54157a2978753b37c","unresolved":true,"context_lines":[{"line_number":186,"context_line":"        # FIXME(dulek): We should not need this one day."},{"line_number":187,"context_line":"        policy \u003d self._get_networkpolicy(knp[\u0027metadata\u0027][\u0027annotations\u0027]"},{"line_number":188,"context_line":"                                         [\u0027networkPolicyLink\u0027])"},{"line_number":189,"context_line":"        if (self._is_service_enable() and pods_to_update and"},{"line_number":190,"context_line":"                CONF.octavia_defaults.enforce_sg_rules and"},{"line_number":191,"context_line":"                not self._is_egress_only_policy(policy)):"},{"line_number":192,"context_line":"            # NOTE(ltomasbo): only need to change services if the pods that"}],"source_content_type":"text/x-python","patch_set":3,"id":"5afe47a6_bf888785","line":189,"range":{"start_line":189,"start_character":12,"end_line":189,"end_character":38},"in_reply_to":"48a98c33_be417746","updated":"2021-05-19 21:57:00.000000000","message":"Or should I rather define this function elsewhere and then call it here, as you are indicating? For example could you define it in utils.py or lbaas.py?","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"325185561da8ac50ef5d25c55b00526db1353285","unresolved":true,"context_lines":[{"line_number":186,"context_line":"        # FIXME(dulek): We should not need this one day."},{"line_number":187,"context_line":"        policy \u003d self._get_networkpolicy(knp[\u0027metadata\u0027][\u0027annotations\u0027]"},{"line_number":188,"context_line":"                                         [\u0027networkPolicyLink\u0027])"},{"line_number":189,"context_line":"        if (self._is_service_enable() and pods_to_update and"},{"line_number":190,"context_line":"                CONF.octavia_defaults.enforce_sg_rules and"},{"line_number":191,"context_line":"                not self._is_egress_only_policy(policy)):"},{"line_number":192,"context_line":"            # NOTE(ltomasbo): only need to change services if the pods that"}],"source_content_type":"text/x-python","patch_set":3,"id":"b28073dc_e8f85042","line":189,"range":{"start_line":189,"start_character":12,"end_line":189,"end_character":38},"in_reply_to":"5afe47a6_bf888785","updated":"2021-05-20 06:41:22.000000000","message":"if the function is only used in this file, I would live it here. But as the function is called on the __init__, I would initialize a variable (e.g., _service_driver_enabled), and then use it here (instead of having to re-calculate the value by calling yet again the function)","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"6b6b20b47a6615b060038c90ab5a4b7d307d8159","unresolved":true,"context_lines":[{"line_number":216,"context_line":"    def _is_service_enable(self):"},{"line_number":217,"context_line":"        enable_handlers \u003d oslo_cfg.CONF.kubernetes.enabled_handlers"},{"line_number":218,"context_line":"        svc_sg_driver \u003d oslo_cfg.CONF.kubernetes.service_security_groups_driver"},{"line_number":219,"context_line":"        return \u0027service\u0027 in enable_handlers and svc_sg_driver \u003d\u003d \u0027policy\u0027"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def _is_service_affected(self, service, affected_pods):"},{"line_number":222,"context_line":"        svc_namespace \u003d service[\u0027metadata\u0027][\u0027namespace\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"fd9ecd5f_7e9bf15f","line":219,"updated":"2021-05-13 15:58:49.000000000","message":"\u0027service\u0027 and \u0027endpoints\u0027 handler must be enabled.","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"325185561da8ac50ef5d25c55b00526db1353285","unresolved":true,"context_lines":[{"line_number":216,"context_line":"    def _is_service_enable(self):"},{"line_number":217,"context_line":"        enable_handlers \u003d oslo_cfg.CONF.kubernetes.enabled_handlers"},{"line_number":218,"context_line":"        svc_sg_driver \u003d oslo_cfg.CONF.kubernetes.service_security_groups_driver"},{"line_number":219,"context_line":"        return \u0027service\u0027 in enable_handlers and svc_sg_driver \u003d\u003d \u0027policy\u0027"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def _is_service_affected(self, service, affected_pods):"},{"line_number":222,"context_line":"        svc_namespace \u003d service[\u0027metadata\u0027][\u0027namespace\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"c0412fdc_c9f1afd1","line":219,"in_reply_to":"fd9ecd5f_7e9bf15f","updated":"2021-05-20 06:41:22.000000000","message":"+1","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"900969ac8b949305254c021caa68599cac57ca7c","unresolved":true,"context_lines":[{"line_number":292,"context_line":"                services \u003d driver_utils.get_services("},{"line_number":293,"context_line":"                    knp[\u0027metadata\u0027][\u0027namespace\u0027])"},{"line_number":294,"context_line":"                for svc in services.get(\u0027items\u0027):"},{"line_number":295,"context_line":"                    if not svc[\u0027spec\u0027].get(\u0027selector\u0027) or \\"},{"line_number":296,"context_line":"                            not self._is_service_affected(svc, pods_to_update):"},{"line_number":297,"context_line":"                        continue"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"                    sgs \u003d self._drv_svc_sg.get_security_groups(svc, project_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fee2d86b_7e9fd768","line":296,"range":{"start_line":295,"start_character":1,"end_line":296,"end_character":79},"updated":"2021-05-13 07:27:00.000000000","message":"you should use () instead of \\","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"325185561da8ac50ef5d25c55b00526db1353285","unresolved":true,"context_lines":[{"line_number":292,"context_line":"                services \u003d driver_utils.get_services("},{"line_number":293,"context_line":"                    knp[\u0027metadata\u0027][\u0027namespace\u0027])"},{"line_number":294,"context_line":"                for svc in services.get(\u0027items\u0027):"},{"line_number":295,"context_line":"                    if not svc[\u0027spec\u0027].get(\u0027selector\u0027) or \\"},{"line_number":296,"context_line":"                            not self._is_service_affected(svc, pods_to_update):"},{"line_number":297,"context_line":"                        continue"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"                    sgs \u003d self._drv_svc_sg.get_security_groups(svc, project_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"4aa4ba6e_5ec76827","line":296,"range":{"start_line":295,"start_character":1,"end_line":296,"end_character":79},"in_reply_to":"37b8fe70_ae76d499","updated":"2021-05-20 06:41:22.000000000","message":"yeah, both options are acceptable, but OpenStack community has a preference for the (), so no need to change it here","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"},{"author":{"_account_id":33250,"name":"CAROLINA CABALLERO LOPEZ","email":"carolina.cl19@gmail.com","username":"carcablop19"},"change_message_id":"8be7680cfe3afcb5bc6432a54157a2978753b37c","unresolved":true,"context_lines":[{"line_number":292,"context_line":"                services \u003d driver_utils.get_services("},{"line_number":293,"context_line":"                    knp[\u0027metadata\u0027][\u0027namespace\u0027])"},{"line_number":294,"context_line":"                for svc in services.get(\u0027items\u0027):"},{"line_number":295,"context_line":"                    if not svc[\u0027spec\u0027].get(\u0027selector\u0027) or \\"},{"line_number":296,"context_line":"                            not self._is_service_affected(svc, pods_to_update):"},{"line_number":297,"context_line":"                        continue"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"                    sgs \u003d self._drv_svc_sg.get_security_groups(svc, project_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"37b8fe70_ae76d499","line":296,"range":{"start_line":295,"start_character":1,"end_line":296,"end_character":79},"in_reply_to":"fee2d86b_7e9fd768","updated":"2021-05-19 21:57:00.000000000","message":"I understand that both options would be acceptable. I changed it when the pep8 error was generated. I will change it.","commit_id":"e2ce16089b3032812450c075418d8c0b6f8bd25e"}]}
