Apply one startup deadline from container start to ready
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
Read generic-container/generic-container.ts at startContainer and reuseContainer, then trace the exposed-port inspection utility and wait-strategy.ts through each strategy and the Kafka, Redpanda, and Couchbase containerStarted hooks. Check the linked dependency issues and the core tests that assert timeout errors. Decide whether image pulling counts toward the shared deadline and coordinate the timeout precedence and hook context; done means all startup phases share one deadline and report the waiting phase and total budget.
索引モデルが issue の本文から書いたものです。
説明
What happens
withStartupTimeout(ms) reads as "the container must be ready within this long". It is applied per phase instead, so start() can take several times longer than the value given before it fails:
- The image pull has no limit.
- The port-binding wait has its own fixed 30 second limit, separate from the startup timeout.
- The wait strategy gets the full timeout, counted from the moment the wait begins.
- Modules that wait again in
containerStartedrestart the clock. Kafka and Redpanda applystartupTimeoutMsto a second wait, so a Kafka container with its default of 180 seconds can run for close to 360 before failing.
Expected
One deadline, fixed when the container is started. The port-binding wait, the wait strategy and the hooks each get what is left of it. When it runs out, the error says which phase was waiting and what the total budget was.
Where
startContainerandreuseContainerinpackages/testcontainers/src/generic-container/generic-container.tspackages/testcontainers/src/generic-container/inspect-container-util-ports-exposed.tspackages/testcontainers/src/wait-strategies/wait-strategy.tsand every strategycontainerStartedin the kafka, redpanda and couchbase modules
Notes
- This cannot be done compatibly. The strategy has to be told the deadline. Passing the remaining time through
withStartupTimeoutchanges the error text, which core tests assert exactly (not accessible after 3000ms), and changes the caller's strategy instance. A new argument towaitUntilReadyis an interface change. Hencemajor. - Go gets this from
context: each strategy callscontext.WithTimeout(ctx, timeout), so the caller's context is the ceiling and a strategy's own timeout can only shorten it. - #1494 kept the port-binding limit independent of
withStartupTimeout, because tying them together would let each phase use the full timeout. A shared deadline removes that objection. - Decide whether the image pull counts towards the deadline.
- A compatible first step is being prepared separately: the remaining startup time is passed to
containerStarted, so module waits after the wait strategy stop restarting the clock. - Related: #1446, #1513.
Dependencies
- Blocked by #1558, #1560: both change what
waitUntilReadyreceives. The deadline should travel in what they add, so the interface changes once. - Coordinate with #1523: the precedence between a container timeout and a strategy timeout has to be one rule.
- Coordinate with #1554: hooks should be given the remaining time through their context.
- 主要言語
- 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
-
enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OWASP/cve-lite-cli#1335 ·
メンテナーはふだん 1 日以内に返信
-
Windows: main-screen mouse tracking requires WT_SESSION, so it never enables inside herdr panesオープン
難易度 1/5 1時間未満 初心者へのやさしさ 66/100
code-yeongyu/senpi#3353 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Channels status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
mastra-ai/mastra#27093 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement needs-triage ui
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信