Provide in-network connection details from modules
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 274
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 44
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testcontainers/testcontainers-node のほかの issue
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
testcontainers/testcontainers-node#1539 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
testcontainers/testcontainers-node#1533 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
testcontainers/testcontainers-node#1531 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
testcontainers/testcontainers-node#1529 ·
メンテナーはふだん 1 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
testcontainers/testcontainers-node#1528 ·
メンテナーはふだん 1 日以内に返信
testcontainers/testcontainers-node の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 70/100
siyuan-note/siyuan#20517 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NaturalIntelligence/fast-xml-parser#890 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
zsviczian/obsidian-excalidraw-plugin#3000 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pnpm/get.pnpm.io#68 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nuxt-modules/better-auth#578 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信