fix(docker): retry devcontainer builds on transient failures - #781
fix(docker): retry devcontainer builds on transient failures#781skevetter wants to merge 2 commits into
Conversation
Feature installs that download release binaries inside the build (via nanolayer) can fail with a truncated download (http.client.IncompleteRead), failing the whole devcontainer build. Since the build is BuildKit-cached, retrying only replays the failed step. executeBuild now retries with exponential backoff, tee-ing the build output into a bounded buffer so the transient signal can be detected from the log stream. The text match is confined to classifyBuildError, which wraps matches in a named errTransientBuild sentinel so callers decide via errors.Is.
✅ Deploy Preview for images-devsy-sh canceled.
|
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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. Comment |
✅ Deploy Preview for devsydev canceled.
|
Summary
Devcontainer builds intermittently fail when a feature install downloads a release binary inside the build (via
nanolayer) and the transfer is truncated mid-stream (http.client.IncompleteRead). This surfaces as a barefailed to solve ... exit code: 1and fails the whole build.Because the build is BuildKit-cached, a retry only replays the failed step.
executeBuildnow retries with exponential backoff (one initial attempt + two retries), tee-ing the build output into a bounded buffer so the transient signal can be read from the log stream — the returned error alone is opaque.The text matching is confined to
classifyBuildError, which wraps a matched failure in a namederrTransientBuildsentinel so callers decide viaerrors.Isinstead of re-scanning strings. Context cancellation is never treated as transient. The pattern list starts narrow (incompleteread) and is a one-line change to extend.Notes
The root cause of the truncation is a network-layer issue between the build environment and GitHub's release CDN, not Devsy code — Devsy is not in the byte path of these downloads. This change is app-level resilience for that flaky path; pinning/pre-baking these tools would remove the dependency entirely and could be a follow-up.