[Enhancement]: Allow disabling resource cleanup entirely (no Ryuk, no JVM shutdown hook)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 55/100
研究方向
Start by locating ResourceReaper.instance() and JVMHookResourceReaper, then trace how TESTCONTAINERS_RYUK_DISABLED and testcontainers.properties values are loaded. Identify the existing tests for resource-reaper selection and add coverage for a no-op mode. The work is done when a supported configuration can disable both Ryuk and the JVM shutdown hook while preserving the existing cleanup modes.
由索引模型根據 Issue 內容生成。
描述
Module
Core
Proposal
Problem
On ephemeral CI runners, Testcontainers' resource cleanup is unnecessary: the whole VM is discarded when the job ends. Setting TESTCONTAINERS_RYUK_DISABLED=true does not turn cleanup off; it switches ResourceReaper.instance() to JVMHookResourceReaper, which on JVM shutdown runs label-filtered docker {network,volume,image} prune calls.
We ran into an issue when upgrading our GitHub Actions runners to Ubuntu 26.04 with Docker 29 and the containerd image store. Our backend build failed in ~36% of runs with image-pull errors like:
failed commit on ref ... no such file or directory
Our hypothesis is moby/moby#53321: an image prune on the containerd store can drop leases of in-progress pulls, even pulls of images that don't match the prune's label filter. So each test JVM exiting can break pulls of other JVMs still running. After re-enabling Ryuk (which removes images individually via ImageRemove, not via prune, the problem disappeared.
Discussion #12085 ("unknown blob" errors with parallel builds) may be related, but its setup differs and there's no confirmed link.
Proposal
Provide a supported way to skip cleanup completely, e.g. an environment variable / testcontainers.properties entry such as TESTCONTAINERS_RESOURCE_REAPER=none (alongside the implicit ryuk / jvm-hook), selecting a no-op ResourceReaper.
Benefit
Ephemeral CI avoids the Ryuk container and its startup cost without falling back to the shutdown-hook prune.
- 主要語言
- Java
- 星號
- 8.8k
- 分支
- 2k
- 平均合併
- 2 天 1 小時
- 30 天內合併 PR
- 11
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
testcontainers/testcontainers-java 的其他 Issue
-
[Bug]: WaitStrategyTarget Handles Multiple Ports Differently to Documentation可能已有人在做 @suvvvv 於 2 天前認領。 未關閉type/bug
難度 2/5 1-3 小時 新手友好度 68/100
testcontainers/testcontainers-java#12196 ·
維護者通常 1 天內回覆
-
[Bug]: DockerImageName treats uppercase registry names as repository paths可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
testcontainers/testcontainers-java#12186 · 1 則留言 ·
維護者通常 1 天內回覆
-
[Bug]: withStartupTimeout() changes the startup timeout of all containers that use the default wait strategy可能已有人在做 @aymenjamaaoui 於 18 天前認領。 未關閉type/bug
難度 2/5 1-3 小時 新手友好度 64/100
testcontainers/testcontainers-java#12171 · 1 則留言 ·
維護者通常 1 天內回覆
-
[Enhancement]: Document why singleton containers are required under Spring's test context caching可能已有人在做 @zakaullah075 於 111 天前認領。 未關閉type/enhancement
難度 1/5 1 小時以內 新手友好度 85/100
testcontainers/testcontainers-java#11967 · 1 則留言 ·
維護者通常 1 天內回覆
-
[Bug]: Cannot reuse Selenium BrowserWebDriverContainers under Linux可能已有人在做 @kdelay 於 132 天前認領。 未關閉type/bug
難度 2/5 1-3 小時 新手友好度 78/100
testcontainers/testcontainers-java#11941 ·
維護者通常 1 天內回覆
查看 testcontainers/testcontainers-java 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
good first issue help wanted
難度 2/5 1-3 小時 新手友好度 88/100
erkamyaman/rust-anything#1381 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 80/100
java-native-access/jna#1757 ·