)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"745a413dc00403053c016fb035692023be2aa5ee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4c83a3c2_56dce65d","updated":"2024-02-21 16:28:40.000000000","message":"This test is generally BAD. (Left some comments that I don\u0027t expect you to address here or at all.) But at least we should not loosen its validation even further - please explicitly assert the proper HOSTD is passed in the `else` branch.","commit_id":"4f646e25e7975614ee3186fe551c505169317312"}],"neutron/tests/unit/db/test_agentschedulers_db.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b2fc1e0f9f77c3e73b6a7472e6708cda37388100","unresolved":true,"context_lines":[{"line_number":1598,"context_line":"                        dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"},{"line_number":1599,"context_line":"                    high_host \u003d DHCP_HOSTC"},{"line_number":1600,"context_line":"                    hosts.pop(1)"},{"line_number":1601,"context_line":"                elif DHCP_HOSTD in str(host_call):"},{"line_number":1602,"context_line":"                    expected_high_calls \u003d self._notification_mocks("},{"line_number":1603,"context_line":"                        [DHCP_HOSTD], net, subnet, port,"},{"line_number":1604,"context_line":"                        dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f2984b0_d2f63769","side":"PARENT","line":1601,"range":{"start_line":1601,"start_character":16,"end_line":1601,"end_character":50},"updated":"2024-02-18 17:02:56.000000000","message":"Why this change?","commit_id":"267690b505281b855384444379633b2bc162f140"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bd105a796cf625cf68353076c4a702058bed60a8","unresolved":false,"context_lines":[{"line_number":1598,"context_line":"                        dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"},{"line_number":1599,"context_line":"                    high_host \u003d DHCP_HOSTC"},{"line_number":1600,"context_line":"                    hosts.pop(1)"},{"line_number":1601,"context_line":"                elif DHCP_HOSTD in str(host_call):"},{"line_number":1602,"context_line":"                    expected_high_calls \u003d self._notification_mocks("},{"line_number":1603,"context_line":"                        [DHCP_HOSTD], net, subnet, port,"},{"line_number":1604,"context_line":"                        dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"}],"source_content_type":"text/x-python","patch_set":1,"id":"e5f60ff5_bbc771c9","side":"PARENT","line":1601,"range":{"start_line":1601,"start_character":16,"end_line":1601,"end_character":50},"in_reply_to":"81c37c53_915f2652","updated":"2024-02-22 00:20:33.000000000","message":"Actually, if I move some code around the warning goes away, let me push an update. I can address some of the other comments as well.\n\nIn the end it\u0027s only a test...","commit_id":"267690b505281b855384444379633b2bc162f140"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"e85f9727b86a724ea19bebea03491371298c5c76","unresolved":true,"context_lines":[{"line_number":1598,"context_line":"                        dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"},{"line_number":1599,"context_line":"                    high_host \u003d DHCP_HOSTC"},{"line_number":1600,"context_line":"                    hosts.pop(1)"},{"line_number":1601,"context_line":"                elif DHCP_HOSTD in str(host_call):"},{"line_number":1602,"context_line":"                    expected_high_calls \u003d self._notification_mocks("},{"line_number":1603,"context_line":"                        [DHCP_HOSTD], net, subnet, port,"},{"line_number":1604,"context_line":"                        dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c62046d7_2bfb10e3","side":"PARENT","line":1601,"range":{"start_line":1601,"start_character":16,"end_line":1601,"end_character":50},"in_reply_to":"9f2984b0_d2f63769","updated":"2024-02-19 21:15:41.000000000","message":"pylint is complaining expected_high_calls and high_host are used before assignment. They really aren\u0027t, but the elif is throwing it off. One of these three values (DHCP_HOSTA, DHCP_HOSTC, DHCP_HOSTD) is always set, but without an \u0027else\u0027 pylint assumes there is a case that can\u0027t be hit, generating the warning.\n\n************* Module neutron.tests.unit.db.test_agentschedulers_db\nneutron/tests/unit/db/test_agentschedulers_db.py:1610:24: E0601: Using variable \u0027expected_high_calls\u0027 before assignment (used-before-assignment)\nneutron/tests/unit/db/test_agentschedulers_db.py:1610:44: E0601: Using variable \u0027high_host\u0027 before assignment (used-before-assignment)\n\nAdding an \u0027else\u0027 with a self.fail() does not help, this was the easiest option and is used in other places, it\u0027s just not as obvious here.","commit_id":"267690b505281b855384444379633b2bc162f140"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"745a413dc00403053c016fb035692023be2aa5ee","unresolved":true,"context_lines":[{"line_number":1598,"context_line":"                        dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"},{"line_number":1599,"context_line":"                    high_host \u003d DHCP_HOSTC"},{"line_number":1600,"context_line":"                    hosts.pop(1)"},{"line_number":1601,"context_line":"                elif DHCP_HOSTD in str(host_call):"},{"line_number":1602,"context_line":"                    expected_high_calls \u003d self._notification_mocks("},{"line_number":1603,"context_line":"                        [DHCP_HOSTD], net, subnet, port,"},{"line_number":1604,"context_line":"                        dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"}],"source_content_type":"text/x-python","patch_set":1,"id":"81c37c53_915f2652","side":"PARENT","line":1601,"range":{"start_line":1601,"start_character":16,"end_line":1601,"end_character":50},"in_reply_to":"c62046d7_2bfb10e3","updated":"2024-02-21 16:28:40.000000000","message":"Should we then have an explicit assert in the `else` branch confirming that DHCP_HOSTD is passed?","commit_id":"267690b505281b855384444379633b2bc162f140"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"745a413dc00403053c016fb035692023be2aa5ee","unresolved":true,"context_lines":[{"line_number":1582,"context_line":"        cfg.CONF.set_override(\u0027dhcp_agents_per_network\u0027, 3)"},{"line_number":1583,"context_line":"        hosts \u003d [DHCP_HOSTA, DHCP_HOSTC, DHCP_HOSTD]"},{"line_number":1584,"context_line":"        net, subnet, port \u003d self._network_port_create(hosts)"},{"line_number":1585,"context_line":"        for host_call in self.dhcp_notifier_cast.call_args_list:"},{"line_number":1586,"context_line":"            if (\"\u0027priority\u0027: \" + str("},{"line_number":1587,"context_line":"                    dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"},{"line_number":1588,"context_line":"                    in str(host_call)):"}],"source_content_type":"text/x-python","patch_set":1,"id":"b2cb2a13_67d0996f","line":1585,"updated":"2024-02-21 16:28:40.000000000","message":"this `for` may silently swallow change in behavior if notifier `cast` ever gets not called. Then `expected_high_calls` won\u0027t be initialized and the test will crash with `NameError` later.","commit_id":"4f646e25e7975614ee3186fe551c505169317312"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"cbe433f68df3eb621f2d204306b74aed514f1a70","unresolved":false,"context_lines":[{"line_number":1582,"context_line":"        cfg.CONF.set_override(\u0027dhcp_agents_per_network\u0027, 3)"},{"line_number":1583,"context_line":"        hosts \u003d [DHCP_HOSTA, DHCP_HOSTC, DHCP_HOSTD]"},{"line_number":1584,"context_line":"        net, subnet, port \u003d self._network_port_create(hosts)"},{"line_number":1585,"context_line":"        for host_call in self.dhcp_notifier_cast.call_args_list:"},{"line_number":1586,"context_line":"            if (\"\u0027priority\u0027: \" + str("},{"line_number":1587,"context_line":"                    dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"},{"line_number":1588,"context_line":"                    in str(host_call)):"}],"source_content_type":"text/x-python","patch_set":1,"id":"6ff50c57_c4b05d9a","line":1585,"in_reply_to":"b2cb2a13_67d0996f","updated":"2024-02-22 01:07:14.000000000","message":"Done","commit_id":"4f646e25e7975614ee3186fe551c505169317312"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"745a413dc00403053c016fb035692023be2aa5ee","unresolved":true,"context_lines":[{"line_number":1583,"context_line":"        hosts \u003d [DHCP_HOSTA, DHCP_HOSTC, DHCP_HOSTD]"},{"line_number":1584,"context_line":"        net, subnet, port \u003d self._network_port_create(hosts)"},{"line_number":1585,"context_line":"        for host_call in self.dhcp_notifier_cast.call_args_list:"},{"line_number":1586,"context_line":"            if (\"\u0027priority\u0027: \" + str("},{"line_number":1587,"context_line":"                    dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"},{"line_number":1588,"context_line":"                    in str(host_call)):"},{"line_number":1589,"context_line":"                if DHCP_HOSTA in str(host_call):"}],"source_content_type":"text/x-python","patch_set":1,"id":"81686626_e94d19e9","line":1586,"updated":"2024-02-21 16:28:40.000000000","message":"it\u0027s weird that it doesn\u0027t complain that this `if` doesn\u0027t have an `else` catch-all branch to initialize `expected_high_calls` and `high_host`...","commit_id":"4f646e25e7975614ee3186fe551c505169317312"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"745a413dc00403053c016fb035692023be2aa5ee","unresolved":true,"context_lines":[{"line_number":1585,"context_line":"        for host_call in self.dhcp_notifier_cast.call_args_list:"},{"line_number":1586,"context_line":"            if (\"\u0027priority\u0027: \" + str("},{"line_number":1587,"context_line":"                    dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"},{"line_number":1588,"context_line":"                    in str(host_call)):"},{"line_number":1589,"context_line":"                if DHCP_HOSTA in str(host_call):"},{"line_number":1590,"context_line":"                    expected_high_calls \u003d self._notification_mocks("},{"line_number":1591,"context_line":"                        [DHCP_HOSTA], net, subnet, port,"}],"source_content_type":"text/x-python","patch_set":1,"id":"72b7f78a_942effca","line":1588,"updated":"2024-02-21 16:28:40.000000000","message":"this str(...) is calculated thrice in this block, should probably calculate it once before the `if` and reuse.","commit_id":"4f646e25e7975614ee3186fe551c505169317312"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"bd105a796cf625cf68353076c4a702058bed60a8","unresolved":false,"context_lines":[{"line_number":1585,"context_line":"        for host_call in self.dhcp_notifier_cast.call_args_list:"},{"line_number":1586,"context_line":"            if (\"\u0027priority\u0027: \" + str("},{"line_number":1587,"context_line":"                    dhcp_rpc_agent_api.PRIORITY_PORT_CREATE_HIGH)"},{"line_number":1588,"context_line":"                    in str(host_call)):"},{"line_number":1589,"context_line":"                if DHCP_HOSTA in str(host_call):"},{"line_number":1590,"context_line":"                    expected_high_calls \u003d self._notification_mocks("},{"line_number":1591,"context_line":"                        [DHCP_HOSTA], net, subnet, port,"}],"source_content_type":"text/x-python","patch_set":1,"id":"4eb81e38_aa3a5014","line":1588,"in_reply_to":"72b7f78a_942effca","updated":"2024-02-22 00:20:33.000000000","message":"Done","commit_id":"4f646e25e7975614ee3186fe551c505169317312"}]}
