Fix devspace build-container-localdev race - #4669
Conversation
See NVIDIA#3106: If the build container doesn't exist yet, three different builds try to crate it at the same time and only one of them "wins", failing the first build. Fix it by making an explicit before:build step that ensures build-container-localdev exists.
Summary by CodeRabbit
WalkthroughThe DevSpace configuration moves the shared ChangesLocal build preparation
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
devspace.yaml (1)
49-50: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy liftSerialize the base-image build
The global
before:buildhook is serialized only within one DevSpace invocation. Separatedevspace buildprocesses can both passdocker image inspectbefore either createsbuild-container-localdev.Use an inter-process lock or another mechanism that serializes this build for all three application images.
🤖 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 `@devspace.yaml` around lines 49 - 50, Update the before:build workflow around the application image build command to use an inter-process lock or equivalent cross-process serialization, ensuring all three application image builds cannot concurrently pass the base-image check and create build-container-localdev. Preserve the existing Docker build behavior while applying the shared synchronization across separate devspace build invocations.Source: Coding guidelines
🤖 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.
Outside diff comments:
In `@devspace.yaml`:
- Around line 49-50: Update the before:build workflow around the application
image build command to use an inter-process lock or equivalent cross-process
serialization, ensuring all three application image builds cannot concurrently
pass the base-image check and create build-container-localdev. Preserve the
existing Docker build behavior while applying the shared synchronization across
separate devspace build invocations.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 6dc44d98-adf2-4f4e-b1d7-34a7f5429ede
📒 Files selected for processing (1)
devspace.yaml
See #3106: If the build container doesn't exist yet, three different builds try to crate it at the same time and only one of them "wins", failing the first build.
Fix it by making an explicit before:build step that ensures build-container-localdev exists.
Related issues
#3106
Type of Change
Breaking Changes
Testing
Additional Notes