Repository navigation
fix(docker): retry npm fetches during sandbox builds - #3627
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
📝 WalkthroughWalkthroughThe Dockerfile now configures npm registry-fetch retry and timeout settings to improve build resilience. Both the builder stage (TypeScript plugin build) and runtime stage receive npm environment variables controlling retry counts, min/max fetch timeouts, and overall fetch timeout behavior before dependency installation. ChangesDocker npm network resilience configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
Dockerfile (1)
16-27: Run the Docker E2E workflow before merge.Given this is a Docker-layer behavior hardening change, please run the recommended
cloud-e2e,sandbox-survival-e2e,hermes-e2e,rebuild-openclaw-e2ejobs to validate real build/runtime behavior.As per coding guidelines,
Dockerfilechanges are “only testable with a real container build.”Also applies to: 69-76
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@Dockerfile` around lines 16 - 27, This change modifies Docker layer behavior around the build stage (ENV settings, COPY of nemoclaw package.json/tsconfig and src, WORKDIR /opt/nemoclaw, and the RUN npm ci && npm run build step) and must be validated by running the real container builds; run the recommended E2E jobs (cloud-e2e, sandbox-survival-e2e, hermes-e2e, rebuild-openclaw-e2e) to build and run the container image, verify the layers and runtime behavior, and report any build/runtime failures or differences before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@Dockerfile`:
- Around line 16-27: This change modifies Docker layer behavior around the build
stage (ENV settings, COPY of nemoclaw package.json/tsconfig and src, WORKDIR
/opt/nemoclaw, and the RUN npm ci && npm run build step) and must be validated
by running the real container builds; run the recommended E2E jobs (cloud-e2e,
sandbox-survival-e2e, hermes-e2e, rebuild-openclaw-e2e) to build and run the
container image, verify the layers and runtime behavior, and report any
build/runtime failures or differences before merging.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 1729b2dd-ccec-4906-ae60-d2f7e8465149
📒 Files selected for processing (1)
Dockerfile
E2E Advisor RecommendationRequired E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
|
cjagwani
left a comment
There was a problem hiding this comment.
Solid resilience tweak — minimum diff, both npm ci stages covered (builder + runtime, runtime ENV correctly precedes the global npm install -g RUNs at :92/:101), no new security surface. CI green across all 27 checks.
Three small nits, none blocking:
Dockerfile:18-22and:68-75— worth a one-line# Why:comment above the ENV block explaining the rationale (transient registry resets on shared CI with flaky egress). The variable names don't telegraph why these specific values (5 retries, 20s/120s/300s).- Follow-up (separate ticket) — nothing currently asserts these settings survive in the built image. A 4-line E2E check (
npm config get fetch-retriesetc.) would prevent silent regression if someone trims the block later. Out of scope here. - Optional — no
Closes #Nin the body. If this was prompted by a specific failing CI run, link it; otherwise a "no linked issue — proactive hardening" line helps the audit trail.
Happy to approve as-is.
Summary
Hardens sandbox image builds against npm registry/network resets by increasing npm fetch retry and timeout settings. This targets the
npm cisteps used to build and install the NemoClaw plugin inside the OpenClaw sandbox image.Changes
npm ci && npm run build.npm ci --omit=devstep.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit