)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":31664,"name":"Omer Schwartz","email":"oschwart@redhat.com","username":"oschwart"},"change_message_id":"1a000b595452ef77bede344c31c50d781053b015","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"49b3d95c_7a8918b0","updated":"2022-10-27 10:47:42.000000000","message":"I am not sure if it matters that much, but on \noctavia/tests/unit/amphorae/drivers/haproxy/test_rest_api_driver_1_0/TestAmphoraAPIClientTest\nThere are some tests that still mention \"api_version\": \"0.5\"\n(it just returns the info we provide in the test, but we can change it to 1.0 if we wish)\n\nOn common/constants line #16 we have\nAPI_VERSION \u003d \u00270.5\u0027\nThe files that use that hard-coded constant are\namphorae/drivers/haproxy/rest_api_driver.py\namphorae/drivers/keepalived/vrrp_rest_driver.py","commit_id":"b45f58ac25367b4d115b02a14b2526ba96a861da"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"b1c5aca5ba94179b1604ac274d5790fa0ba968c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"110605df_11c6a62b","in_reply_to":"49b3d95c_7a8918b0","updated":"2022-10-27 12:49:18.000000000","message":"I agree that we should use a supported version in general test data, but yeah, it\u0027s more a cosmetic issue.\n\nThat API_VERSION \u003d \u00270.5\u0027 constant is more interesting. It seems it should have been updated with the introduction of version 1.0 (assuming the API client version should be the same as the API version). I\u0027ve updated it now.","commit_id":"b45f58ac25367b4d115b02a14b2526ba96a861da"},{"author":{"_account_id":31664,"name":"Omer Schwartz","email":"oschwart@redhat.com","username":"oschwart"},"change_message_id":"4b7af647e1446d1d52f965e29e94fb8ee1efd369","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"9ba535c8_ac4d39b6","updated":"2022-10-27 16:04:08.000000000","message":"Just a kind suggestion :)","commit_id":"99443ad6b304ef4f611b2221cdeb89c0763fbde0"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"bd0dcd0d63d3d7b60a29f35308a1b9e8447363b3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"677d40c3_53ca3c20","updated":"2023-01-11 20:55:22.000000000","message":"Just two comments, otherwise looks good.","commit_id":"6826e8b7481a9b83ec928bc481990c5a0dcd9176"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"3dd0df770a010d50b0ace3adb7405ece7b20ac3c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"ef65df26_6ff19287","updated":"2023-01-11 16:06:50.000000000","message":"recheck failure unrelated?!","commit_id":"6826e8b7481a9b83ec928bc481990c5a0dcd9176"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"38a428e336d35e396cb75103a50e2afd2cae8ed8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"63a8fe20_07c10c18","updated":"2023-01-12 15:39:23.000000000","message":"LGTM","commit_id":"1820a8a2c796d3aab58fb3ad31b16df5497e17c7"},{"author":{"_account_id":31664,"name":"Omer Schwartz","email":"oschwart@redhat.com","username":"oschwart"},"change_message_id":"9b4925640bdd498552d1ec19811ec78d63d30a58","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":10,"id":"857682cf_d4c1ef6f","updated":"2023-01-12 12:22:15.000000000","message":"Looks good to me","commit_id":"1820a8a2c796d3aab58fb3ad31b16df5497e17c7"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"e9bd2e786732ea984c5c773cbacd2dd117daa131","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"01bfc4e9_8f01e786","updated":"2023-02-02 16:16:45.000000000","message":"LGTM\nGood riddance","commit_id":"9a6eb74648b79d55c4e94629d106642dd18943d5"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"431003b9bd1b18c4056affd3ef477b1b033250c7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"2578288b_020e4d5c","updated":"2023-01-13 11:22:43.000000000","message":"recheck Could not connect to archive.ubuntu.com:80 (2620:2d:4000:1::16), connection timed out","commit_id":"9a6eb74648b79d55c4e94629d106642dd18943d5"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"2a0df57f1ee4ab11d57525abdd88a0eee7b9bdf4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"40d388dc_681fffc0","updated":"2023-02-03 17:29:17.000000000","message":"recheck pep8 fix merged","commit_id":"7a2df883a09d2f9877c640a77914c2f2b62f86e7"}],"octavia/amphorae/drivers/haproxy/rest_api_driver.py":[{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"28bda456a812ffcaaba50d7c151c4d15a1346f89","unresolved":true,"context_lines":[{"line_number":57,"context_line":"        super().__init__()"},{"line_number":58,"context_line":"        self.clients \u003d {"},{"line_number":59,"context_line":"            \u0027base\u0027: AmphoraAPIClientBase(),"},{"line_number":60,"context_line":"            \u00270.5\u0027: AmphoraAPIClient0_5(),"},{"line_number":61,"context_line":"            \u00271.0\u0027: AmphoraAPIClient1_0(),"},{"line_number":62,"context_line":"        }"},{"line_number":63,"context_line":"        self.cert_manager \u003d stevedore_driver.DriverManager("}],"source_content_type":"text/x-python","patch_set":4,"id":"c6349dd7_b777b76d","line":60,"range":{"start_line":60,"start_character":12,"end_line":60,"end_character":40},"updated":"2022-10-27 06:56:24.000000000","message":"split listeners use 0.5\ncombined listeners use 1.0\nI think we can safely remove everything that is related to this 0.5 API version","commit_id":"558ccdc0d48dfde0710abef16a0258a326c3bcce"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"e1e4f67a339033fd35f7b9ec43847535510086b7","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        super().__init__()"},{"line_number":58,"context_line":"        self.clients \u003d {"},{"line_number":59,"context_line":"            \u0027base\u0027: AmphoraAPIClientBase(),"},{"line_number":60,"context_line":"            \u00270.5\u0027: AmphoraAPIClient0_5(),"},{"line_number":61,"context_line":"            \u00271.0\u0027: AmphoraAPIClient1_0(),"},{"line_number":62,"context_line":"        }"},{"line_number":63,"context_line":"        self.cert_manager \u003d stevedore_driver.DriverManager("}],"source_content_type":"text/x-python","patch_set":4,"id":"b45d78ec_8f01d86c","line":60,"range":{"start_line":60,"start_character":12,"end_line":60,"end_character":40},"in_reply_to":"c6349dd7_b777b76d","updated":"2022-10-27 09:23:50.000000000","message":"Thanks, I missed that.","commit_id":"558ccdc0d48dfde0710abef16a0258a326c3bcce"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"d2829626af2532764bbd442fb155a8784a81deb0","unresolved":true,"context_lines":[{"line_number":104,"context_line":"                    raise_retry_exception\u003draise_retry_exception)[\u0027api_version\u0027]"},{"line_number":105,"context_line":"            except exc.NotFound:"},{"line_number":106,"context_line":"                # Amphora is too old for version discovery, default to 0.5"},{"line_number":107,"context_line":"                amphora.api_version \u003d \u00270.5\u0027"},{"line_number":108,"context_line":"        LOG.debug(\u0027Amphora %s has API version %s\u0027,"},{"line_number":109,"context_line":"                  amphora.id, amphora.api_version)"},{"line_number":110,"context_line":"        return list(map(int, amphora.api_version.split(\u0027.\u0027)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"82807bf0_eceb430c","line":107,"range":{"start_line":107,"start_character":16,"end_line":107,"end_character":43},"updated":"2022-10-27 07:00:51.000000000","message":"it could be replaced by an error message/exception because of the API version of the amphora is unsupported","commit_id":"558ccdc0d48dfde0710abef16a0258a326c3bcce"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"e1e4f67a339033fd35f7b9ec43847535510086b7","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                    raise_retry_exception\u003draise_retry_exception)[\u0027api_version\u0027]"},{"line_number":105,"context_line":"            except exc.NotFound:"},{"line_number":106,"context_line":"                # Amphora is too old for version discovery, default to 0.5"},{"line_number":107,"context_line":"                amphora.api_version \u003d \u00270.5\u0027"},{"line_number":108,"context_line":"        LOG.debug(\u0027Amphora %s has API version %s\u0027,"},{"line_number":109,"context_line":"                  amphora.id, amphora.api_version)"},{"line_number":110,"context_line":"        return list(map(int, amphora.api_version.split(\u0027.\u0027)))"}],"source_content_type":"text/x-python","patch_set":4,"id":"2cdb5c4f_77ae6be7","line":107,"range":{"start_line":107,"start_character":16,"end_line":107,"end_character":43},"in_reply_to":"82807bf0_eceb430c","updated":"2022-10-27 09:23:50.000000000","message":"Yes. The exception was raised in line 141, but I can move it here if you prefer.","commit_id":"558ccdc0d48dfde0710abef16a0258a326c3bcce"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"28bda456a812ffcaaba50d7c151c4d15a1346f89","unresolved":true,"context_lines":[{"line_number":765,"context_line":"        return r.json()"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"class AmphoraAPIClient0_5(AmphoraAPIClientBase):"},{"line_number":769,"context_line":"    def __init__(self):"},{"line_number":770,"context_line":"        super().__init__()"},{"line_number":771,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"74fade79_7335df6d","line":768,"range":{"start_line":768,"start_character":6,"end_line":768,"end_character":25},"updated":"2022-10-27 06:56:24.000000000","message":"this class is no longer needed","commit_id":"558ccdc0d48dfde0710abef16a0258a326c3bcce"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"e1e4f67a339033fd35f7b9ec43847535510086b7","unresolved":false,"context_lines":[{"line_number":765,"context_line":"        return r.json()"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":""},{"line_number":768,"context_line":"class AmphoraAPIClient0_5(AmphoraAPIClientBase):"},{"line_number":769,"context_line":"    def __init__(self):"},{"line_number":770,"context_line":"        super().__init__()"},{"line_number":771,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"b4803feb_08adc7cc","line":768,"range":{"start_line":768,"start_character":6,"end_line":768,"end_character":25},"in_reply_to":"74fade79_7335df6d","updated":"2022-10-27 09:23:50.000000000","message":"Done","commit_id":"558ccdc0d48dfde0710abef16a0258a326c3bcce"},{"author":{"_account_id":31664,"name":"Omer Schwartz","email":"oschwart@redhat.com","username":"oschwart"},"change_message_id":"1a000b595452ef77bede344c31c50d781053b015","unresolved":true,"context_lines":[{"line_number":249,"context_line":"                api_version \u003d self._populate_amphora_api_version("},{"line_number":250,"context_line":"                    amp, timeout_dict\u003dtimeout_dict)"},{"line_number":251,"context_line":"                # Check which config style to use"},{"line_number":252,"context_line":"                if api_version[0] \u003d\u003d 0 and api_version[1] \u003c\u003d 5:"},{"line_number":253,"context_line":"                    # 0.5 or earlier"},{"line_number":254,"context_line":"                    LOG.warning("},{"line_number":255,"context_line":"                        \u0027Amphora %s for loadbalancer %s needs upgrade to \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"7980fc47_644c2bbd","line":252,"range":{"start_line":252,"start_character":16,"end_line":252,"end_character":62},"updated":"2022-10-27 10:47:42.000000000","message":"This part needs to be modified too","commit_id":"b45f58ac25367b4d115b02a14b2526ba96a861da"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"b1c5aca5ba94179b1604ac274d5790fa0ba968c4","unresolved":false,"context_lines":[{"line_number":249,"context_line":"                api_version \u003d self._populate_amphora_api_version("},{"line_number":250,"context_line":"                    amp, timeout_dict\u003dtimeout_dict)"},{"line_number":251,"context_line":"                # Check which config style to use"},{"line_number":252,"context_line":"                if api_version[0] \u003d\u003d 0 and api_version[1] \u003c\u003d 5:"},{"line_number":253,"context_line":"                    # 0.5 or earlier"},{"line_number":254,"context_line":"                    LOG.warning("},{"line_number":255,"context_line":"                        \u0027Amphora %s for loadbalancer %s needs upgrade to \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"95fa3530_27df7dee","line":252,"range":{"start_line":252,"start_character":16,"end_line":252,"end_character":62},"in_reply_to":"7980fc47_644c2bbd","updated":"2022-10-27 12:49:18.000000000","message":"Done","commit_id":"b45f58ac25367b4d115b02a14b2526ba96a861da"},{"author":{"_account_id":31664,"name":"Omer Schwartz","email":"oschwart@redhat.com","username":"oschwart"},"change_message_id":"1a000b595452ef77bede344c31c50d781053b015","unresolved":true,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        # In case the listener is not UDP or SCTP, things get more complicated."},{"line_number":294,"context_line":"        # We need to do this individually for each amphora in case some are"},{"line_number":295,"context_line":"        # using split config and others are using combined config."},{"line_number":296,"context_line":"        for amp in loadbalancer.amphorae:"},{"line_number":297,"context_line":"            if amp.status !\u003d consts.DELETED:"},{"line_number":298,"context_line":"                api_version \u003d self._populate_amphora_api_version(amp)"}],"source_content_type":"text/x-python","patch_set":5,"id":"581a37a2_7bebcda6","line":295,"range":{"start_line":295,"start_character":16,"end_line":295,"end_character":28},"updated":"2022-10-27 10:47:42.000000000","message":"This part needs to be modified too","commit_id":"b45f58ac25367b4d115b02a14b2526ba96a861da"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"b1c5aca5ba94179b1604ac274d5790fa0ba968c4","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        # In case the listener is not UDP or SCTP, things get more complicated."},{"line_number":294,"context_line":"        # We need to do this individually for each amphora in case some are"},{"line_number":295,"context_line":"        # using split config and others are using combined config."},{"line_number":296,"context_line":"        for amp in loadbalancer.amphorae:"},{"line_number":297,"context_line":"            if amp.status !\u003d consts.DELETED:"},{"line_number":298,"context_line":"                api_version \u003d self._populate_amphora_api_version(amp)"}],"source_content_type":"text/x-python","patch_set":5,"id":"28d6d32a_d7f77031","line":295,"range":{"start_line":295,"start_character":16,"end_line":295,"end_character":28},"in_reply_to":"581a37a2_7bebcda6","updated":"2022-10-27 12:49:18.000000000","message":"Done","commit_id":"b45f58ac25367b4d115b02a14b2526ba96a861da"},{"author":{"_account_id":31664,"name":"Omer Schwartz","email":"oschwart@redhat.com","username":"oschwart"},"change_message_id":"1a000b595452ef77bede344c31c50d781053b015","unresolved":true,"context_lines":[{"line_number":297,"context_line":"            if amp.status !\u003d consts.DELETED:"},{"line_number":298,"context_line":"                api_version \u003d self._populate_amphora_api_version(amp)"},{"line_number":299,"context_line":"                # Check which config style to use"},{"line_number":300,"context_line":"                if api_version[0] \u003d\u003d 0 and api_version[1] \u003c\u003d 5:"},{"line_number":301,"context_line":"                    # 0.5 or earlier"},{"line_number":302,"context_line":"                    LOG.warning("},{"line_number":303,"context_line":"                        \u0027Amphora %s for loadbalancer %s needs upgrade to \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"51fa673c_d582e179","line":300,"range":{"start_line":300,"start_character":16,"end_line":300,"end_character":63},"updated":"2022-10-27 10:47:42.000000000","message":"This part needs to be modified too","commit_id":"b45f58ac25367b4d115b02a14b2526ba96a861da"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"b1c5aca5ba94179b1604ac274d5790fa0ba968c4","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            if amp.status !\u003d consts.DELETED:"},{"line_number":298,"context_line":"                api_version \u003d self._populate_amphora_api_version(amp)"},{"line_number":299,"context_line":"                # Check which config style to use"},{"line_number":300,"context_line":"                if api_version[0] \u003d\u003d 0 and api_version[1] \u003c\u003d 5:"},{"line_number":301,"context_line":"                    # 0.5 or earlier"},{"line_number":302,"context_line":"                    LOG.warning("},{"line_number":303,"context_line":"                        \u0027Amphora %s for loadbalancer %s needs upgrade to \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"f1a77db8_763e9e85","line":300,"range":{"start_line":300,"start_character":16,"end_line":300,"end_character":63},"in_reply_to":"51fa673c_d582e179","updated":"2022-10-27 12:49:18.000000000","message":"Done","commit_id":"b45f58ac25367b4d115b02a14b2526ba96a861da"},{"author":{"_account_id":31664,"name":"Omer Schwartz","email":"oschwart@redhat.com","username":"oschwart"},"change_message_id":"4b7af647e1446d1d52f965e29e94fb8ee1efd369","unresolved":true,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":45,"context_line":"API_VERSION \u003d consts.API_VERSION"},{"line_number":46,"context_line":"OCTAVIA_API_CLIENT \u003d ("},{"line_number":47,"context_line":"    \"Octavia HaProxy Rest Client/{version} \""},{"line_number":48,"context_line":"    \"(https://wiki.openstack.org/wiki/Octavia)\").format(version\u003dAPI_VERSION)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3cded4a9_cf7d0451","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":32},"updated":"2022-10-27 16:04:08.000000000","message":"I see that it is the only place in the code that uses consts.API_VERSION, and on line #46 it is the only place where it uses API_VERSION","commit_id":"99443ad6b304ef4f611b2221cdeb89c0763fbde0"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"c7f40a11a20a86e7d5689241604b8ec9b35a1adb","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":45,"context_line":"API_VERSION \u003d consts.API_VERSION"},{"line_number":46,"context_line":"OCTAVIA_API_CLIENT \u003d ("},{"line_number":47,"context_line":"    \"Octavia HaProxy Rest Client/{version} \""},{"line_number":48,"context_line":"    \"(https://wiki.openstack.org/wiki/Octavia)\").format(version\u003dAPI_VERSION)"}],"source_content_type":"text/x-python","patch_set":7,"id":"a1b1795c_1deec10a","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":32},"in_reply_to":"02a6e31f_2db8419b","updated":"2023-01-12 10:24:32.000000000","message":"Done","commit_id":"99443ad6b304ef4f611b2221cdeb89c0763fbde0"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"bd0dcd0d63d3d7b60a29f35308a1b9e8447363b3","unresolved":true,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":45,"context_line":"API_VERSION \u003d consts.API_VERSION"},{"line_number":46,"context_line":"OCTAVIA_API_CLIENT \u003d ("},{"line_number":47,"context_line":"    \"Octavia HaProxy Rest Client/{version} \""},{"line_number":48,"context_line":"    \"(https://wiki.openstack.org/wiki/Octavia)\").format(version\u003dAPI_VERSION)"}],"source_content_type":"text/x-python","patch_set":7,"id":"02a6e31f_2db8419b","line":45,"range":{"start_line":45,"start_character":0,"end_line":45,"end_character":32},"in_reply_to":"3cded4a9_cf7d0451","updated":"2023-01-11 20:55:22.000000000","message":"Yeah, this is silly now and should be removed.\nAlso, it is hard coded. This should be fixed to reflect the actual client version being used.","commit_id":"99443ad6b304ef4f611b2221cdeb89c0763fbde0"},{"author":{"_account_id":31664,"name":"Omer Schwartz","email":"oschwart@redhat.com","username":"oschwart"},"change_message_id":"4b7af647e1446d1d52f965e29e94fb8ee1efd369","unresolved":true,"context_lines":[{"line_number":672,"context_line":"        reqargs.update(kwargs)"},{"line_number":673,"context_line":"        headers \u003d reqargs.setdefault(\u0027headers\u0027, {})"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"        headers[\u0027User-Agent\u0027] \u003d OCTAVIA_API_CLIENT"},{"line_number":676,"context_line":"        self.ssl_adapter.uuid \u003d amp.id"},{"line_number":677,"context_line":"        exception \u003d None"},{"line_number":678,"context_line":"        # Keep retrying"}],"source_content_type":"text/x-python","patch_set":7,"id":"b719b933_df6cd409","line":675,"updated":"2022-10-27 16:04:08.000000000","message":"That is the only place in the code that OCTAVIA_API_CLIENT is being used. So maybe we can make it a non global variable and use amp.api_version instead of consts.API_VERSION? This way we can also ditch the usage of API_VERSION in consts.","commit_id":"99443ad6b304ef4f611b2221cdeb89c0763fbde0"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"bd0dcd0d63d3d7b60a29f35308a1b9e8447363b3","unresolved":true,"context_lines":[{"line_number":672,"context_line":"        reqargs.update(kwargs)"},{"line_number":673,"context_line":"        headers \u003d reqargs.setdefault(\u0027headers\u0027, {})"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"        headers[\u0027User-Agent\u0027] \u003d OCTAVIA_API_CLIENT"},{"line_number":676,"context_line":"        self.ssl_adapter.uuid \u003d amp.id"},{"line_number":677,"context_line":"        exception \u003d None"},{"line_number":678,"context_line":"        # Keep retrying"}],"source_content_type":"text/x-python","patch_set":7,"id":"b9428529_826b65aa","line":675,"in_reply_to":"b719b933_df6cd409","updated":"2023-01-11 20:55:22.000000000","message":"Making it a global string means it\u0027s only allocated in memory once.\nThey could be moved inside the client instances (which should be singletons if I remember right) to have them instantiated with the client instance and removed from the global scope.\nSee the above comment about API_VERSION being hard coded for why this should probably change.","commit_id":"99443ad6b304ef4f611b2221cdeb89c0763fbde0"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"c7f40a11a20a86e7d5689241604b8ec9b35a1adb","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        reqargs.update(kwargs)"},{"line_number":673,"context_line":"        headers \u003d reqargs.setdefault(\u0027headers\u0027, {})"},{"line_number":674,"context_line":""},{"line_number":675,"context_line":"        headers[\u0027User-Agent\u0027] \u003d OCTAVIA_API_CLIENT"},{"line_number":676,"context_line":"        self.ssl_adapter.uuid \u003d amp.id"},{"line_number":677,"context_line":"        exception \u003d None"},{"line_number":678,"context_line":"        # Keep retrying"}],"source_content_type":"text/x-python","patch_set":7,"id":"553ee910_f0429847","line":675,"in_reply_to":"b9428529_826b65aa","updated":"2023-01-12 10:24:32.000000000","message":"Done","commit_id":"99443ad6b304ef4f611b2221cdeb89c0763fbde0"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"bd0dcd0d63d3d7b60a29f35308a1b9e8447363b3","unresolved":true,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        for amp in amphorae:"},{"line_number":246,"context_line":"            if amp.status !\u003d consts.DELETED:"},{"line_number":247,"context_line":"                LOG.debug("},{"line_number":248,"context_line":"                    \u0027Amphora %s for loadbalancer %s is already in single \u0027"},{"line_number":249,"context_line":"                    \u0027process mode.\u0027, amp.id, loadbalancer.id)"},{"line_number":250,"context_line":"                has_tcp \u003d False"}],"source_content_type":"text/x-python","patch_set":8,"id":"140cc4a7_b60789e3","line":247,"updated":"2023-01-11 20:55:22.000000000","message":"This log message is not actionable, so should just be removed.","commit_id":"6826e8b7481a9b83ec928bc481990c5a0dcd9176"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"c7f40a11a20a86e7d5689241604b8ec9b35a1adb","unresolved":false,"context_lines":[{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        for amp in amphorae:"},{"line_number":246,"context_line":"            if amp.status !\u003d consts.DELETED:"},{"line_number":247,"context_line":"                LOG.debug("},{"line_number":248,"context_line":"                    \u0027Amphora %s for loadbalancer %s is already in single \u0027"},{"line_number":249,"context_line":"                    \u0027process mode.\u0027, amp.id, loadbalancer.id)"},{"line_number":250,"context_line":"                has_tcp \u003d False"}],"source_content_type":"text/x-python","patch_set":8,"id":"595db3b4_89c6d8a5","line":247,"in_reply_to":"140cc4a7_b60789e3","updated":"2023-01-12 10:24:32.000000000","message":"Done","commit_id":"6826e8b7481a9b83ec928bc481990c5a0dcd9176"},{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"4d668f6d456dbe6ce95b8243960dce3954344f12","unresolved":true,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        for amp in amphorae:"},{"line_number":244,"context_line":"            if amp.status !\u003d consts.DELETED:"},{"line_number":245,"context_line":"                has_tcp \u003d False"},{"line_number":246,"context_line":"                for listener in loadbalancer.listeners:"},{"line_number":247,"context_line":"                    if listener.protocol in consts.LVS_PROTOCOLS:"},{"line_number":248,"context_line":"                        getattr(self.clients[amp.api_version], func_name)("}],"source_content_type":"text/x-python","patch_set":10,"id":"c212eeeb_0e0d3dd5","line":245,"range":{"start_line":245,"start_character":16,"end_line":245,"end_character":31},"updated":"2023-01-13 07:57:57.000000000","message":"you removed the call to self._populate_amphora_api_version() which sets amp.api_version, it means that at line 248 or 253, api_version might be None.\n\nIf I create a standalone LB with a UDP listener, then I trigger a failover of the amphora (not the LB), I get:\n\nJan 13 02:33:43 gthiemon-devstack octavia-worker[3753536]: WARNING octavia.controller.worker.v2.tasks.amphora_driver_tasks [-] Failed to reload listeners on amphora e778b291-d570-4e58-96ef-78f4c82a2c8f. Skipping this amphora as it is failing to reload due to: \u0027Amphora\u0027 object has no attribute \u0027api_version\u0027\n\nthen the amphora goes to ERROR","commit_id":"1820a8a2c796d3aab58fb3ad31b16df5497e17c7"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"a1195ae7adfee2d965ce5010a8baf8d46a8fa239","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        for amp in amphorae:"},{"line_number":244,"context_line":"            if amp.status !\u003d consts.DELETED:"},{"line_number":245,"context_line":"                has_tcp \u003d False"},{"line_number":246,"context_line":"                for listener in loadbalancer.listeners:"},{"line_number":247,"context_line":"                    if listener.protocol in consts.LVS_PROTOCOLS:"},{"line_number":248,"context_line":"                        getattr(self.clients[amp.api_version], func_name)("}],"source_content_type":"text/x-python","patch_set":10,"id":"0f594501_a462267c","line":245,"range":{"start_line":245,"start_character":16,"end_line":245,"end_character":31},"in_reply_to":"c212eeeb_0e0d3dd5","updated":"2023-01-13 08:15:41.000000000","message":"Good catch. Thanks!","commit_id":"1820a8a2c796d3aab58fb3ad31b16df5497e17c7"}],"octavia/tests/unit/amphorae/drivers/haproxy/test_rest_api_driver_1_0.py":[{"author":{"_account_id":29244,"name":"Gregory Thiemonge","email":"gthiemon@redhat.com","username":"gthiemonge"},"change_message_id":"33f9d32f7f3fbae49c81596b93b84b64760e6653","unresolved":true,"context_lines":[{"line_number":855,"context_line":"            self.amp, timeout_dict\u003dtimeout_dict)"},{"line_number":856,"context_line":"        self.assertEqual(ref_haproxy_versions, result)"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"    def test_populate_amphora_api_version(self):"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"        # Normal path, populate the version"},{"line_number":861,"context_line":"        # clear out any previous values"}],"source_content_type":"text/x-python","patch_set":12,"id":"9509cfba_451b0d6e","line":858,"range":{"start_line":858,"start_character":8,"end_line":858,"end_character":41},"updated":"2023-01-13 09:15:58.000000000","message":"I think we could have a test with \"0.5\", the raised exception is not covered here","commit_id":"9a6eb74648b79d55c4e94629d106642dd18943d5"},{"author":{"_account_id":34429,"name":"Tom Weininger","email":"dienste@weinimo.de","username":"tweining"},"change_message_id":"4132413c62aaa373cb4ea061ceaa7e57ffdd177a","unresolved":false,"context_lines":[{"line_number":855,"context_line":"            self.amp, timeout_dict\u003dtimeout_dict)"},{"line_number":856,"context_line":"        self.assertEqual(ref_haproxy_versions, result)"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"    def test_populate_amphora_api_version(self):"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"        # Normal path, populate the version"},{"line_number":861,"context_line":"        # clear out any previous values"}],"source_content_type":"text/x-python","patch_set":12,"id":"a81f794e_af0eee08","line":858,"range":{"start_line":858,"start_character":8,"end_line":858,"end_character":41},"in_reply_to":"9509cfba_451b0d6e","updated":"2023-01-13 10:52:16.000000000","message":"Added in follow-up patch.","commit_id":"9a6eb74648b79d55c4e94629d106642dd18943d5"}]}
