Provide in-network connection details from modules
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, node.js, typescript
Direzione di ricerca
Start with #1536 for network alias support and coordinate the getter name with #1538. Read the alias code in packages/testcontainers/src/test-container.ts and started-generic-container.ts, then inspect connection getters under packages/modules/*/src and the in-network listener approaches in Kafka and Redpanda. Done means modules can provide a URI using a network alias and internal port, with credentials and database name from module configuration.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
Module getters return the address as seen from the test process: the Docker host and a mapped port. A second container on the same Docker network needs a different address, the first container's network alias and its internal port, and no module provides it.
const db = await new PostgreSqlContainer(image).withNetwork(network).withNetworkAliases("db").start();
db.getConnectionUri(); // postgres://test:test@localhost:55012/test, no use to another container
const app = await new GenericContainer(appImage)
.withNetwork(network)
.withEnvironment({ DATABASE_URL: "postgres://test:test@db:5432/test" }) // assembled by hand
.start();
The module knows the internal port, the credentials and the database name. The user has to repeat all of them, and keep them in step with the module's defaults.
Expected
Each module can produce its connection details for use inside a network:
db.getConnectionUri({ network }); // postgres://test:test@db:5432/test
A started container can report its aliases on a network, which this needs.
Where
packages/testcontainers/src/test-container.tsandstarted-generic-container.ts, for the aliases- the connection getters in
packages/modules/*/src
Notes
- Kafka and Redpanda already have to deal with in-network listeners. Their approach is a starting point.
- The naming should follow whatever the modules converge on for connection getters.
Dependencies
- Blocked by #1536: needs a started container to know its aliases on a network.
- Coordinate with #1538: for the getter name.
- Lingua principale
- TypeScript
- Stelle
- 2.6k
- Fork
- 274
- Merge medio
- 1g 14h
- PR unite (30g)
- 44
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di testcontainers/testcontainers-node
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
testcontainers/testcontainers-node#1539 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
testcontainers/testcontainers-node#1533 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
testcontainers/testcontainers-node#1531 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
testcontainers/testcontainers-node#1529 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
testcontainers/testcontainers-node#1528 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di testcontainers/testcontainers-node
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
NaturalIntelligence/fast-xml-parser#890 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
zsviczian/obsidian-excalidraw-plugin#3000 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pnpm/get.pnpm.io#68 ·
-
[BUG] Cloudflare KV binding 模式下 kvDriver.list() 沿用 EdgeOne 语义,字段名不匹配导致 key 格式下初始化 500 并耗尽 list 配额Forse già presa @wumingzhinu l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
OpenListTeam/OpenList-Worker#125 ·
I maintainer di solito rispondono entro 2 giorni
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
margelo/react-native-vision-camera#4217 ·
I maintainer di solito rispondono entro 4 giorni