Throw typed errors with a `cause`
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
Start by reading the listed wait-strategy, generic-container, bound-ports, and docker-compose-environment files, then trace the 33 new Error(...) sites and existing tests. Define exported error categories with useful fields and preserve existing messages while attaching underlying errors as cause. Done when the main listed failure types are distinguishable by class, retain causes where errors are wrapped, and tests cover the new fields and unchanged messages.
索引モデルが issue の本文から書いたものです。
説明
What happens
Every error created by packages/testcontainers is a plain Error. There are 33 new Error(...) sites and no error subclasses. A caller can only tell failures apart by matching message text:
Log message "..." not received after 60000msURL /health not accessible after 60000msImage "..." does not exist locally and pull policy is "never"No port binding found for :8080/tcpCannot get container "..." as it is not runningFailed to build image
None of them carry a cause, so the underlying Docker or network error is lost when one is wrapped.
Expected
Exported error classes for the main failure categories, with useful fields, so callers and test helpers can branch on them:
- startup timeout (strategy, timeout, container id)
- container exited during startup (exit code)
- image pull or build failure
- missing port binding or unknown container
Underlying errors are attached as cause.
Where
packages/testcontainers/src/wait-strategies/*.tspackages/testcontainers/src/generic-container/*.tspackages/testcontainers/src/utils/bound-ports.tspackages/testcontainers/src/docker-compose-environment/*.ts
Notes
- Java has
ContainerLaunchExceptionandContainerFetchException. - Related: #1506 (container logs in the start error), #1507 (fail the HTTP wait when the container exits), #1508 (build output on a failed build). Typed errors give those a place to put the logs and exit code.
- Keeping the existing messages makes this additive.
Dependencies
- Nothing blocks this. It can start now.
- 主要言語
- TypeScript
- スター
- 2.7k
- フォーク
- 290
- 平均マージ
- 4日 1時間
- マージ済み PR(30日)
- 22
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testcontainers/testcontainers-node のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
testcontainers/testcontainers-node#1673 ·
メンテナーはふだん 4 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
testcontainers/testcontainers-node#1539 ·
メンテナーはふだん 4 日以内に返信
-
Let `Wait.forListeningPorts()` wait on specific ports対応中かも @artbom が 29 日前に担当しました。 オープンenhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
testcontainers/testcontainers-node#1533 ·
メンテナーはふだん 4 日以内に返信
-
enhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
testcontainers/testcontainers-node#1531 ·
メンテナーはふだん 4 日以内に返信
-
Export the types used in public method signatures対応中かも @artbom が 29 日前に担当しました。 オープンenhancement minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
testcontainers/testcontainers-node#1528 ·
メンテナーはふだん 4 日以内に返信
testcontainers/testcontainers-node の issue をすべて見る
似ている issue
-
prio:low scope:hud
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
OliverRomhagen/vrigstad-joyride#953 ·
メンテナーはふだん 1 日以内に返信
-
review-followup
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
griffinwork40/agent-afk#5446 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
kacper-szewczyk/Ticknest#346 ·
メンテナーはふだん 1 日以内に返信
-
echarts geo: a GeoJSON URL that returns 200 with a body that is not JSON is fetched on each refreshオープンbug plugin/echarts/geo
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
Yeachan-Heo/gajae-code#8230 ·
メンテナーはふだん 1 日以内に返信