Add a global never-pull image policy - #1457
Conversation
✅ Deploy Preview for testcontainers-node ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. Summary by CodeRabbit
WalkthroughThe change adds ChangesNever-pull image policy
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant Testcontainers
participant DockerImageClient
participant pullImage
participant DockerDaemon
Testcontainers->>DockerImageClient: Request image pull
Testcontainers->>pullImage: Request image pull
DockerImageClient->>DockerDaemon: Inspect local image
pullImage->>DockerDaemon: Inspect local image
DockerDaemon-->>DockerImageClient: Image exists or inspection error
DockerDaemon-->>pullImage: Image exists or inspection error
DockerImageClient-->>Testcontainers: Reuse image or fail
pullImage-->>Testcontainers: Reuse image or fail
Merge Risk: ⚪ Minimal · up to The opt-in never-pull policy preserves existing defaults and refuses unavailable images before registry access. No actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
packages/testcontainers/src/container-runtime/clients/image/docker-image-client.test.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. packages/testcontainers/src/container-runtime/clients/image/docker-image-client.tsESLint skipped: the matched ESLint configuration already failed (missing-dependency). packages/testcontainers/src/container-runtime/utils/pull-image.tsESLint skipped: the matched ESLint configuration already failed (missing-dependency).
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the image shelf Comment |
Require preloaded VRT images and reject mismatched or unverifiable Ryuk reuse. Reuses the never-pull implementation from [testcontainers-node#1457](testcontainers/testcontainers-node#1457); Ryuk identity verification remains a separate local patch. Breaking: preload the runtime image manifest before testing. Runtime and real-Docker regressions pass; minimal Linux coverage checks compare/update and baseline protection without installed Node, Chromium, Docker CLI, or registry credentials. Closes #20.
Add
TESTCONTAINERS_PULL_POLICY=neverto require local images before registry auth or pulls, including helper containers. Document that builds, Compose, and container networking are outside its scope. Opt-in only; existing policies and defaults are unchanged.Validation: 8 expected regression failures before the fix; all 13 focused/existing policy tests pass after it. Format, lint, cross-module TypeScript checks, and core build pass.
Closes #1456.