Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Emit lifecycle events with timings

オープン
#1,555 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, node.js, typescript
領域
devtools, testing

調査の方向性

Read the four listed files under packages/testcontainers/src/, then inspect the lifecycle hooks in dependency #1554 to identify the event points. Define observational lifecycle events with timings and add the per-builder form; verify events fire at the hook points without listeners changing or blocking startup. The issue also suggests including a timing summary in the default logs.

索引モデルが issue の本文から書いたものです。

説明

enhancement minor

What happens

start() is a black box between the call and the result. The steps (pull, create, copy files, start, port binding, wait strategy, ready) are visible only as debug log lines.

  • A caller cannot show progress, for example "pulling 340 MB".
  • A caller cannot tell where the time went: a 45 second start may be 40 seconds of pull or 40 seconds of waiting.
  • Tooling that wants to report container activity, such as a test reporter, has to parse debug output.

Expected

Structured events for the lifecycle, with timings:

TestContainers.on("container", (event) => {
  // { type: "pulled" | "created" | "started" | "ready" | "stopped" | ..., image, containerId, durationMs }
});

and a per-container form on the builder. Events are observational: a listener cannot change or block the start.

Where

  • packages/testcontainers/src/generic-container/generic-container.ts
  • packages/testcontainers/src/generic-container/started-generic-container.ts
  • packages/testcontainers/src/container-runtime/clients/image/docker-image-client.ts
  • packages/testcontainers/src/docker-compose-environment/docker-compose-environment.ts

Notes

  • The points where events fire are the points where the lifecycle hooks run.
  • A summary of the timings in the default log output would answer most "why is my test slow" questions without code.

Dependencies

  • Stack on #1554: events fire at the same points the hooks run.
主要言語
TypeScript
スター
2.6k
フォーク
274
平均マージ
1日 14時間
マージ済み PR(30日)
44

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

testcontainers/testcontainers-node のほかの issue

testcontainers/testcontainers-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。