-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
[Documentation]: document volumes and mounts #2163
Comments
This seemed like a good place to remark on my experience in the last couple of days with mounts, as a testcontainers-go user. My bind mounts quietly stopped working when I upgraded from 0.26.0 to 0.27.0, for some reason I couldn't figure out (the deprecation of bind mounts in testcontainers wasn't supposed to break them). So, I switched over to volumes instead. That created a lot more pain, since our CI system got overrun with volumes. As it turned out, named volumes don't get cleaned up by ryuk, so they stuck around indefinitely. The testcontainers-go API makes it really tempting to set a non-empty name for volumes, but the consequences of that are quite bad. Anyway, yeah, more documentation on this stuff would be great :). Also, there was some quite misleading logging in place as of when bind mounts were deprecated, and I made a PR to improve that. https:/testcontainers/testcontainers-go/pull/2178/files |
@srabraham thanks for raising your voice on this issue. I do appreciate your feedback.
I'm interested in this. Could you share a repo where it happened? As you pointed out, they should not break any client code as per the deprecation, although I could have committed a mistake during the deprecation path.
Did you manually created the volumes? If not I'd expect testcontainers-go to label the volumes accordingly, so that Ryuk prunes them. Could you run Ryuk in verbose mode, so you're be able to check what volumes are pruned?: https:/testcontainers/moby-ryuk/blob/430d3338e3af80816a0a7445a90b4a1e58b1c710/main.go#L330-L337. In order to do so: https://golang.testcontainers.org/features/configuration/#customizing-ryuk-the-resource-reaper. Since
Mmmm could you share how did you create the volumes? I think this answers my previous question so you probably used the API. I'm interested in how so I can double check and identify where the experience is broken. |
Regarding bind mount breakage at 0.27.0, I made a separate bug report here with a very simple reproduction: #2179 |
and here's a demo of named volumes not getting deleted by ryuk: https:/srabraham/demovolume/blob/main/main.go |
@mdelapenya in case you missed it, please have a look at my additional demo above (#2163 (comment)), which shows how named volumes don't get cleaned up by Ryuk. |
I think we should open a bug in https:/testcontainers/moby-ryuk |
@srabraham here it's the fix #2191 |
Awesome, thanks! |
Proposal
They are not properly documented in our docs
The text was updated successfully, but these errors were encountered: