)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30535eea4734f1ab1d646563b7a3d8694ae66dc7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3de90eaa_c47f5704","updated":"2026-01-13 11:01:34.000000000","message":"Minor comments, some of them IMO should be addressed in an independent patch (the `CLEAN_DB_AFTER_TEST` removal)","commit_id":"fe9c4584b52b167bb1b1d64c6a57915910f59799"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e3f11c86305433fb9cb5c2705073db724140e5ed","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"c0bb8609_0f3e9325","in_reply_to":"3de90eaa_c47f5704","updated":"2026-01-13 11:02:32.000000000","message":"BTW, apart from the comments in the patch, it seems to work very well, once checking the results in https://review.opendev.org/c/openstack/neutron/+/972986","commit_id":"fe9c4584b52b167bb1b1d64c6a57915910f59799"}],"neutron/tests/unit/testlib_api.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30535eea4734f1ab1d646563b7a3d8694ae66dc7","unresolved":true,"context_lines":[{"line_number":299,"context_line":"        # Tests with REQUIRE_FRESH_MYSQL_DB must also clean up, since they"},{"line_number":300,"context_line":"        # modify the database independently (e.g., run alembic migrations)."},{"line_number":301,"context_line":"        resources \u003d self.test.resources"},{"line_number":302,"context_line":"        any_dirty \u003d any(resource.isDirty() for name, resource in resources)"},{"line_number":303,"context_line":"        needs_cleanup \u003d (self.test.CLEAN_DB_AFTER_TEST or"},{"line_number":304,"context_line":"                         self.test.REQUIRE_FRESH_MYSQL_DB or"},{"line_number":305,"context_line":"                         any_dirty)"}],"source_content_type":"text/x-python","patch_set":4,"id":"125e6797_4a91c704","line":302,"range":{"start_line":302,"start_character":33,"end_line":302,"end_character":40},"updated":"2026-01-13 11:01:34.000000000","message":"I\u0027ve manually tested and the only resources we add are `SchemaResource` and `DatabaseResource`.\n* `DatabaseResource.isDirty` returns False always.\n* `SchemaResource.isDirty` returns True only if teardown\u003dTrue. But in [1] we always set it to False.\n\nIn other words, `any_dirty` will be always False.\n\n[1]https://github.com/openstack/neutron/blob/9656a5fcf2c706d2f159655f9fa40c9768bbf5c1/neutron/tests/unit/testlib_api.py#L175","commit_id":"fe9c4584b52b167bb1b1d64c6a57915910f59799"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4f8806b470be5df925bbb463f95385b7af61f9a9","unresolved":true,"context_lines":[{"line_number":299,"context_line":"        # Tests with REQUIRE_FRESH_MYSQL_DB must also clean up, since they"},{"line_number":300,"context_line":"        # modify the database independently (e.g., run alembic migrations)."},{"line_number":301,"context_line":"        resources \u003d self.test.resources"},{"line_number":302,"context_line":"        any_dirty \u003d any(resource.isDirty() for name, resource in resources)"},{"line_number":303,"context_line":"        needs_cleanup \u003d (self.test.CLEAN_DB_AFTER_TEST or"},{"line_number":304,"context_line":"                         self.test.REQUIRE_FRESH_MYSQL_DB or"},{"line_number":305,"context_line":"                         any_dirty)"}],"source_content_type":"text/x-python","patch_set":4,"id":"601900a0_49ba57f2","line":302,"range":{"start_line":302,"start_character":33,"end_line":302,"end_character":40},"in_reply_to":"125e6797_4a91c704","updated":"2026-01-13 13:33:17.000000000","message":"I\u0027m not sure I understand those resources well. I hoped the dirty means there are objects in the database, so the DB is not clean.\n\nIf that is not the case then maybe we can\u0027t use this patch because the tests could interfere between themselves and then we break the rule of test separation.\n\nI think we need to re-create the DB if the previous test left any leftovers in the DB.","commit_id":"fe9c4584b52b167bb1b1d64c6a57915910f59799"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"56399e64750d2e500602cdc9af763c18e9bef270","unresolved":true,"context_lines":[{"line_number":299,"context_line":"        # Tests with REQUIRE_FRESH_MYSQL_DB must also clean up, since they"},{"line_number":300,"context_line":"        # modify the database independently (e.g., run alembic migrations)."},{"line_number":301,"context_line":"        resources \u003d self.test.resources"},{"line_number":302,"context_line":"        any_dirty \u003d any(resource.isDirty() for name, resource in resources)"},{"line_number":303,"context_line":"        needs_cleanup \u003d (self.test.CLEAN_DB_AFTER_TEST or"},{"line_number":304,"context_line":"                         self.test.REQUIRE_FRESH_MYSQL_DB or"},{"line_number":305,"context_line":"                         any_dirty)"}],"source_content_type":"text/x-python","patch_set":4,"id":"71094d7d_f8ce2138","line":302,"range":{"start_line":302,"start_character":33,"end_line":302,"end_character":40},"in_reply_to":"601900a0_49ba57f2","updated":"2026-01-15 08:43:54.000000000","message":"\u003e I think we need to re-create the DB if the previous test left any leftovers in the DB.\n\nThat will happens most of the times. We don\u0027t cleanup the DB resources at the end of the test","commit_id":"fe9c4584b52b167bb1b1d64c6a57915910f59799"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30535eea4734f1ab1d646563b7a3d8694ae66dc7","unresolved":true,"context_lines":[{"line_number":300,"context_line":"        # modify the database independently (e.g., run alembic migrations)."},{"line_number":301,"context_line":"        resources \u003d self.test.resources"},{"line_number":302,"context_line":"        any_dirty \u003d any(resource.isDirty() for name, resource in resources)"},{"line_number":303,"context_line":"        needs_cleanup \u003d (self.test.CLEAN_DB_AFTER_TEST or"},{"line_number":304,"context_line":"                         self.test.REQUIRE_FRESH_MYSQL_DB or"},{"line_number":305,"context_line":"                         any_dirty)"},{"line_number":306,"context_line":"        if needs_cleanup:"}],"source_content_type":"text/x-python","patch_set":4,"id":"2fdf02b4_1904171b","line":303,"range":{"start_line":303,"start_character":35,"end_line":303,"end_character":54},"updated":"2026-01-13 11:01:34.000000000","message":"This flag is currently used in fullstack FW, that is no longer used. The others tests have this flag set as False. We should do a revert of https://review.opendev.org/c/openstack/neutron/+/893097","commit_id":"fe9c4584b52b167bb1b1d64c6a57915910f59799"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4f8806b470be5df925bbb463f95385b7af61f9a9","unresolved":true,"context_lines":[{"line_number":300,"context_line":"        # modify the database independently (e.g., run alembic migrations)."},{"line_number":301,"context_line":"        resources \u003d self.test.resources"},{"line_number":302,"context_line":"        any_dirty \u003d any(resource.isDirty() for name, resource in resources)"},{"line_number":303,"context_line":"        needs_cleanup \u003d (self.test.CLEAN_DB_AFTER_TEST or"},{"line_number":304,"context_line":"                         self.test.REQUIRE_FRESH_MYSQL_DB or"},{"line_number":305,"context_line":"                         any_dirty)"},{"line_number":306,"context_line":"        if needs_cleanup:"}],"source_content_type":"text/x-python","patch_set":4,"id":"2893ecf9_8470e79a","line":303,"range":{"start_line":303,"start_character":35,"end_line":303,"end_character":54},"in_reply_to":"2fdf02b4_1904171b","updated":"2026-01-13 13:33:17.000000000","message":"I noticed but did not want to touch that as part of this fix. And since the fixture is used in that code, I consider the flag here as well.","commit_id":"fe9c4584b52b167bb1b1d64c6a57915910f59799"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"30535eea4734f1ab1d646563b7a3d8694ae66dc7","unresolved":true,"context_lines":[{"line_number":315,"context_line":"    def _clean_db_after_test_if_needed(self):"},{"line_number":316,"context_line":"        # Also clear caches if REQUIRE_FRESH_MYSQL_DB was set, since the"},{"line_number":317,"context_line":"        # test modified the database independently of testresources."},{"line_number":318,"context_line":"        if self.test.CLEAN_DB_AFTER_TEST or self.test.REQUIRE_FRESH_MYSQL_DB:"},{"line_number":319,"context_line":"            self.test._database_resources.pop(self.test.DRIVER, None)"},{"line_number":320,"context_line":"            self.test._schema_resources.pop((self.test.DRIVER, None), None)"},{"line_number":321,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"92fd81ec_fdad2cf0","line":318,"range":{"start_line":318,"start_character":21,"end_line":318,"end_character":40},"updated":"2026-01-13 11:01:34.000000000","message":"Same comment as before","commit_id":"fe9c4584b52b167bb1b1d64c6a57915910f59799"}]}
