)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4598a45a6a42f7b353512ce9cd8beae8bbbf280d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"81849463_86aaf9ae","updated":"2024-09-24 21:53:22.000000000","message":"Would this also apply to the almost identical dhcp-agent code?","commit_id":"8dded016f59e4a021028a75815f5c28ddad0205e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"7f4556efbcb94e6cc26fc187177dccea1f5138f0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"29e71843_9477b42f","updated":"2024-09-24 13:37:34.000000000","message":"check experimental","commit_id":"8dded016f59e4a021028a75815f5c28ddad0205e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"435ea8829091bac238fb8b26371b6c44c58a9f4f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"4aae8698_9219bf29","updated":"2024-09-23 06:19:14.000000000","message":"recheck neutron-tempest-plugin-ovn-enforce-scope-old-defaults","commit_id":"8dded016f59e4a021028a75815f5c28ddad0205e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"fbe8026656c0fe4f6a228715257f8d74927c41bd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"8615b20a_72a75d5a","updated":"2024-09-24 13:37:27.000000000","message":"same result: non related errors","commit_id":"8dded016f59e4a021028a75815f5c28ddad0205e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f65c69f50d69415411f37543e8556865cc11f7c8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"45cdf49a_f514b820","in_reply_to":"81849463_86aaf9ae","updated":"2024-09-25 06:18:16.000000000","message":"I think so. I\u0027ll open a sibling LP bug for the DHCP agent.","commit_id":"8dded016f59e4a021028a75815f5c28ddad0205e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"685ffd9c1d217a974b7a422042fe685542342a25","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"28f5034b_efa74ef0","updated":"2024-10-01 18:05:33.000000000","message":"This is incomplete review; I will get back to the patch later. Just one question about the reload_cfg flag for now.","commit_id":"b92ba6b1ce9dadde5c3e1937a0f85a637def7c3a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"75ec711c_525b9c32","updated":"2024-10-04 21:17:43.000000000","message":"I left some comments, but all of them are quite minor. I am ready to +2 this after a respin that would fix several issues with docstrings.","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cb5b7208596258a2f19fe01d81386d5e7c6c6433","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"797e70a2_bc419f97","updated":"2024-10-07 16:37:26.000000000","message":"Soft -1","commit_id":"021bef7fec11f8a9f0521551c72f7ce11b6626ee"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a975cc9145db39dbff9c6218d1ee5b4c0d3a68e5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"2f25d445_ec890bc5","updated":"2024-10-08 08:14:52.000000000","message":"recheck neutron-functional-with-uwsgi","commit_id":"7b7f8d986a4f818d289149c6960c9eb8b62b432d"}],"neutron/agent/metadata/driver_base.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1cf92e1a61bcfd0f7e8d529e64c2625279bea252","unresolved":true,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    @classmethod"},{"line_number":150,"context_line":"    def read_config_file(cls, uuid, state_path):"},{"line_number":151,"context_line":"        \"\"\"Returns a list of strings with the content of the conf file\"\"\""},{"line_number":152,"context_line":"        cfg_path \u003d os.path.join("},{"line_number":153,"context_line":"            cls.get_config_path(state_path), \u0027%s.conf\u0027 % uuid)"},{"line_number":154,"context_line":"        return linux_utils.read_if_exists(cfg_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"c110cc1f_d74a0f03","line":151,"updated":"2024-09-26 18:06:09.000000000","message":"Nit: imperative - return","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    @classmethod"},{"line_number":150,"context_line":"    def read_config_file(cls, uuid, state_path):"},{"line_number":151,"context_line":"        \"\"\"Returns a list of strings with the content of the conf file\"\"\""},{"line_number":152,"context_line":"        cfg_path \u003d os.path.join("},{"line_number":153,"context_line":"            cls.get_config_path(state_path), \u0027%s.conf\u0027 % uuid)"},{"line_number":154,"context_line":"        return linux_utils.read_if_exists(cfg_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":6,"id":"300a1ac4_d7586825","line":151,"in_reply_to":"c110cc1f_d74a0f03","updated":"2024-09-27 08:13:17.000000000","message":"Done","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1cf92e1a61bcfd0f7e8d529e64c2625279bea252","unresolved":true,"context_lines":[{"line_number":162,"context_line":"            \"%s.conf\" % uuid)"},{"line_number":163,"context_line":"        linux_utils.delete_if_exists(cfg_path, run_as_root\u003dTrue)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @classmethod"},{"line_number":166,"context_line":"    def get_ipv6_listener(cls, host_ipv6, port, bind_interface):"},{"line_number":167,"context_line":"        return \u0027bind %s:%s interface %s\u0027 % (host_ipv6, port, bind_interface)"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"e88e64c9_936b8abf","line":165,"range":{"start_line":165,"start_character":5,"end_line":165,"end_character":16},"updated":"2024-09-26 18:06:09.000000000","message":"`@staticmethod` ? `cls` is not used","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            \"%s.conf\" % uuid)"},{"line_number":163,"context_line":"        linux_utils.delete_if_exists(cfg_path, run_as_root\u003dTrue)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    @classmethod"},{"line_number":166,"context_line":"    def get_ipv6_listener(cls, host_ipv6, port, bind_interface):"},{"line_number":167,"context_line":"        return \u0027bind %s:%s interface %s\u0027 % (host_ipv6, port, bind_interface)"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"df06d3b7_cffbad14","line":165,"range":{"start_line":165,"start_character":5,"end_line":165,"end_character":16},"in_reply_to":"e88e64c9_936b8abf","updated":"2024-09-27 08:13:17.000000000","message":"Yeah, this should be a staticmethod","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"685ffd9c1d217a974b7a422042fe685542342a25","unresolved":true,"context_lines":[{"line_number":181,"context_line":"        \"pid_file\" line because that is provided just before the process is"},{"line_number":182,"context_line":"        started."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":"        def format_config(haproxy_cfg: str) -\u003e []:"},{"line_number":185,"context_line":"            return [line for line in haproxy_cfg.split(\u0027\\n\u0027) if"},{"line_number":186,"context_line":"                    \u0027    pidfile\u0027 not in line]"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1fdb6113_69d50134","line":184,"updated":"2024-10-01 18:05:33.000000000","message":"I may be wrong, but I think [] is not a valid hint. `list` (or `typing.List` for older pythons) is used. But I am happy to learn otherwise.","commit_id":"b92ba6b1ce9dadde5c3e1937a0f85a637def7c3a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"00af45147897da3f33f9d13f47e3d7f2b21f1164","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        \"pid_file\" line because that is provided just before the process is"},{"line_number":182,"context_line":"        started."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":"        def format_config(haproxy_cfg: str) -\u003e []:"},{"line_number":185,"context_line":"            return [line for line in haproxy_cfg.split(\u0027\\n\u0027) if"},{"line_number":186,"context_line":"                    \u0027    pidfile\u0027 not in line]"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fb4ce441_b340a482","line":184,"in_reply_to":"1fdb6113_69d50134","updated":"2024-10-02 07:08:53.000000000","message":"Done","commit_id":"b92ba6b1ce9dadde5c3e1937a0f85a637def7c3a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"685ffd9c1d217a974b7a422042fe685542342a25","unresolved":true,"context_lines":[{"line_number":288,"context_line":"                # Do not use the address or interface when DAD fails"},{"line_number":289,"context_line":"                bind_address_v6 \u003d bind_interface \u003d None"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        if reload_cfg:"},{"line_number":292,"context_line":"            # If the HAProxy running instance configuration is different from"},{"line_number":293,"context_line":"            # the one passed in this call, the HAProxy is stopped. The new"},{"line_number":294,"context_line":"            # configuration will be written in the disk and a new instance"}],"source_content_type":"text/x-python","patch_set":9,"id":"11f602ec_17a7dee0","line":291,"updated":"2024-10-01 18:05:33.000000000","message":"(Question about the flag) I see the function is used in other places, both in the agent and in dhcp and l3-ha. Would these other consumers also benefit from the logic here? Why would they want to continue running with a configuration that is not valid for any reason? Or are we trying to avoid unnecessary file reads here?","commit_id":"b92ba6b1ce9dadde5c3e1937a0f85a637def7c3a"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"00af45147897da3f33f9d13f47e3d7f2b21f1164","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                # Do not use the address or interface when DAD fails"},{"line_number":289,"context_line":"                bind_address_v6 \u003d bind_interface \u003d None"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        if reload_cfg:"},{"line_number":292,"context_line":"            # If the HAProxy running instance configuration is different from"},{"line_number":293,"context_line":"            # the one passed in this call, the HAProxy is stopped. The new"},{"line_number":294,"context_line":"            # configuration will be written in the disk and a new instance"}],"source_content_type":"text/x-python","patch_set":9,"id":"22266960_e30352a1","line":291,"in_reply_to":"11f602ec_17a7dee0","updated":"2024-10-02 07:08:53.000000000","message":"Yes, this is something I also considered during this implementation. It doesn\u0027t make sense to make this configurable. If the HAProxy is running, this method will just retrieve the PID but the configuration will be incorrect.\n\nI\u0027ll make this check mandatory for any execution.","commit_id":"b92ba6b1ce9dadde5c3e1937a0f85a637def7c3a"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":168,"context_line":"                            cls.PROXY_CONFIG_DIR)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    @classmethod"},{"line_number":171,"context_line":"    def read_config_file(cls, uuid: str, state_path: str) -\u003e str:"},{"line_number":172,"context_line":"        \"\"\"Return a list of strings with the content of the conf file\"\"\""},{"line_number":173,"context_line":"        cfg_path \u003d os.path.join("},{"line_number":174,"context_line":"            cls.get_config_path(state_path), \u0027%s.conf\u0027 % uuid)"}],"source_content_type":"text/x-python","patch_set":13,"id":"b32f6364_f89d1ee9","line":171,"updated":"2024-10-04 21:17:43.000000000","message":"(Suggestion) This could be a regular object method, then you wouldn\u0027t have to pass resource_id and state_path as arguments.","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                            cls.PROXY_CONFIG_DIR)"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    @classmethod"},{"line_number":171,"context_line":"    def read_config_file(cls, uuid: str, state_path: str) -\u003e str:"},{"line_number":172,"context_line":"        \"\"\"Return a list of strings with the content of the conf file\"\"\""},{"line_number":173,"context_line":"        cfg_path \u003d os.path.join("},{"line_number":174,"context_line":"            cls.get_config_path(state_path), \u0027%s.conf\u0027 % uuid)"}],"source_content_type":"text/x-python","patch_set":13,"id":"03dc1175_16691ed1","line":171,"in_reply_to":"b32f6364_f89d1ee9","updated":"2024-10-07 11:32:17.000000000","message":"Done","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    @classmethod"},{"line_number":171,"context_line":"    def read_config_file(cls, uuid: str, state_path: str) -\u003e str:"},{"line_number":172,"context_line":"        \"\"\"Return a list of strings with the content of the conf file\"\"\""},{"line_number":173,"context_line":"        cfg_path \u003d os.path.join("},{"line_number":174,"context_line":"            cls.get_config_path(state_path), \u0027%s.conf\u0027 % uuid)"},{"line_number":175,"context_line":"        return linux_utils.read_if_exists(cfg_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"4a3e7de8_bb1ce97b","line":172,"updated":"2024-10-04 21:17:43.000000000","message":"the type hint says otherwise (that it returns a single string).\n\n(I\u0027d advise not to document types returned in docstrings now that we start adding type hints.)","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    @classmethod"},{"line_number":171,"context_line":"    def read_config_file(cls, uuid: str, state_path: str) -\u003e str:"},{"line_number":172,"context_line":"        \"\"\"Return a list of strings with the content of the conf file\"\"\""},{"line_number":173,"context_line":"        cfg_path \u003d os.path.join("},{"line_number":174,"context_line":"            cls.get_config_path(state_path), \u0027%s.conf\u0027 % uuid)"},{"line_number":175,"context_line":"        return linux_utils.read_if_exists(cfg_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"1607be70_66e7480b","line":172,"in_reply_to":"4a3e7de8_bb1ce97b","updated":"2024-10-07 11:32:17.000000000","message":"Done","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":174,"context_line":"            cls.get_config_path(state_path), \u0027%s.conf\u0027 % uuid)"},{"line_number":175,"context_line":"        return linux_utils.read_if_exists(cfg_path, run_as_root\u003dTrue)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def match_configurations(self) -\u003e bool:"},{"line_number":178,"context_line":"        \"\"\"Compare the instance config and the config file content"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Returns True if both configurations match. This check skips the"}],"source_content_type":"text/x-python","patch_set":13,"id":"cca3a8cc_2407801d","line":177,"updated":"2024-10-04 21:17:43.000000000","message":"naming: how about `is_config_file_current`? (or revert the meaning and make it `is_config_file_obsolete` / \u0027config_file_needs_update`)","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            cls.get_config_path(state_path), \u0027%s.conf\u0027 % uuid)"},{"line_number":175,"context_line":"        return linux_utils.read_if_exists(cfg_path, run_as_root\u003dTrue)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def match_configurations(self) -\u003e bool:"},{"line_number":178,"context_line":"        \"\"\"Compare the instance config and the config file content"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Returns True if both configurations match. This check skips the"}],"source_content_type":"text/x-python","patch_set":13,"id":"78fcfcbf_639180e3","line":177,"in_reply_to":"cca3a8cc_2407801d","updated":"2024-10-07 11:32:17.000000000","message":"I\u0027ll take the second option \"is_config_file_obsolete\" because I think it has a univocal meaning.","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":178,"context_line":"        \"\"\"Compare the instance config and the config file content"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Returns True if both configurations match. This check skips the"},{"line_number":181,"context_line":"        \"pid_file\" line because that is provided just before the process is"},{"line_number":182,"context_line":"        started."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":"        def format_config(haproxy_cfg: str) -\u003e list:"}],"source_content_type":"text/x-python","patch_set":13,"id":"28c0798b_6162bbd4","line":181,"updated":"2024-10-04 21:17:43.000000000","message":"nit: the line is `pidfile`, not `pid_file`.","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":178,"context_line":"        \"\"\"Compare the instance config and the config file content"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Returns True if both configurations match. This check skips the"},{"line_number":181,"context_line":"        \"pid_file\" line because that is provided just before the process is"},{"line_number":182,"context_line":"        started."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":"        def format_config(haproxy_cfg: str) -\u003e list:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1c43dee9_69c6380a","line":181,"in_reply_to":"28c0798b_6162bbd4","updated":"2024-10-07 11:32:17.000000000","message":"Right!","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":181,"context_line":"        \"pid_file\" line because that is provided just before the process is"},{"line_number":182,"context_line":"        started."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":"        def format_config(haproxy_cfg: str) -\u003e list:"},{"line_number":185,"context_line":"            return [line for line in haproxy_cfg.split(\u0027\\n\u0027) if"},{"line_number":186,"context_line":"                    \u0027    pidfile\u0027 not in line]"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"8c2ca369_4e1c400b","line":184,"updated":"2024-10-04 21:17:43.000000000","message":"naming: how about `get_significant_lines`? (I am not entirely happy about the name, but at least it\u0027s trying to explain the goal. Maybe you can come up with something neater?)","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":181,"context_line":"        \"pid_file\" line because that is provided just before the process is"},{"line_number":182,"context_line":"        started."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":"        def format_config(haproxy_cfg: str) -\u003e list:"},{"line_number":185,"context_line":"            return [line for line in haproxy_cfg.split(\u0027\\n\u0027) if"},{"line_number":186,"context_line":"                    \u0027    pidfile\u0027 not in line]"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"8c6ce98d_101b207c","line":184,"range":{"start_line":184,"start_character":47,"end_line":184,"end_character":51},"updated":"2024-10-04 21:17:43.000000000","message":"typing: if you know the type of elements, you can do `-\u003e list[str]`.","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        \"pid_file\" line because that is provided just before the process is"},{"line_number":182,"context_line":"        started."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":"        def format_config(haproxy_cfg: str) -\u003e list:"},{"line_number":185,"context_line":"            return [line for line in haproxy_cfg.split(\u0027\\n\u0027) if"},{"line_number":186,"context_line":"                    \u0027    pidfile\u0027 not in line]"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"327a9276_90381c78","line":184,"in_reply_to":"8c2ca369_4e1c400b","updated":"2024-10-07 11:32:17.000000000","message":"Maybe \"trim_config\"","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        \"pid_file\" line because that is provided just before the process is"},{"line_number":182,"context_line":"        started."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":"        def format_config(haproxy_cfg: str) -\u003e list:"},{"line_number":185,"context_line":"            return [line for line in haproxy_cfg.split(\u0027\\n\u0027) if"},{"line_number":186,"context_line":"                    \u0027    pidfile\u0027 not in line]"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"88f9799a_99fe21c3","line":184,"range":{"start_line":184,"start_character":47,"end_line":184,"end_character":51},"in_reply_to":"8c6ce98d_101b207c","updated":"2024-10-07 11:32:17.000000000","message":"Done","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        file_config \u003d format_config(self.read_config_file(self.resource_id,"},{"line_number":189,"context_line":"                                                          self.state_path))"},{"line_number":190,"context_line":"        local_config \u003d format_config(self.haproxy_cfg)"},{"line_number":191,"context_line":"        return file_config \u003d\u003d local_config"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":13,"id":"c7ec8570_2506d031","line":190,"range":{"start_line":190,"start_character":8,"end_line":190,"end_character":20},"updated":"2024-10-04 21:17:43.000000000","message":"naming: maybe `current_config`? (both are \"local\"; one is on-disc and another in-memory)","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"        file_config \u003d format_config(self.read_config_file(self.resource_id,"},{"line_number":189,"context_line":"                                                          self.state_path))"},{"line_number":190,"context_line":"        local_config \u003d format_config(self.haproxy_cfg)"},{"line_number":191,"context_line":"        return file_config \u003d\u003d local_config"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":13,"id":"ae02a423_68e2f1a0","line":190,"range":{"start_line":190,"start_character":8,"end_line":190,"end_character":20},"in_reply_to":"c7ec8570_2506d031","updated":"2024-10-07 11:32:17.000000000","message":"Done","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        # If the HAProxy running instance configuration is different from"},{"line_number":292,"context_line":"        # the one passed in this call, the HAProxy is stopped. The new"},{"line_number":293,"context_line":"        # configuration will be written in the disk and a new instance"},{"line_number":294,"context_line":"        # started."},{"line_number":295,"context_line":"        haproxy_cfg \u003d cls._get_haproxy_configurator("},{"line_number":296,"context_line":"            bind_address, port, conf, network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"877c19ab_155061a6","line":293,"updated":"2024-10-04 21:17:43.000000000","message":"nit: in the disk -\u003e to the disk","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        # If the HAProxy running instance configuration is different from"},{"line_number":292,"context_line":"        # the one passed in this call, the HAProxy is stopped. The new"},{"line_number":293,"context_line":"        # configuration will be written in the disk and a new instance"},{"line_number":294,"context_line":"        # started."},{"line_number":295,"context_line":"        haproxy_cfg \u003d cls._get_haproxy_configurator("},{"line_number":296,"context_line":"            bind_address, port, conf, network_id\u003dnetwork_id,"}],"source_content_type":"text/x-python","patch_set":13,"id":"e067c098_b8cbadb8","line":293,"in_reply_to":"877c19ab_155061a6","updated":"2024-10-07 11:32:17.000000000","message":"Done","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cb5b7208596258a2f19fe01d81386d5e7c6c6433","unresolved":true,"context_lines":[{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        def trim_config(haproxy_cfg: str) -\u003e list[str]:"},{"line_number":184,"context_line":"            return [line for line in haproxy_cfg.split(\u0027\\n\u0027) if"},{"line_number":185,"context_line":"                    \u0027    pidfile\u0027 not in line]"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        file_config \u003d trim_config(self.read_config_file())"},{"line_number":188,"context_line":"        current_config \u003d trim_config(self.haproxy_cfg)"}],"source_content_type":"text/x-python","patch_set":15,"id":"cebb1cc7_76821de2","line":185,"updated":"2024-10-07 16:37:26.000000000","message":"I\u0027m a little worried about relying on 4 spaces before \u0027pidfile\u0027 since someone could change it, lstrip() would maybe be better.\n\nnot line.lstrip().startswith(\u0027pidfile\u0027)","commit_id":"021bef7fec11f8a9f0521551c72f7ce11b6626ee"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3d50412afae762e07dad71cc43871006253bfa7f","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        \"\"\""},{"line_number":183,"context_line":"        def trim_config(haproxy_cfg: str) -\u003e list[str]:"},{"line_number":184,"context_line":"            return [line for line in haproxy_cfg.split(\u0027\\n\u0027) if"},{"line_number":185,"context_line":"                    \u0027    pidfile\u0027 not in line]"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        file_config \u003d trim_config(self.read_config_file())"},{"line_number":188,"context_line":"        current_config \u003d trim_config(self.haproxy_cfg)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7b36ac4e_ee1e9f38","line":185,"in_reply_to":"cebb1cc7_76821de2","updated":"2024-10-07 19:53:18.000000000","message":"Done","commit_id":"021bef7fec11f8a9f0521551c72f7ce11b6626ee"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cb5b7208596258a2f19fe01d81386d5e7c6c6433","unresolved":true,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        file_config \u003d trim_config(self.read_config_file())"},{"line_number":188,"context_line":"        current_config \u003d trim_config(self.haproxy_cfg)"},{"line_number":189,"context_line":"        return not(file_config \u003d\u003d current_config)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    @classmethod"},{"line_number":192,"context_line":"    def cleanup_config_file(cls, uuid, state_path):"}],"source_content_type":"text/x-python","patch_set":15,"id":"07892deb_55dd9517","line":189,"updated":"2024-10-07 16:37:26.000000000","message":"nit: return file_config !\u003d current_config","commit_id":"021bef7fec11f8a9f0521551c72f7ce11b6626ee"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3d50412afae762e07dad71cc43871006253bfa7f","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        file_config \u003d trim_config(self.read_config_file())"},{"line_number":188,"context_line":"        current_config \u003d trim_config(self.haproxy_cfg)"},{"line_number":189,"context_line":"        return not(file_config \u003d\u003d current_config)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    @classmethod"},{"line_number":192,"context_line":"    def cleanup_config_file(cls, uuid, state_path):"}],"source_content_type":"text/x-python","patch_set":15,"id":"aa8b9bd3_dc3eab82","line":189,"in_reply_to":"07892deb_55dd9517","updated":"2024-10-07 19:53:18.000000000","message":"Done","commit_id":"021bef7fec11f8a9f0521551c72f7ce11b6626ee"}],"neutron/agent/ovn/metadata/agent.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1cf92e1a61bcfd0f7e8d529e64c2625279bea252","unresolved":true,"context_lines":[{"line_number":430,"context_line":"            (\u0027external_ids\u0027, external_ids)).execute(check_error\u003dTrue)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def _metadata_proxy_needs_restart(self, net_name, interface_name):"},{"line_number":433,"context_line":"        \"\"\"Checks the metadata proxy config and if it needs to be restarted\"\"\""},{"line_number":434,"context_line":"        if net_name in self._updated_metadata_proxy_set:"},{"line_number":435,"context_line":"            return False"},{"line_number":436,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"671447e9_319040f2","line":433,"range":{"start_line":433,"start_character":11,"end_line":433,"end_character":17},"updated":"2024-09-26 18:06:09.000000000","message":"Nit: imperative - Check","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":430,"context_line":"            (\u0027external_ids\u0027, external_ids)).execute(check_error\u003dTrue)"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    def _metadata_proxy_needs_restart(self, net_name, interface_name):"},{"line_number":433,"context_line":"        \"\"\"Checks the metadata proxy config and if it needs to be restarted\"\"\""},{"line_number":434,"context_line":"        if net_name in self._updated_metadata_proxy_set:"},{"line_number":435,"context_line":"            return False"},{"line_number":436,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"dbf4c779_80ac459d","line":433,"range":{"start_line":433,"start_character":11,"end_line":433,"end_character":17},"in_reply_to":"671447e9_319040f2","updated":"2024-09-27 08:13:17.000000000","message":"Done","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4720217941f85edb2a77a3b791a1eb7348de9857","unresolved":true,"context_lines":[{"line_number":434,"context_line":"        if net_name in self._updated_metadata_proxy_set:"},{"line_number":435,"context_line":"            return False"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        self._updated_metadata_proxy_set.add(net_name)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        # Check that the metadata proxy has the IPv6 configuration."},{"line_number":440,"context_line":"        configurator \u003d metadata_driver.MetadataDriver.haproxy_configurator()"}],"source_content_type":"text/x-python","patch_set":6,"id":"71a6e4ea_7227e51f","line":437,"updated":"2024-09-26 17:55:57.000000000","message":"should you set it AFTER you had a successful extraction of the fact from the config file? otherwise if the block below fails somehow, you will leave the net_name in the set.","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":434,"context_line":"        if net_name in self._updated_metadata_proxy_set:"},{"line_number":435,"context_line":"            return False"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        self._updated_metadata_proxy_set.add(net_name)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        # Check that the metadata proxy has the IPv6 configuration."},{"line_number":440,"context_line":"        configurator \u003d metadata_driver.MetadataDriver.haproxy_configurator()"}],"source_content_type":"text/x-python","patch_set":6,"id":"27d25a60_1ba7b8d2","line":437,"in_reply_to":"71a6e4ea_7227e51f","updated":"2024-09-27 08:13:17.000000000","message":"Done","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4720217941f85edb2a77a3b791a1eb7348de9857","unresolved":true,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        self._updated_metadata_proxy_set.add(net_name)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        # Check that the metadata proxy has the IPv6 configuration."},{"line_number":440,"context_line":"        configurator \u003d metadata_driver.MetadataDriver.haproxy_configurator()"},{"line_number":441,"context_line":"        ipv6_listener_line \u003d configurator.get_ipv6_listener("},{"line_number":442,"context_line":"            n_const.METADATA_V6_IP, n_const.METADATA_PORT, interface_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6a98f9_e9c5d24a","line":439,"updated":"2024-09-26 17:55:57.000000000","message":"this is quite specific to the exact case of config skew. (the ipv6 support). I wonder if we better generate the intended config, then compare to file on disc, and if they differ, dump the new config?\n\nThen it wouldn\u0027t be so tightly coupled with one exact case of config skew but would automatically handle any other discrepancies.\n\nShould there be a `metadata_driver.MetadataDriver.needs_restart()` function that would abstract away the details of how the driver is configured / where it stores config file etc.?\n\nWhat do you think?","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        self._updated_metadata_proxy_set.add(net_name)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        # Check that the metadata proxy has the IPv6 configuration."},{"line_number":440,"context_line":"        configurator \u003d metadata_driver.MetadataDriver.haproxy_configurator()"},{"line_number":441,"context_line":"        ipv6_listener_line \u003d configurator.get_ipv6_listener("},{"line_number":442,"context_line":"            n_const.METADATA_V6_IP, n_const.METADATA_PORT, interface_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"eded8cea_81c3d349","line":439,"in_reply_to":"7c6a6614_712b3fe7","updated":"2024-09-27 08:13:17.000000000","message":"I like the idea of the abstraction done in the MetadataDriver. That will simplify OVN metadata agent and make it agnostic of the reason for restarting. I\u0027ll push a new PS.","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1cf92e1a61bcfd0f7e8d529e64c2625279bea252","unresolved":true,"context_lines":[{"line_number":436,"context_line":""},{"line_number":437,"context_line":"        self._updated_metadata_proxy_set.add(net_name)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        # Check that the metadata proxy has the IPv6 configuration."},{"line_number":440,"context_line":"        configurator \u003d metadata_driver.MetadataDriver.haproxy_configurator()"},{"line_number":441,"context_line":"        ipv6_listener_line \u003d configurator.get_ipv6_listener("},{"line_number":442,"context_line":"            n_const.METADATA_V6_IP, n_const.METADATA_PORT, interface_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7c6a6614_712b3fe7","line":439,"in_reply_to":"da6a98f9_e9c5d24a","updated":"2024-09-26 18:06:09.000000000","message":"I was thinking the same. +1 A bit the other way around - load the config file into memory and compare with intended in-memory representor - but essentially the same - comparing desired and actual state of config.","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"}],"neutron/common/utils.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1cf92e1a61bcfd0f7e8d529e64c2625279bea252","unresolved":true,"context_lines":[{"line_number":1111,"context_line":"        with open(path, \u0027r\u0027) as file:"},{"line_number":1112,"context_line":"            return file.read().split(\u0027\\n\u0027)"},{"line_number":1113,"context_line":"    except OSError as e:"},{"line_number":1114,"context_line":"        if e.errno !\u003d errno.ENOENT:"},{"line_number":1115,"context_line":"            raise"},{"line_number":1116,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":6,"id":"7afd1895_13c5de5f","line":1114,"updated":"2024-09-26 18:06:09.000000000","message":"Should we log a debug message here about the error in case someone passes a wrong path?","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4720217941f85edb2a77a3b791a1eb7348de9857","unresolved":true,"context_lines":[{"line_number":1111,"context_line":"        with open(path, \u0027r\u0027) as file:"},{"line_number":1112,"context_line":"            return file.read().split(\u0027\\n\u0027)"},{"line_number":1113,"context_line":"    except OSError as e:"},{"line_number":1114,"context_line":"        if e.errno !\u003d errno.ENOENT:"},{"line_number":1115,"context_line":"            raise"},{"line_number":1116,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":6,"id":"89a563d2_98419f31","line":1114,"updated":"2024-09-26 17:55:57.000000000","message":"That\u0027s FileNotFoundError, you could catch it instead.","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"        with open(path, \u0027r\u0027) as file:"},{"line_number":1112,"context_line":"            return file.read().split(\u0027\\n\u0027)"},{"line_number":1113,"context_line":"    except OSError as e:"},{"line_number":1114,"context_line":"        if e.errno !\u003d errno.ENOENT:"},{"line_number":1115,"context_line":"            raise"},{"line_number":1116,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":6,"id":"3b7ab0fa_cc912509","line":1114,"in_reply_to":"7afd1895_13c5de5f","updated":"2024-09-27 08:13:17.000000000","message":"We are using this method inside a privsep context. That doesn\u0027t work with writing log messages.\n\nI\u0027ll add the documentation to this method. Actually I added this documentation in \"read_if_exists\" (that calls this method or the wrapped privsep one).","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"        with open(path, \u0027r\u0027) as file:"},{"line_number":1112,"context_line":"            return file.read().split(\u0027\\n\u0027)"},{"line_number":1113,"context_line":"    except OSError as e:"},{"line_number":1114,"context_line":"        if e.errno !\u003d errno.ENOENT:"},{"line_number":1115,"context_line":"            raise"},{"line_number":1116,"context_line":"        return []"}],"source_content_type":"text/x-python","patch_set":6,"id":"2985511a_181c4b95","line":1114,"in_reply_to":"89a563d2_98419f31","updated":"2024-09-27 08:13:17.000000000","message":"\"FileNotFoundError\" is the exception the Neutron raises when we catch the OSError ENOENT exception.","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":1113,"context_line":"    returns an empty string."},{"line_number":1114,"context_line":"    \"\"\""},{"line_number":1115,"context_line":"    try:"},{"line_number":1116,"context_line":"        with open(path, \u0027r\u0027) as file:"},{"line_number":1117,"context_line":"            return file.read()"},{"line_number":1118,"context_line":"    except OSError as e:"},{"line_number":1119,"context_line":"        if e.errno !\u003d errno.ENOENT:"}],"source_content_type":"text/x-python","patch_set":13,"id":"936996f9_663ff282","line":1116,"updated":"2024-10-04 21:17:43.000000000","message":"nit: `r` is default, so you can just `open(path)`","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":1113,"context_line":"    returns an empty string."},{"line_number":1114,"context_line":"    \"\"\""},{"line_number":1115,"context_line":"    try:"},{"line_number":1116,"context_line":"        with open(path, \u0027r\u0027) as file:"},{"line_number":1117,"context_line":"            return file.read()"},{"line_number":1118,"context_line":"    except OSError as e:"},{"line_number":1119,"context_line":"        if e.errno !\u003d errno.ENOENT:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9958c726_52681771","line":1116,"in_reply_to":"936996f9_663ff282","updated":"2024-10-07 11:32:17.000000000","message":"Done","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d0b05bd6a54df2faa0972ae7a8b7184ea03aa45c","unresolved":true,"context_lines":[{"line_number":1118,"context_line":"    except OSError as e:"},{"line_number":1119,"context_line":"        if e.errno !\u003d errno.ENOENT:"},{"line_number":1120,"context_line":"            raise"},{"line_number":1121,"context_line":"        return \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"f713a312_f8c382dc","line":1121,"updated":"2024-10-04 21:17:43.000000000","message":"I think this is equivalent to:\n\n```\ntry:\n    with open(path) as file:\n        return file.read()\nexcept FileNotFoundError:\n    return \u0027\u0027\n```","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"934bba2c7b2d7c75698a294af668fad5e0dbf5a8","unresolved":false,"context_lines":[{"line_number":1118,"context_line":"    except OSError as e:"},{"line_number":1119,"context_line":"        if e.errno !\u003d errno.ENOENT:"},{"line_number":1120,"context_line":"            raise"},{"line_number":1121,"context_line":"        return \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"1ea83538_cd02624c","line":1121,"in_reply_to":"f713a312_f8c382dc","updated":"2024-10-07 11:32:17.000000000","message":"Much better","commit_id":"ea03ca6ca11cb4df3af773b8111e747c345579a3"}],"neutron/privileged/agent/linux/utils.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1cf92e1a61bcfd0f7e8d529e64c2625279bea252","unresolved":true,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"@privileged.default.entrypoint"},{"line_number":62,"context_line":"def write_to_tempfile(content, path\u003dNone, suffix\u003d\u0027\u0027, prefix\u003d\u0027tmp\u0027):"},{"line_number":63,"context_line":"    return fileutils.write_to_tempfile(content, path\u003dpath, suffix\u003dsuffix,"},{"line_number":64,"context_line":"                                       prefix\u003dprefix)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3ed4db2f_9c5a8d40","line":62,"range":{"start_line":62,"start_character":31,"end_line":62,"end_character":35},"updated":"2024-09-26 18:06:09.000000000","message":"`_path` to avoid shadowing the imported module?","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"@privileged.default.entrypoint"},{"line_number":62,"context_line":"def write_to_tempfile(content, path\u003dNone, suffix\u003d\u0027\u0027, prefix\u003d\u0027tmp\u0027):"},{"line_number":63,"context_line":"    return fileutils.write_to_tempfile(content, path\u003dpath, suffix\u003dsuffix,"},{"line_number":64,"context_line":"                                       prefix\u003dprefix)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"280dd2af_331b8d52","line":62,"range":{"start_line":62,"start_character":31,"end_line":62,"end_character":35},"in_reply_to":"3ed4db2f_9c5a8d40","updated":"2024-09-27 08:13:17.000000000","message":"Pycharm is warning me about this... and I didn\u0027t do anything...\n\nThanks!","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"}],"neutron/tests/functional/agent/linux/test_utils.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"4598a45a6a42f7b353512ce9cd8beae8bbbf280d","unresolved":true,"context_lines":[{"line_number":208,"context_line":"        self.assertEqual(file, content)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def test_read_if_exists_no_file(self):"},{"line_number":211,"context_line":"        content \u003d utils.read_if_exists(\u0027/tmp/non-existing-file\u0027,"},{"line_number":212,"context_line":"                                       run_as_root\u003dself.run_as_root)"},{"line_number":213,"context_line":"        self.assertEqual([], content)"}],"source_content_type":"text/x-python","patch_set":5,"id":"41ee478d_d007fe05","line":211,"updated":"2024-09-24 21:53:22.000000000","message":"My only nit is I\u0027m not sure there\u0027s 100% guarantee this file doesn\u0027t exist if the planets are aligned just right :)  Would have to use the tempfile library for that.","commit_id":"8dded016f59e4a021028a75815f5c28ddad0205e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f65c69f50d69415411f37543e8556865cc11f7c8","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        self.assertEqual(file, content)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def test_read_if_exists_no_file(self):"},{"line_number":211,"context_line":"        content \u003d utils.read_if_exists(\u0027/tmp/non-existing-file\u0027,"},{"line_number":212,"context_line":"                                       run_as_root\u003dself.run_as_root)"},{"line_number":213,"context_line":"        self.assertEqual([], content)"}],"source_content_type":"text/x-python","patch_set":5,"id":"95080c3d_e0e99acb","line":211,"in_reply_to":"41ee478d_d007fe05","updated":"2024-09-25 06:18:16.000000000","message":"Done","commit_id":"8dded016f59e4a021028a75815f5c28ddad0205e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4720217941f85edb2a77a3b791a1eb7348de9857","unresolved":true,"context_lines":[{"line_number":28,"context_line":"from neutron.tests.functional import base as functional_base"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"FILE \u003d \"\"\"Test file"},{"line_number":32,"context_line":"line 2"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"line 4"}],"source_content_type":"text/x-python","patch_set":6,"id":"43c66927_c1b61aa9","line":31,"updated":"2024-09-26 17:55:57.000000000","message":"maybe move it under the test class since it\u0027s not used elsewhere and since the varname is quite generic so it may confuse a clueless reader without self. prefix.","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from neutron.tests.functional import base as functional_base"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"FILE \u003d \"\"\"Test file"},{"line_number":32,"context_line":"line 2"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"line 4"}],"source_content_type":"text/x-python","patch_set":6,"id":"effdf847_0f3f29c5","line":31,"in_reply_to":"43c66927_c1b61aa9","updated":"2024-09-27 08:13:17.000000000","message":"Right","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"}],"neutron/tests/unit/agent/ovn/metadata/test_agent.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"1cf92e1a61bcfd0f7e8d529e64c2625279bea252","unresolved":true,"context_lines":[{"line_number":531,"context_line":"                net_name, interface_name))"},{"line_number":532,"context_line":"            self.assertIn(net_name, self.agent._updated_metadata_proxy_set)"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"        # The IPv6 configuration is not present, restart needed."},{"line_number":535,"context_line":"        net_name \u003d uuidutils.generate_uuid()"},{"line_number":536,"context_line":"        with mock.patch.object(driver.MetadataDriver, \u0027read_config_file\u0027,"},{"line_number":537,"context_line":"                               return_value\u003d[]):"}],"source_content_type":"text/x-python","patch_set":6,"id":"2b944bd7_683807c7","line":534,"updated":"2024-09-26 18:06:09.000000000","message":"Starting here it should be a different testing method? One that tests it needs to be restarted and other one that it does not.","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"37446e46f7e2947a9fbe8d538f604b74b48b1d08","unresolved":false,"context_lines":[{"line_number":531,"context_line":"                net_name, interface_name))"},{"line_number":532,"context_line":"            self.assertIn(net_name, self.agent._updated_metadata_proxy_set)"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"        # The IPv6 configuration is not present, restart needed."},{"line_number":535,"context_line":"        net_name \u003d uuidutils.generate_uuid()"},{"line_number":536,"context_line":"        with mock.patch.object(driver.MetadataDriver, \u0027read_config_file\u0027,"},{"line_number":537,"context_line":"                               return_value\u003d[]):"}],"source_content_type":"text/x-python","patch_set":6,"id":"bbcb0dbb_c1cb5f52","line":534,"in_reply_to":"2b944bd7_683807c7","updated":"2024-09-27 08:13:17.000000000","message":"Yeah, I usually combine tests like this, but it is not needed. I should implement two independent methods with a qualified name.","commit_id":"adc2a4af7c8726a63ce97d57e8cae38fa5c53729"}]}
