test(breg): the source successor test and frozen_rhai_package leak a container, a volume and a temp dir every run
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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分
- マージ済み PR(30日)
- 201
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信