Take network aliases with the network, and allow more than one network
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 57/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- docker, node.js, typescript
Línea de trabajo
Start with withNetwork, withNetworkMode, withNetworkAliases, and startContainer in packages/testcontainers/src/generic-container/generic-container.ts, then read getIpAddress and getNetworkId in packages/testcontainers/src/generic-container/started-generic-container.ts. Trace how network settings reach container startup and how the started-container interface and forwarder expose network details. Done means multiple networks can have aliases, aliases without a network fail at startup, and lookups accept StartedNetwork or a name with a clear error for unattached networks.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
Putting a container on a network with an alias takes two calls that only work together:
new GenericContainer(image).withNetwork(network).withNetworkAliases("db");
withNetworkAliaseswithout a network does nothing, silently. The aliases are only applied when a network mode is also set (from reading the code).withNetworkandwithNetworkModewrite the same field, so the later call wins without a warning.- A container can be given one network. There is no way to attach a second.
Reading network details back needs the network's name as a string:
container.getIpAddress(network.getName());
An unknown name throws TypeError: Cannot read properties of undefined from getIpAddress and getNetworkId (from reading the code).
Expected
- Aliases can be given with the network:
withNetwork(network, { aliases: ["db"] }). Calling it again attaches another network. withNetworkAliaseswithout a network throws when the container starts.getIpAddressandgetNetworkIdaccept aStartedNetworkas well as a name, and throw a clear error for a network the container is not on.
Where
withNetwork,withNetworkMode,withNetworkAliasesandstartContainerinpackages/testcontainers/src/generic-container/generic-container.tsgetIpAddressandgetNetworkIdinpackages/testcontainers/src/generic-container/started-generic-container.ts
Notes
- Go takes the aliases with the network:
network.WithNetwork(aliases, nw), and its request holds a list of networks with aliases per network. Java has the same two separate calls as this library. - Related: #1535 (network options).
Dependencies
- Nothing blocks this. It can start now.
- Changes
StartedTestContainer, which today means the interface,StartedGenericContainerand the forwarder onAbstractStartedContainer. Several other issues do the same. The edits do not overlap, so they can go in parallel.
- 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
-
affected/v17 affected/v18 area/frontend type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
umbraco/Umbraco-CMS#24186 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
better-auth/better-auth#11723 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
area: docs difficulty: easy documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Worker-Erstellung bricht langsame Git-Worktree-Checkouts nach 20 Sekunden abPosiblemente ocupada @KajoVanBuyten la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
AgentSystemLabs/agent-office#367 ·
Los mantenedores suelen responder en 1 día