You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(breg): the source successor test and frozen_rhai_package leak a container, a volume and a temp dir every run #2632
Two BReg test targets leave resources behind on every run:
crates/registry-bregctl/tests/dev_lifecycle.rs: the source successor test ends with session.stop(); std::mem::forget(session);. stop() keeps the container and its volume, and forget skips the session's Drop cleanup, so each run leaves one breg-dev PostgreSQL container and one breg-dev-<uuid> volume. The two tests that call session.remove() before forget are fine.
crates/registry-breg/tests/frozen_rhai_package.rs: the shared base copy is a tempfile::TempDir held in a static OnceLock. Statics are never dropped, so every run leaves one breg-native-package-* directory under TMPDIR.
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) before forget, or drop forget if Drop already does the right cleanup.
Keep the base copy in a TempDir owned 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).
Activity
jeremi commentedon Nov 10, 2026
Found while building #2634 (read-only external views in BReg); not fixed there.