)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"0e3098946abe6752c0e6138a2e7e993d3f4893c9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f19b1c25_e0603e4f","updated":"2022-08-15 12:58:53.000000000","message":"Is it possible to write a test for the resource cleanup?","commit_id":"553829301dc38ef402f5105bdb70b10c44911b14"},{"author":{"_account_id":31083,"name":"Benjamin Schanzel","email":"benjamin.schanzel@bmw.de","username":"benjamin.schanzel"},"change_message_id":"4b976ebd97066ab3f61ca79af47a194de613b000","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"31fb31fe_4c9113e4","updated":"2022-08-04 09:39:54.000000000","message":"recheck","commit_id":"553829301dc38ef402f5105bdb70b10c44911b14"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"06e0714d321775d0d72078f1016f4f71e52c9ec2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"124049f4_56b0a469","updated":"2022-10-24 05:21:13.000000000","message":"recheck","commit_id":"bda63ad8ca22f2797b5c893bba76583785e30fbe"},{"author":{"_account_id":31083,"name":"Benjamin Schanzel","email":"benjamin.schanzel@bmw.de","username":"benjamin.schanzel"},"change_message_id":"336618ce05a4e3237a22b540121302262dc81232","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4ebb4b8a_380191ec","updated":"2022-10-21 14:12:42.000000000","message":"recheck","commit_id":"bda63ad8ca22f2797b5c893bba76583785e30fbe"},{"author":{"_account_id":31083,"name":"Benjamin Schanzel","email":"benjamin.schanzel@bmw.de","username":"benjamin.schanzel"},"change_message_id":"92f7efc5a4f5c2bf28f605d91be0abb5790487ff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"942b48a6_70663095","updated":"2022-10-24 10:27:54.000000000","message":"recheck","commit_id":"bda63ad8ca22f2797b5c893bba76583785e30fbe"},{"author":{"_account_id":27582,"name":"Simon Westphahl","email":"simon.westphahl@bmw.de","username":"simon.westphahl"},"change_message_id":"49eee6a5ba8396b97c8fba2599d114681458fbde","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"eb5b9670_ef69f77a","updated":"2022-10-24 06:45:10.000000000","message":"recheck","commit_id":"bda63ad8ca22f2797b5c893bba76583785e30fbe"}],"nodepool/driver/kubernetes/provider.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"6860d58bff42b46f6c2ae4288d8f9d5acb229324","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                    server.name, server.id, self.provider.name,"},{"line_number":134,"context_line":"                    meta[\u0027nodepool_node_id\u0027]"},{"line_number":135,"context_line":"                )"},{"line_number":136,"context_line":"                # Create an artifical node to use for deleting the server."},{"line_number":137,"context_line":"                node \u003d zk.Node()"},{"line_number":138,"context_line":"                node.external_id \u003d server.id"},{"line_number":139,"context_line":"                node.provider \u003d self.provider.name"}],"source_content_type":"text/x-python","patch_set":2,"id":"5d7705c5_a72c1419","line":136,"updated":"2022-10-12 21:05:17.000000000","message":"-1: I can\u0027t think of a compelling reason to do this at this point.  I think it would be more straightforward to just call cleanupNode(server.id) synchronously here.\n\nA benefit of that is you can drop the nodeIterator loop at the top.","commit_id":"80d8f217157d44b02a59a1c3f7002562fee4f4e8"},{"author":{"_account_id":31083,"name":"Benjamin Schanzel","email":"benjamin.schanzel@bmw.de","username":"benjamin.schanzel"},"change_message_id":"da14c7668cbf37ac51e466d952c20c97309a1f74","unresolved":true,"context_lines":[{"line_number":133,"context_line":"                    server.name, server.id, self.provider.name,"},{"line_number":134,"context_line":"                    meta[\u0027nodepool_node_id\u0027]"},{"line_number":135,"context_line":"                )"},{"line_number":136,"context_line":"                # Create an artifical node to use for deleting the server."},{"line_number":137,"context_line":"                node \u003d zk.Node()"},{"line_number":138,"context_line":"                node.external_id \u003d server.id"},{"line_number":139,"context_line":"                node.provider \u003d self.provider.name"}],"source_content_type":"text/x-python","patch_set":2,"id":"f77484da_97f46bf4","line":136,"in_reply_to":"5d7705c5_a72c1419","updated":"2022-10-13 11:45:47.000000000","message":"This logic was taken from the openstack provider, but I also like the simpler solution better. Updated accordingly.","commit_id":"80d8f217157d44b02a59a1c3f7002562fee4f4e8"}],"nodepool/tests/unit/test_driver_kubernetes.py":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"6860d58bff42b46f6c2ae4288d8f9d5acb229324","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        class FakeNamespace:"},{"line_number":41,"context_line":"            class metadata:"},{"line_number":42,"context_line":"                name \u003d ns_body[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":43,"context_line":"                labels \u003d ns_body[\u0027metadata\u0027][\u0027labels\u0027]"},{"line_number":44,"context_line":"        self.namespaces.append(FakeNamespace)"},{"line_number":45,"context_line":"        return FakeNamespace"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"2ded62f1_f4726445","line":43,"updated":"2022-10-12 21:05:17.000000000","message":"Typically, we would expect to use a facility like \u0027annotations\u0027 rather than \u0027labels\u0027 because we don\u0027t expect\nto query or identify these namespaces, and this change does not do that.  However, by using labels instead of annotations, we retain the ability to potentially do that in the future.  Is that the reasoning for this choice?\n\n(Incidentally, I do not think that we should add any features which rely on querying labels now; this driver needs to be converted to the statemachine interface, and the simpler we keep this, the easier that will be.)","commit_id":"80d8f217157d44b02a59a1c3f7002562fee4f4e8"},{"author":{"_account_id":31083,"name":"Benjamin Schanzel","email":"benjamin.schanzel@bmw.de","username":"benjamin.schanzel"},"change_message_id":"da14c7668cbf37ac51e466d952c20c97309a1f74","unresolved":true,"context_lines":[{"line_number":40,"context_line":"        class FakeNamespace:"},{"line_number":41,"context_line":"            class metadata:"},{"line_number":42,"context_line":"                name \u003d ns_body[\u0027metadata\u0027][\u0027name\u0027]"},{"line_number":43,"context_line":"                labels \u003d ns_body[\u0027metadata\u0027][\u0027labels\u0027]"},{"line_number":44,"context_line":"        self.namespaces.append(FakeNamespace)"},{"line_number":45,"context_line":"        return FakeNamespace"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ecc00e80_f2062eca","line":43,"in_reply_to":"2ded62f1_f4726445","updated":"2022-10-13 11:45:47.000000000","message":"The reasoning was rather that we need to identify nodepool-managed namespaces in the cleanup process. This is done via the namespaces metadata (analogous to openstack server metadata).\nThe way this metadata is set currently [1] does not work and is simply ignored by k8s. It must be stored either as metadata.labels or metadata.annotations. So we need to add either of those anyway. Thus, I decided to go with labels as I think the values we set there (node_id, provider_name, pool_name) match the semantics of identifying attributes of a k8s object.\n\n[1] https://opendev.org/zuul/nodepool/src/commit/4dcbf41259/nodepool/driver/kubernetes/provider.py#L139","commit_id":"80d8f217157d44b02a59a1c3f7002562fee4f4e8"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"6860d58bff42b46f6c2ae4288d8f9d5acb229324","unresolved":false,"context_lines":[{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def test_kubernetes_leaked_node(self):"},{"line_number":228,"context_line":"        conf \u003d self.setup_config(\u0027kubernetes-leaked-node.yaml\u0027)"},{"line_number":229,"context_line":"        pool \u003d self.useNodepool(conf)"},{"line_number":230,"context_line":"        pool.start()"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        # wait for max-ready node to be available"}],"source_content_type":"text/x-python","patch_set":2,"id":"7fa95e0c_92eb46b0","line":229,"updated":"2022-10-12 21:05:17.000000000","message":"-1: Add watermark_sleep\u003d1 to useNodepool, and then add pool.cleanup_interval \u003d 1.  Those will make this run a lot faster (a few seconds instead of a few minutes).","commit_id":"80d8f217157d44b02a59a1c3f7002562fee4f4e8"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"6860d58bff42b46f6c2ae4288d8f9d5acb229324","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        pool \u003d self.useNodepool(conf)"},{"line_number":230,"context_line":"        pool.start()"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        # wait for max-ready node to be available"},{"line_number":233,"context_line":"        nodes \u003d self.waitForNodes(\u0027pod-fedora\u0027)"},{"line_number":234,"context_line":"        self.assertEqual(len(nodes), 1)"},{"line_number":235,"context_line":"        manager \u003d pool.getProviderManager(\u0027kubespray\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"26c33920_9e139959","line":232,"updated":"2022-10-12 21:05:17.000000000","message":"nit: min-ready","commit_id":"80d8f217157d44b02a59a1c3f7002562fee4f4e8"}]}
