Skip to content

Conversation

@chrisseto
Copy link
Contributor

The majority of usages of RedpandaTestEnv leak etcd and kube-apiserver processes. This slowly bogs down machines running tests as part of their development loop.

The ideal fix would be to plumb a testing.T into it and hook into cleanup but the widespread usage makes refactoring quite tedious.

This commit instead attaches a finalizer to the returned *rest.Config which drops the leaked procs by > 50% (~10 leaks vs ~30). The leakage will vary across runs and is made worse by test failures. Never the less this is an improvement.

The majority of usages of `RedpandaTestEnv` leak `etcd` and `kube-apiserver`
processes. This slowly bogs down machines running tests as part of their
development loop.

The ideal fix would be to plumb a testing.T into it and hook into cleanup but
the widespread usage makes refactoring quite tedious.

This commit instead attaches a finalizer to the returned `*rest.Config` which
drops the leaked procs by > 50% (~10 leaks vs ~30). The leakage will vary
across runs and is made worse by test failures. Never the less this is an
improvement.
@chrisseto chrisseto enabled auto-merge (rebase) September 16, 2025 20:52
@chrisseto chrisseto merged commit 82deb40 into main Sep 16, 2025
15 of 16 checks passed
@github-actions
Copy link

💚 All backports created successfully

Status Branch Result
release/v2.4.x
release/v25.1.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

@chrisseto chrisseto deleted the chris/p/stop-proc-leaks branch September 24, 2025 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants