Give reusable containers a stable identity and a way to prune them
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, node.js, typescript
Hướng nghiên cứu
Start by reading reuseOrStartContainer in packages/testcontainers/src/generic-container/generic-container.ts and createLabels in packages/testcontainers/src/utils/labels.ts, then review dependency issue #1522 to understand the shared reuse hash decision. The issue also calls for an optional reuse key and a prune API plus command; define how replacement handles containers used by another process. Done means identity stays stable across library upgrades, keyed configuration changes replace the old reusable container, and users can list or prune reusable containers.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
A reusable container lives until someone removes it by hand, and the library gives no help with that.
- The reuse hash includes the
org.testcontainers.versionlabel, so every library upgrade changes the hash of every reusable container. The old ones are never matched again and keep running. - Any change to a container's configuration has the same effect: a new container appears next to the old one.
- There is no API or command to list or remove reusable containers. The way to find them is
docker ps --filter label=org.testcontainers.container-hash.
Expected
- The library version is not part of a reusable container's identity.
- An optional explicit key,
withReuse({ key: "orders-db" }). A container with the same key and a different configuration is replaced instead of joined by a second one. - A way to clean up:
TestContainers.pruneReusableContainers()and a matching command.
Where
reuseOrStartContainerinpackages/testcontainers/src/generic-container/generic-container.tscreateLabelsinpackages/testcontainers/src/utils/labels.ts
Notes
- Go has
WithReuseByName(containerName). - Decide what "replace" means for a container another process is still using.
Dependencies
- Stack on #1522: both redefine what goes into the reuse hash. Decide the contents once.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.6k
- Fork
- 274
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 44
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 testcontainers/testcontainers-node
-
enhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
testcontainers/testcontainers-node#1539 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
testcontainers/testcontainers-node#1533 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
testcontainers/testcontainers-node#1531 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
testcontainers/testcontainers-node#1529 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
testcontainers/testcontainers-node#1528 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của testcontainers/testcontainers-node
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NaturalIntelligence/fast-xml-parser#890 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
zsviczian/obsidian-excalidraw-plugin#3000 ·
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 68/100
pnpm/get.pnpm.io#68 ·
-
[BUG] Cloudflare KV binding 模式下 kvDriver.list() 沿用 EdgeOne 语义,字段名不匹配导致 key 格式下初始化 500 并耗尽 list 配额Có thể đã có người làm @wumingzhinu đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
OpenListTeam/OpenList-Worker#125 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
margelo/react-native-vision-camera#4217 ·
Maintainer thường phản hồi trong vòng 4 ngày