Pass the image to `ImagePullPolicy.shouldPull`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, node.js, typescript
調査の方向性
Start with packages/testcontainers/src/utils/pull-policy.ts, then trace policy use in generic-container.ts, generic-container-builder.ts and docker-compose-environment.ts. Check #1518 for the existing return values before deciding how to handle the compatibility and multiple-image cases. Done means policies receive the relevant image, named outcomes are accepted alongside current values, and the documented call sites handle them consistently.
索引モデルが issue の本文から書いたものです。
説明
What happens
ImagePullPolicy.shouldPull() takes no arguments:
export interface ImagePullPolicy {
shouldPull(): boolean | "never";
}
A custom policy cannot see which image it is being asked about, so it cannot express rules such as "always pull :latest, use the cache for pinned tags" or "never pull images from the local registry". One policy instance is applied to every image a container, a Dockerfile build or a Compose environment needs.
The return type mixes two booleans with a string: false means "pull if missing", true means "always pull" and "never" means "fail if missing".
Expected
shouldPullreceives the image, for exampleshouldPull(image: ImageName).- The three outcomes have names, for example
"always" | "missing" | "never", accepted alongside the current values.
Where
packages/testcontainers/src/utils/pull-policy.ts- call sites in
generic-container.ts,generic-container-builder.tsanddocker-compose-environment.ts
Notes
- Java's interface is
boolean shouldPull(DockerImageName imageName). .NET's policy is aFunc<ImageInspectResponse, bool>. - Passing an argument is compatible with existing policies, hence
minor. Dropping theboolean | "never"return values would bemajor. - Compose and Dockerfile builds resolve several images. Decide what they pass.
Dependencies
- Nothing blocks this. It can start now.
- Coordinate with #1518: for the old return values.
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 277
- 平均マージ
- 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
-
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ranxianglei/billion-context#3583 ·
メンテナーはふだん 1 日以内に返信
-
bug:new
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
callstackincubator/simlock#673 ·
メンテナーはふだん 1 日以内に返信
-
documentation v3
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
anomalyco/opencode#56380 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信