-
Notifications
You must be signed in to change notification settings - Fork 310
Bug: ryuk exited instances leaking #489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@shoffmeister |
https://pypi.org/project/testcontainers/4.2.0rc2/ is up, tested a bit by me, maybe fixes the issue? |
@alexanderankin Many thanks for the very quick reaction! 4.2.0.rc2 has survived a few minutes of There is one oddity, though: Ctrl+C does not abort the tests. To reproduce
//exp: test run aborts Right now I do not know how to minimally reproduce this, what the root cause of that is, and whether this is a regression - it may simply be due to timeouts that are too high (ryuk, my container). I believe that the current state is strictly better than the previous state, so I'd suggest proceeding with the current state for now. |
fix #489 , supercede #491, #498 Co-authored-by: Stefan Hoffmeister <[email protected]>
@shoffmeister - after a day of experimenting i realized that the shutdown hooks are not necessary - and actually just how necessary the ryuk is in practice. im releasing 4.2.0 right now with only the necessary parts of the above fix, and not the unnecessary ones. thanks for reporting and helping to test! |
) fix testcontainers#489 , supercede testcontainers#491, testcontainers#498 Co-authored-by: Stefan Hoffmeister <[email protected]>
Describe the bug
With the new ryuk container usage in v4.1.1, dependent containers get cleaned up nicely, but the ryuk container itself remains, in exited state. The ryuk container itself should also be cleaned up.
docker ps --all
will show a great many of these containers, see the very end of the bug report for some testcontainers-based pytest integration test that was running in a loop.While
docker rm -f $(docker ps --all --quiet --filter="name=testcontainers-ryuk*")
will clean this up, it is still annoying to have to manage this.To Reproduce
Any usage of testcontainers should exhibit this behaviour.
Locally, I am running this with a specialized Dockercontainer implementation which drives the official Apache Kafka 3.7.0 container image in KRaft mode (which obviates the need for Zookeeper dancing and hence cycles much much faster).
Runtime environment
Provide a summary of your runtime environment. Which operating system, python version, and docker version are you using? What is the version of
testcontainers-python
you are using? You can run the following commands to get the relevant information.The text was updated successfully, but these errors were encountered: