Document and align the units of sizes and durations
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
Start with the listed files: packages/testcontainers/src/types.ts, test-container.ts, generic-container/generic-container.ts, and wait-strategies/composite-wait-strategy.ts. Document each numeric option's unit in JSDoc and add Date support for logs({ since }); the issue leaves the shared size unit decision open, and any unit change needs a major release. Done means the units are documented and Date is accepted, with the size decision resolved.
索引モデルが issue の本文から書いたものです。
説明
What happens
Numeric options use different units, and most of them say so only in the docs, or nowhere:
| Option | Unit | Stated in the type or JSDoc |
|---|---|---|
withResourcesQuota({ memory }) |
gigabytes | inline comment |
withResourcesQuota({ cpu }) |
CPUs | inline comment |
withSharedMemorySize(bytes) |
bytes | parameter name |
withStartupTimeout(startupTimeoutMs) |
milliseconds | parameter name |
HealthCheck.interval, timeout, startPeriod |
milliseconds | no |
stop({ timeout }), restart({ timeout }) |
milliseconds | no |
Compose down({ timeout }) |
milliseconds | no |
HttpWaitStrategy.withReadTimeout |
milliseconds | parameter name |
CompositeWaitStrategy.withDeadline(deadline) |
milliseconds | no |
logs({ since }) |
Unix timestamp in seconds | no |
Two stand out:
- Memory is in gigabytes while shared memory is in bytes, so the same container can be configured with
withResourcesQuota({ memory: 0.5 })andwithSharedMemorySize(512 * 1024 * 1024). logs({ since })is the only time value in seconds. It is passed straight to Docker, so a millisecond timestamp such asDate.now()is read as a time far in the future.
Expected
- Every numeric option documents its unit in JSDoc, so it shows in the editor.
logs({ since })also accepts aDate.- Decide whether sizes should share one unit.
Where
packages/testcontainers/src/types.tspackages/testcontainers/src/test-container.tspackages/testcontainers/src/generic-container/generic-container.tspackages/testcontainers/src/wait-strategies/composite-wait-strategy.ts
Notes
- Semver: JSDoc and accepting a
Dateare additive, henceminor. Changing the unit of an existing option would bemajor. - Related: #734 (memory quota units).
Dependencies
- Nothing blocks this. It can start now.
- 主要言語
- 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
better-auth/better-auth#11723 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: docs difficulty: easy documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Worker-Erstellung bricht langsame Git-Worktree-Checkouts nach 20 Sekunden ab対応中かも @KajoVanBuyten が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
AgentSystemLabs/agent-office#367 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pierrecomputer/pierre#1187 ·
メンテナーはふだん 1 日以内に返信
-
area: frontend bug
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
snapotter-hq/SnapOtter#2425 ·
メンテナーはふだん 1 日以内に返信