Give reusable containers a stable identity and a way to prune them
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- docker, node.js, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.6k
- Forks
- 274
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 44
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de testcontainers/testcontainers-node
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
testcontainers/testcontainers-node#1539 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
testcontainers/testcontainers-node#1533 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
testcontainers/testcontainers-node#1531 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
testcontainers/testcontainers-node#1529 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
testcontainers/testcontainers-node#1528 ·
Los mantenedores suelen responder en 1 día
Todos los issues de testcontainers/testcontainers-node
Issues similares
-
documentation good first issue hacktoberfest help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
libredb/libredb-studio#1756 ·
Los mantenedores suelen responder en 1 día
-
state:triage-needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
lingdojo/kana-dojo#32365 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
friction
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
kentcdodds/kody#3706 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
copperheadhq/copperhead#378 ·
Los mantenedores suelen responder en 1 día