Apply one startup deadline from container start to ready
维护者通常 1 天内回复
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 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 小时
- 30 天内合并 PR
- 44
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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
-
documentation good first issue
难度 2/5 半天 新手友好度 72/100
sujithputta02/Esapay#13 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
ehmpathy/rhachet-roles-bhuild#468 ·
维护者通常 1 天内回复
-
Share dialog: the address book's contact count reads "1 contacts" (no singular form in any language)可能已有人在做 @chibenwa 今天认领。 未关闭ai-driven-qa bug claude Cosmetic
难度 2/5 1-3 小时 新手友好度 72/100
linagora/twake-contacts-frontend#271 · 1 条评论 ·
维护者通常 1 天内回复
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
难度 1/5 1 小时以内 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
Koenkk/zigbee2mqtt#33402 ·
维护者通常 1 天内回复