test(breg): the source successor test and frozen_rhai_package leak a container, a volume and a temp dir every run
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 67/100
Hướng nghiên cứu
Đọc crates/registry-bregctl/tests/dev_lifecycle.rs và crates/registry-breg/tests/frozen_rhai_package.rs, sau đó kiểm tra hành vi dọn dẹp phiên và cách TempDir dùng chung được tạo. Chạy các mục tiêu kiểm thử bị ảnh hưởng và kiểm tra để bảo đảm chúng không để lại container, volume hay thư mục tạm nào; giữ lại các assertion cần trạng thái container đã dừng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- Rust
- Star
- 2
- Fork
- 0
- Merge trung bình
- 7 giờ 43 phút
- Pull request đã merge (30 ngày)
- 201
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của registrystack/registry-stack
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
registrystack/registry-stack#2601 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:coordinator criticality:p3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
registrystack/registry-stack#2507 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:breg criticality:p3 documentation good first issue triage:needs-implementation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
registrystack/registry-stack#2415 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
scheduling: profile refusals on appointment detail, busy-import and operational routes log nothingĐang mởarea:scheduling criticality:p3 enhancement triage:needs-implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
registrystack/registry-stack#2412 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
registrystack/registry-stack#2381 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của registrystack/registry-stack
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
swc-project/swc-ai-issues#164 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
pop-os/cosmic-player#367 ·
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
servo/rust-smallvec#873 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
messense/dav-server-rs#82 ·
Maintainer thường phản hồi trong vòng 1 ngày