Repository navigation
build(sidecar): build all sidecars in one RUN step to free BuildKit slots - #15784
Conversation
…lots BuildKit takes a max-parallelism slot before a RUN waits on a sharing=locked cache, so the three builder stages and two compliance steps could hold every slot on a pod while one compiled. Build the SBOMs, the three sidecars, and the license files in one RUN, and run cargo clean --workspace first so the shared target cache cannot link another revision's code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: pvijayakrish <pvijayakrish@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review. WalkthroughThe sidecar Dockerfile replaces separate engine builder stages with one ChangesSidecar build and packaging
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to No actionable issue remains before merge. The first full sidecar CI build will still validate the consolidated build end to end. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Comment |
✅ Dynamo PR CI passed — run 37830306501 (attempt 1) on
|
…single-run-build Signed-off-by: pvijayakrish <pvijayakrish@nvidia.com> # Conflicts: # lib/sidecar/Dockerfile
Signed-off-by: Tushar Sharma <tusharma@nvidia.com>
Summary
Build all three sidecars, their SBOMs, and their license files in one
RUNstep. Remove the shared Cargo target cache, so BuildKit controls invalidation for compiled workspace artifacts.Linear: OPS-8864
CI BuildKit pods run only 3 build steps at a time (
max-parallelism = 3). BuildKit takes a slot before a step waits for asharing=lockedcache. Previously, the three sidecar builders and compliance steps could occupy every slot while one process compiled.Across 150 sidecar builds from Sep 28 to Oct 6, builder steps held slots for a median of about 38 minutes per architecture. Cargo used about 19 minutes. The remaining wait time reduced capacity for other builds.
Changes in
lib/sidecar/Dockerfile:sidecar-builderstage replaces the three builder stages and the compliance-inventory stage.RUNtakes the Cargo download-cache locks once.cargo build -pcommand. One combined Cargo command would merge backend-specific features./src/targetcache mount is removed. A changed Docker input now starts with a fresh target directory./out/bin/.Expected effect: about 31 fewer idle slot-minutes per architecture per sidecar build. Builds with changed inputs will recompile dependencies. Unchanged inputs still use the normal BuildKit layer cache.
This overlaps draft #15680, which merges the builders but leaves compliance inventory separate.
Validation
RUNshell body passeddash -nsyntax validation.git diff --checkpassed.docker buildx build --checkwas unavailable because the Docker daemon was stopped.