)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"215cc468d20552348687af8671145871639f6443","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e0c2f58f_6819aa9c","updated":"2024-11-05 10:03:42.000000000","message":"LGTM apart from my comments","commit_id":"57e91282406ae38d629e256bbffc0a22f455de91"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"9ae13d9acd496506c51c20a13ad3abb4cc977e11","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"a41400f8_4cc4eee6","updated":"2024-11-20 18:21:39.000000000","message":"LGTM","commit_id":"7e096d19d9d49581de52ebd10aaeb0bf4cb6a236"}],"octavia/amphorae/backends/agent/api_server/util.py":[{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"215cc468d20552348687af8671145871639f6443","unresolved":true,"context_lines":[{"line_number":350,"context_line":"def get_lvs_vip_addresses(listener_id):"},{"line_number":351,"context_line":"    \"\"\"Get the VIP addresses for a LVS load balancer."},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    :param listener_id: The listener ID to get VIP addresses from."},{"line_number":354,"context_line":"    :returns: List of VIP addresses (IPv4 and IPv6)"},{"line_number":355,"context_line":"    \"\"\""},{"line_number":356,"context_line":"    vips \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"80f5c18d_3df5c023","line":353,"updated":"2024-11-05 10:03:42.000000000","message":"I thought we agreed that we do not do this in new code anymore. Please use type annotations instead. Same with `:returns:`","commit_id":"57e91282406ae38d629e256bbffc0a22f455de91"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"fca73c78fecd6f3a4564a2e81c4d175bf75fee2b","unresolved":false,"context_lines":[{"line_number":350,"context_line":"def get_lvs_vip_addresses(listener_id):"},{"line_number":351,"context_line":"    \"\"\"Get the VIP addresses for a LVS load balancer."},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    :param listener_id: The listener ID to get VIP addresses from."},{"line_number":354,"context_line":"    :returns: List of VIP addresses (IPv4 and IPv6)"},{"line_number":355,"context_line":"    \"\"\""},{"line_number":356,"context_line":"    vips \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"eb7b3a13_1e35aedd","line":353,"in_reply_to":"80f5c18d_3df5c023","updated":"2024-11-05 21:58:29.000000000","message":"Done","commit_id":"57e91282406ae38d629e256bbffc0a22f455de91"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"215cc468d20552348687af8671145871639f6443","unresolved":true,"context_lines":[{"line_number":355,"context_line":"    \"\"\""},{"line_number":356,"context_line":"    vips \u003d []"},{"line_number":357,"context_line":"    # Extract the VIP addresses from keepalived configuration"},{"line_number":358,"context_line":"    # Format is"},{"line_number":359,"context_line":"    # virtual_server_group ipv\u003cn\u003e-group {"},{"line_number":360,"context_line":"    #     vip_address1 port1"},{"line_number":361,"context_line":"    #     vip_address2 port2"},{"line_number":362,"context_line":"    # }"},{"line_number":363,"context_line":"    # it can be repeated in case of dual-stack LBs"},{"line_number":364,"context_line":"    with open(keepalived_lvs_cfg_path(listener_id), encoding\u003d\u0027utf-8\u0027) as file:"},{"line_number":365,"context_line":"        vsg_section \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"1efaa9f4_75430447","line":362,"range":{"start_line":358,"start_character":0,"end_line":362,"end_character":7},"updated":"2024-11-05 10:03:42.000000000","message":"+1 Thanks for adding an example","commit_id":"57e91282406ae38d629e256bbffc0a22f455de91"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"fca73c78fecd6f3a4564a2e81c4d175bf75fee2b","unresolved":false,"context_lines":[{"line_number":355,"context_line":"    \"\"\""},{"line_number":356,"context_line":"    vips \u003d []"},{"line_number":357,"context_line":"    # Extract the VIP addresses from keepalived configuration"},{"line_number":358,"context_line":"    # Format is"},{"line_number":359,"context_line":"    # virtual_server_group ipv\u003cn\u003e-group {"},{"line_number":360,"context_line":"    #     vip_address1 port1"},{"line_number":361,"context_line":"    #     vip_address2 port2"},{"line_number":362,"context_line":"    # }"},{"line_number":363,"context_line":"    # it can be repeated in case of dual-stack LBs"},{"line_number":364,"context_line":"    with open(keepalived_lvs_cfg_path(listener_id), encoding\u003d\u0027utf-8\u0027) as file:"},{"line_number":365,"context_line":"        vsg_section \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"ec42bc69_a2df636b","line":362,"range":{"start_line":358,"start_character":0,"end_line":362,"end_character":7},"in_reply_to":"1efaa9f4_75430447","updated":"2024-11-05 21:58:29.000000000","message":"Acknowledged","commit_id":"57e91282406ae38d629e256bbffc0a22f455de91"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"215cc468d20552348687af8671145871639f6443","unresolved":true,"context_lines":[{"line_number":369,"context_line":"                if current_line.startswith(\u0027}\u0027):"},{"line_number":370,"context_line":"                    vsg_section \u003d False"},{"line_number":371,"context_line":"                else:"},{"line_number":372,"context_line":"                    vip_address \u003d current_line.strip().split(\u0027 \u0027)[0]"},{"line_number":373,"context_line":"                    vips.append(vip_address)"},{"line_number":374,"context_line":"            elif line.startswith(\u0027virtual_server_group \u0027):"},{"line_number":375,"context_line":"                vsg_section \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"06ceb704_11193338","line":372,"range":{"start_line":372,"start_character":34,"end_line":372,"end_character":54},"updated":"2024-11-05 10:03:42.000000000","message":"you did the `line.strip()` in line 367 already. This seems redundant.","commit_id":"57e91282406ae38d629e256bbffc0a22f455de91"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"fca73c78fecd6f3a4564a2e81c4d175bf75fee2b","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                if current_line.startswith(\u0027}\u0027):"},{"line_number":370,"context_line":"                    vsg_section \u003d False"},{"line_number":371,"context_line":"                else:"},{"line_number":372,"context_line":"                    vip_address \u003d current_line.strip().split(\u0027 \u0027)[0]"},{"line_number":373,"context_line":"                    vips.append(vip_address)"},{"line_number":374,"context_line":"            elif line.startswith(\u0027virtual_server_group \u0027):"},{"line_number":375,"context_line":"                vsg_section \u003d True"}],"source_content_type":"text/x-python","patch_set":1,"id":"bafd4db7_695e63ac","line":372,"range":{"start_line":372,"start_character":34,"end_line":372,"end_character":54},"in_reply_to":"06ceb704_11193338","updated":"2024-11-05 21:58:29.000000000","message":"Done","commit_id":"57e91282406ae38d629e256bbffc0a22f455de91"}],"octavia/tests/unit/amphorae/backends/agent/api_server/test_util.py":[{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"526c2bed9a320c41252c7a74c98313fe3dffbc8d","unresolved":true,"context_lines":[{"line_number":474,"context_line":"            \u0027fake0\u0027, \u0027203.0.113.46\u0027, net_ns\u003dconsts.AMPHORA_NAMESPACE)"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        # Test with an exception (should not raise)"},{"line_number":477,"context_line":"        mock_get_lvs_vip_addrs.reset_mock()"},{"line_number":478,"context_line":"        mock_get_int_name.reset_mock()"},{"line_number":479,"context_line":"        mock_send_advert.reset_mock()"},{"line_number":480,"context_line":"        util.send_vip_advertisements(listener_id\u003dLISTENER_ID1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"c38bcf17_5e1b5bbb","line":477,"range":{"start_line":477,"start_character":8,"end_line":477,"end_character":43},"updated":"2024-11-06 09:09:01.000000000","message":"Is this correct? AFAICT, this makes that the next call of `get_lvs_vip_addresses()` will return [] and not raise an Exception as you probably intended. So, I would think that this line should be removed.","commit_id":"7e096d19d9d49581de52ebd10aaeb0bf4cb6a236"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"83a57ad3eacb8daf171a75199024fddb585a126b","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            \u0027fake0\u0027, \u0027203.0.113.46\u0027, net_ns\u003dconsts.AMPHORA_NAMESPACE)"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        # Test with an exception (should not raise)"},{"line_number":477,"context_line":"        mock_get_lvs_vip_addrs.reset_mock()"},{"line_number":478,"context_line":"        mock_get_int_name.reset_mock()"},{"line_number":479,"context_line":"        mock_send_advert.reset_mock()"},{"line_number":480,"context_line":"        util.send_vip_advertisements(listener_id\u003dLISTENER_ID1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"b8956f7a_43d836f6","line":477,"range":{"start_line":477,"start_character":8,"end_line":477,"end_character":43},"in_reply_to":"268da1af_1d03e6f3","updated":"2024-11-11 13:53:29.000000000","message":"Acknowledged","commit_id":"7e096d19d9d49581de52ebd10aaeb0bf4cb6a236"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"1a3842ca9e2b4231f99610f563faf2cf971978d5","unresolved":true,"context_lines":[{"line_number":474,"context_line":"            \u0027fake0\u0027, \u0027203.0.113.46\u0027, net_ns\u003dconsts.AMPHORA_NAMESPACE)"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        # Test with an exception (should not raise)"},{"line_number":477,"context_line":"        mock_get_lvs_vip_addrs.reset_mock()"},{"line_number":478,"context_line":"        mock_get_int_name.reset_mock()"},{"line_number":479,"context_line":"        mock_send_advert.reset_mock()"},{"line_number":480,"context_line":"        util.send_vip_advertisements(listener_id\u003dLISTENER_ID1)"}],"source_content_type":"text/x-python","patch_set":2,"id":"268da1af_1d03e6f3","line":477,"range":{"start_line":477,"start_character":8,"end_line":477,"end_character":43},"in_reply_to":"c38bcf17_5e1b5bbb","updated":"2024-11-08 13:53:56.000000000","message":"reset_mock only clears the list of calls, it doesn\u0027t impact the side_effect or return_value parameter.\nwe usually clean up all the mocks between each subtest, here we don\u0027t check the calls to get_lvs_vip_addrs, so it\u0027s not really helpful, but it\u0027s correct.","commit_id":"7e096d19d9d49581de52ebd10aaeb0bf4cb6a236"}]}
