)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"92ebda2d328765c9b3ed894a526b15064ddb89f2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d1e46410_845b7c60","updated":"2025-03-04 18:08:51.000000000","message":"My comments here are non blocking can be fixed later in a follwoup","commit_id":"b227efd967f3617d41ce07b500857d313ff86186"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d059529435c3d68a2556780eabae163d186086de","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"70dd7502_6281e4a5","updated":"2025-03-10 15:49:18.000000000","message":"recheck parent merged","commit_id":"b227efd967f3617d41ce07b500857d313ff86186"}],"nova/tests/fixtures/libvirt.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"45a4f8d948c2faed4376c622eefcb2bc0848fbd1","unresolved":true,"context_lines":[{"line_number":965,"context_line":"def _parse_hostdev_info(element):"},{"line_number":966,"context_line":"    hostdev_info \u003d {}"},{"line_number":967,"context_line":"    hostdev_info[\u0027type\u0027] \u003d element.get(\u0027type\u0027, \u0027pci\u0027)"},{"line_number":968,"context_line":"    hostdev_info[\u0027managed\u0027] \u003d element.get(\u0027managed\u0027, \u0027pci\u0027)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"    source \u003d element.find(\u0027./source\u0027)"},{"line_number":971,"context_line":"    if source is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"59126701_6b4a2878","line":968,"updated":"2025-03-04 12:37:38.000000000","message":"copy pasta: you probably want to default this to \u0027yes\u0027 instead of \u0027pci\u0027","commit_id":"b227efd967f3617d41ce07b500857d313ff86186"}],"nova/tests/functional/libvirt/test_pci_sriov_servers.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f3c58ebf10109b2b4c6668a1f2daa3cd9067a862","unresolved":true,"context_lines":[{"line_number":1168,"context_line":"        # many unit tests rely on it for different side effects."},{"line_number":1169,"context_line":"        with mock.patch(\"threading.Event.wait\", side_effect\u003d[True]):"},{"line_number":1170,"context_line":"            # now live migrate that server"},{"line_number":1171,"context_line":"            self._live_migrate(server, \"completed\")"},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"        # we should now have transitioned our usage to the destination, freeing"},{"line_number":1174,"context_line":"        # up the source in the process"}],"source_content_type":"text/x-python","patch_set":1,"id":"05d6c93d_f595681f","line":1171,"updated":"2025-03-04 09:28:57.000000000","message":"are we sure this is required for that patch ? Nevermind, I\u0027m cool with not holding on that nit.","commit_id":"b227efd967f3617d41ce07b500857d313ff86186"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"45a4f8d948c2faed4376c622eefcb2bc0848fbd1","unresolved":true,"context_lines":[{"line_number":1168,"context_line":"        # many unit tests rely on it for different side effects."},{"line_number":1169,"context_line":"        with mock.patch(\"threading.Event.wait\", side_effect\u003d[True]):"},{"line_number":1170,"context_line":"            # now live migrate that server"},{"line_number":1171,"context_line":"            self._live_migrate(server, \"completed\")"},{"line_number":1172,"context_line":""},{"line_number":1173,"context_line":"        # we should now have transitioned our usage to the destination, freeing"},{"line_number":1174,"context_line":"        # up the source in the process"}],"source_content_type":"text/x-python","patch_set":1,"id":"343ad7e1_839c33c9","line":1171,"in_reply_to":"05d6c93d_f595681f","updated":"2025-03-04 12:37:38.000000000","message":"Details are in the comment thread https://review.opendev.org/c/openstack/nova/+/942147/comment/52c61254_05ddd111/\n\nI still suggest to move the mocking to the libvirt fixture instead of having it in the test case. Any libvirt based PCI detach tests needs this logic.\n\nAlso I suggest to mock the nova.virt.libvirt.driver.AsyncDeviceEventsHandler.wait instead of threading.Event.wait as the latter is too generic. We could very well have a lot of other waits in the code that works and does not need to be mocked. However we do know that the current libvirt fixture, this patch extends, are not emiting libvirt device lifecycle notifications and therefore the wait in nova.virt.libvirt.driver.AsyncDeviceEventsHandler.wait needs to be mocked to unblock the the virt driver whan the libvirt fixture is used.","commit_id":"b227efd967f3617d41ce07b500857d313ff86186"}]}
