)]}'
{"neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb/extensions/test_placement.py":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"d8f4997aa98ae2fce7ecc67c24becf345f494a14","unresolved":true,"context_lines":[{"line_number":36,"context_line":"        # cleanup) is not enough to get rid of a stale instance."},{"line_number":37,"context_line":"        # Explicitly drop the singleton so a fresh instance is created"},{"line_number":38,"context_line":"        # with the driver of this test."},{"line_number":39,"context_line":"        p_extension.OVNClientPlacementExtension.drop()"},{"line_number":40,"context_line":"        self.plugin_driver \u003d mock.Mock()"},{"line_number":41,"context_line":"        self.placement_driver \u003d p_extension.OVNClientPlacementExtension("},{"line_number":42,"context_line":"            self.plugin_driver)"}],"source_content_type":"text/x-python","patch_set":1,"id":"0417529e_77d29dcf","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":54},"updated":"2026-10-05 09:00:22.000000000","message":"why not adding it to _delete_placement_singleton_instance? that is added with addcleanup so I suppose that makes sure that the instance is cleaned nicely","commit_id":"fff93aa919f0bb6d82b4457e841be6663a29ebad"},{"author":{"_account_id":6476,"name":"Thomas Goirand","email":"thomas@goirand.fr","username":"thomas-goirand"},"change_message_id":"2ee88d2247ca7fd0a9b7dcf343907856b86ca1bd","unresolved":true,"context_lines":[{"line_number":36,"context_line":"        # cleanup) is not enough to get rid of a stale instance."},{"line_number":37,"context_line":"        # Explicitly drop the singleton so a fresh instance is created"},{"line_number":38,"context_line":"        # with the driver of this test."},{"line_number":39,"context_line":"        p_extension.OVNClientPlacementExtension.drop()"},{"line_number":40,"context_line":"        self.plugin_driver \u003d mock.Mock()"},{"line_number":41,"context_line":"        self.placement_driver \u003d p_extension.OVNClientPlacementExtension("},{"line_number":42,"context_line":"            self.plugin_driver)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7e38eb7d_0b81149f","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":54},"in_reply_to":"0417529e_77d29dcf","updated":"2026-10-06 14:40:50.000000000","message":"Hi, thanks for your review.\n\nMoving the drop() call to _delete_placement_singleton_instance wouldn\u0027t fix the problem, because of when each runs:\n- addCleanup executes after the test, but the failure happens in setUp of the first test of the class. With stestr --dynamic, any test class can run after any other in the same worker: the mech driver tests leave the singletons alive (the mech driver keeps AgentCache mech_driver.py:417 and OVNClient keeps the placement extension ovn_client.py:126-127, both held via the plugin directory registry after the test ends). The first test of this class would then still receive the stale instance and fail the pre-existing sanity check (assertEqual(self.plugin_driver, self.placement_driver._driver)).\n- The current cleanup (del self.placement_driver) only drops our own reference. _singleton_instances is a WeakValueDictionary utils.py:977, so that\u0027s enough only when nothing else holds the singleton — precisely the assumption that no longer holds.\n- Resetting in setUp makes each test self-contained and order-independent (same reason we call setup_coreplugin() in setUp rather than relying on the previous test\u0027s cleanup). It also runs even when a previous test class has no cleanup at all.\nI can add a drop() to the cleanups too if you prefer, but it would have no functional effect — dropping our own reference already lets the weak dict evict the entry when nothing else holds it.","commit_id":"fff93aa919f0bb6d82b4457e841be6663a29ebad"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"d38694c3779862d4d24c6c1cd085a2d9a7efd097","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        # cleanup) is not enough to get rid of a stale instance."},{"line_number":37,"context_line":"        # Explicitly drop the singleton so a fresh instance is created"},{"line_number":38,"context_line":"        # with the driver of this test."},{"line_number":39,"context_line":"        p_extension.OVNClientPlacementExtension.drop()"},{"line_number":40,"context_line":"        self.plugin_driver \u003d mock.Mock()"},{"line_number":41,"context_line":"        self.placement_driver \u003d p_extension.OVNClientPlacementExtension("},{"line_number":42,"context_line":"            self.plugin_driver)"}],"source_content_type":"text/x-python","patch_set":1,"id":"2b10bb19_be16ba7d","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":54},"in_reply_to":"7e38eb7d_0b81149f","updated":"2026-10-08 06:58:47.000000000","message":"ok, thanks, this --dynamic seems quite dangereux","commit_id":"fff93aa919f0bb6d82b4457e841be6663a29ebad"}]}
