)]}'
{"ovn_bgp_agent/tests/functional/utils/test_linux_net.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d12d4ab82752a6a0b7639fb130f173981c047a29","unresolved":true,"context_lines":[{"line_number":42,"context_line":"        devices \u003d test_priv_linux_net.get_devices_info()"},{"line_number":43,"context_line":"        for device in devices.values():"},{"line_number":44,"context_line":"            if device[\u0027name\u0027] \u003d\u003d device_name:"},{"line_number":45,"context_line":"                return device"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def test_get_interfaces(self):"},{"line_number":48,"context_line":"        dev_names \u003d list(map(lambda x: uuidutils.generate_uuid()[:15],"}],"source_content_type":"text/x-python","patch_set":1,"id":"13eb3959_af7a4340","line":45,"updated":"2023-06-27 12:50:55.000000000","message":"See comment below for context\n\n```\n    @tenacity.retry(...\n         retry\u003dtenacity.retry_if_exception_type(DeviceNotFound),\n         ...)\n    def _get_device(self, device_name):\n        devices \u003d test_priv_linux_net.get_devices_info()\n        for device in devices.values():\n            if device[\u0027name\u0027] \u003d\u003d device_name:\n                return device\n         else:\n             raise DeviceNotFound()\n```","commit_id":"3625ad24f3926e700a65307609786e9bdc0915fd"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"28732a85bbebef02c2c1067a19ca96fbd43f5a37","unresolved":true,"context_lines":[{"line_number":42,"context_line":"        devices \u003d test_priv_linux_net.get_devices_info()"},{"line_number":43,"context_line":"        for device in devices.values():"},{"line_number":44,"context_line":"            if device[\u0027name\u0027] \u003d\u003d device_name:"},{"line_number":45,"context_line":"                return device"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def test_get_interfaces(self):"},{"line_number":48,"context_line":"        dev_names \u003d list(map(lambda x: uuidutils.generate_uuid()[:15],"}],"source_content_type":"text/x-python","patch_set":1,"id":"17538923_6badbbac","line":45,"in_reply_to":"13eb3959_af7a4340","updated":"2023-06-28 06:29:49.000000000","message":"this does not work and the error gets reproduced. The problem is not that this was missing to find the devices, is that seems to be picking the wrong mac, actually, maybe the problem is with the `mac \u003d linux_net.get_interface_address(dev_name)` instead, as I don\u0027t remember hitting this on the get_interface_index\n\nFAIL: ovn_bgp_agent.tests.functional.utils.test_linux_net.GetInterfaceTestCase.test_get_interface_address\n\nTraceback (most recent call last):\n  File \"/home/ltomasbo/git_repos/ovn-bgp-agent/ovn_bgp_agent/tests/functional/base.py\", line 59, in func\n    return f(self, *args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/home/ltomasbo/git_repos/ovn-bgp-agent/ovn_bgp_agent/tests/functional/utils/test_linux_net.py\", line 83, in test_get_interface_address\n    self.assertEqual(device[\u0027mac\u0027], mac)\n  File \"/home/ltomasbo/git_repos/ovn-bgp-agent/.tox/functional/lib/python3.11/site-packages/testtools/testcase.py\", line 394, in assertEqual\n    self.assertThat(observed, matcher, message)\n  File \"/home/ltomasbo/git_repos/ovn-bgp-agent/.tox/functional/lib/python3.11/site-packages/testtools/testcase.py\", line 481, in assertThat\n    raise mismatch_error\ntesttools.matchers._impl.MismatchError: \u0027f6:9a:08:48:f3:16\u0027 !\u003d \u0027e2:d6:9c:ca:c4:93\u0027\n\n\nI actually don\u0027t understand how this can happen...","commit_id":"3625ad24f3926e700a65307609786e9bdc0915fd"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"dd0c77b9e55038a17342c345045f68b7d413097d","unresolved":true,"context_lines":[{"line_number":42,"context_line":"        devices \u003d test_priv_linux_net.get_devices_info()"},{"line_number":43,"context_line":"        for device in devices.values():"},{"line_number":44,"context_line":"            if device[\u0027name\u0027] \u003d\u003d device_name:"},{"line_number":45,"context_line":"                return device"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def test_get_interfaces(self):"},{"line_number":48,"context_line":"        dev_names \u003d list(map(lambda x: uuidutils.generate_uuid()[:15],"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aeb888f_df8aca9b","line":45,"in_reply_to":"17538923_6badbbac","updated":"2023-06-28 08:24:44.000000000","message":"Strange indeed.\n\nI also do not understand how the sleep() helps with this ?\n\nIt seems to me like we uncovered a different bug which is not related to synchronization","commit_id":"3625ad24f3926e700a65307609786e9bdc0915fd"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"43fe7c4078a19d8532753d9fcc816fe1bede61d3","unresolved":true,"context_lines":[{"line_number":42,"context_line":"        devices \u003d test_priv_linux_net.get_devices_info()"},{"line_number":43,"context_line":"        for device in devices.values():"},{"line_number":44,"context_line":"            if device[\u0027name\u0027] \u003d\u003d device_name:"},{"line_number":45,"context_line":"                return device"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def test_get_interfaces(self):"},{"line_number":48,"context_line":"        dev_names \u003d list(map(lambda x: uuidutils.generate_uuid()[:15],"}],"source_content_type":"text/x-python","patch_set":1,"id":"42840546_2e59eb45","line":45,"in_reply_to":"9aeb888f_df8aca9b","updated":"2023-06-28 08:26:43.000000000","message":"Could it be a device with the same name but belonging to a different test ? If you run this test without parallelization, it works ?","commit_id":"3625ad24f3926e700a65307609786e9bdc0915fd"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d12d4ab82752a6a0b7639fb130f173981c047a29","unresolved":true,"context_lines":[{"line_number":57,"context_line":"    def test_get_interface_index(self):"},{"line_number":58,"context_line":"        dev_name \u003d uuidutils.generate_uuid()[:15]"},{"line_number":59,"context_line":"        self.addCleanup(self._delete_interfaces, [dev_name])"},{"line_number":60,"context_line":"        priv_linux_net.create_interface(dev_name, \u0027dummy\u0027)"},{"line_number":61,"context_line":"        device \u003d self._get_device(dev_name)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        ret \u003d linux_net.get_interface_index(dev_name)"},{"line_number":64,"context_line":"        self.assertEqual(device[\u0027index\u0027], ret)"}],"source_content_type":"text/x-python","patch_set":1,"id":"c6e989a8_6668d0b4","line":61,"range":{"start_line":60,"start_character":0,"end_line":61,"end_character":43},"updated":"2023-06-27 12:50:55.000000000","message":"Could happen here too ?\n\nIf we implement the tenacity retry it should solve for this too","commit_id":"3625ad24f3926e700a65307609786e9bdc0915fd"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d12d4ab82752a6a0b7639fb130f173981c047a29","unresolved":true,"context_lines":[{"line_number":70,"context_line":"        for dev_name in dev_names:"},{"line_number":71,"context_line":"            priv_linux_net.create_interface(dev_name, \u0027dummy\u0027)"},{"line_number":72,"context_line":"            # Ensure the interface is created before the next steps"},{"line_number":73,"context_line":"            time.sleep(1)"},{"line_number":74,"context_line":"            device \u003d self._get_device(dev_name)"},{"line_number":75,"context_line":"            mac \u003d linux_net.get_interface_address(dev_name)"},{"line_number":76,"context_line":"            self.assertEqual(device[\u0027mac\u0027], mac)"}],"source_content_type":"text/x-python","patch_set":1,"id":"a11bc9d8_1aa09e20","line":73,"updated":"2023-06-27 12:50:55.000000000","message":"Not really fond of sleep() where it can be avoided. There\u0027s no guarantee that 1s is enough if running on a busy host.\n\nShould we make _get_device() more resilient instead ? See comment above","commit_id":"3625ad24f3926e700a65307609786e9bdc0915fd"}]}
