Support `AbortSignal` in `start()`, `exec` and other long-running calls
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
Start by reading start and startContainer in packages/testcontainers/src/generic-container/generic-container.ts, then trace image pull and build, wait strategies, exec, and Compose up in the listed files. Check the coordination requirements for #1558, #1548, and #1582 before changing shared interfaces. Done means long-running calls accept an AbortSignal, reject with its reason on abort, and clean up partially created resources.
索引モデルが issue の本文から書いたものです。
説明
What happens
Nothing in the API accepts an AbortSignal.
start()can spend minutes pulling an image and waiting for readiness. When the test runner times the test out, or the user gives up, the start carries on in the background. The container is still created and stays until Ryuk removes it at process exit.- The only timeout is the wait strategy's startup timeout. It does not cover the image pull.
exechas no timeout and cannot be cancelled, so a command that hangs blocks its caller indefinitely.DockerComposeEnvironment.up()andGenericContainerBuilder.build()are the same.
Expected
Long-running operations take a signal:
await new GenericContainer(image).start({ signal: AbortSignal.timeout(30_000) });
await container.exec(["pg_dump"], { signal });
On abort the promise rejects with the signal's reason, and whatever was half-created (container, network attachment, Compose project) is stopped and removed.
Where
startandstartContainerinpackages/testcontainers/src/generic-container/generic-container.tspullandbuildinpackages/testcontainers/src/container-runtime/clients/image/docker-image-client.tspackages/testcontainers/src/wait-strategies/*.tsexecinpackages/testcontainers/src/container-runtime/clients/container/docker-container-client.tsupinpackages/testcontainers/src/docker-compose-environment/docker-compose-environment.ts
Notes
- Go passes a
context.Contextto every call. .NET takes aCancellationToken. - Related: #1081 asked for this. It was closed when the reporter's underlying problem turned out to be something else.
- A startup deadline is a signal with a timeout. One mechanism can serve both this and #1582.
Dependencies
- Stack on #1558: both change the wait strategy interface. Change it once, in the same major.
- Coordinate with #1548:
execgains a timeout there. Make the two agree. - Coordinate with #1582: the deadline can be carried by the same signal.
- 主要言語
- 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
-
Contrib indemnité de départ à la retraite : faire le pont avec le simulateur sur la page génériqueオープンP1
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
SocialGouv/code-du-travail-numerique#7561 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
kubernetes-sigs/headlamp#7950 ·
メンテナーはふだん 3 日以内に返信
-
README for cli対応中かも @Janvi-kapoor が今日担当しました。 オープンOSCI'26
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
GauravKarakoti/SecureFlow#1308 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
vitest-dev/vitest#11577 ·
メンテナーはふだん 1 日以内に返信