test(breg): the source successor test and frozen_rhai_package leak a container, a volume and a temp dir every run
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 67/100
调研方向
阅读 crates/registry-bregctl/tests/dev_lifecycle.rs 和 crates/registry-breg/tests/frozen_rhai_package.rs,然后检查会话清理行为以及共享 TempDir 的创建方式。运行受影响的测试目标,并检查它们是否未留下任何容器、卷或临时目录;保留需要容器停止状态的断言。
由索引模型根据 Issue 内容生成。
描述
What happens
Two BReg test targets leave resources behind on every run:
crates/registry-bregctl/tests/dev_lifecycle.rs: the source successor test ends withsession.stop(); std::mem::forget(session);.stop()keeps the container and its volume, andforgetskips the session'sDropcleanup, so each run leaves onebreg-devPostgreSQL container and onebreg-dev-<uuid>volume. The two tests that callsession.remove()beforeforgetare fine.crates/registry-breg/tests/frozen_rhai_package.rs: the shared base copy is atempfile::TempDirheld in astatic OnceLock. Statics are never dropped, so every run leaves onebreg-native-package-*directory underTMPDIR.
On a developer machine these pile up across runs (disk, Docker volumes) and make container-ownership checks noisier.
Suggested fix
- Call
session.remove()(after the assertions that need the stopped state) beforeforget, or dropforgetifDropalready does the right cleanup. - Keep the base copy in a
TempDirowned by the test (or created per test), or register a removal at process exit. If the shared copy is kept for speed, use a stable, named path under the target directory that each run reuses.
Found while verifying the external record projections branch (feat/breg-external-views).
- 主要语言
- Rust
- 星标
- 2
- 派生
- 0
- 平均合并
- 7 小时 43 分钟
- 30 天内合并 PR
- 201
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
registrystack/registry-stack 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 79/100
registrystack/registry-stack#2601 ·
维护者通常 1 天内回复
-
area:coordinator criticality:p3
难度 2/5 1-3 小时 新手友好度 78/100
registrystack/registry-stack#2507 ·
维护者通常 1 天内回复
-
area:breg criticality:p3 documentation good first issue triage:needs-implementation
难度 1/5 1 小时以内 新手友好度 85/100
registrystack/registry-stack#2415 ·
维护者通常 1 天内回复
-
scheduling: profile refusals on appointment detail, busy-import and operational routes log nothing未关闭area:scheduling criticality:p3 enhancement triage:needs-implementation
难度 2/5 1-3 小时 新手友好度 85/100
registrystack/registry-stack#2412 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
registrystack/registry-stack#2381 ·
维护者通常 1 天内回复
查看 registrystack/registry-stack 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
swc-project/swc-ai-issues#164 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
pop-os/cosmic-player#367 ·
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 72/100
servo/rust-smallvec#873 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
messense/dav-server-rs#82 ·
维护者通常 1 天内回复