fix(docker): vendor only the image's platform in the builder stage - #394
Merged
Conversation
The builder's `pnpm run build` triggers prebuild -> vendor:adapters -> vendor-codelldb.js, which defaults to all five platforms because CI is unset inside docker build. The .dockerignore deliberately ships only the linux payloads into the context, so every fresh image build re-downloaded ~450 MB of win32/darwin CodeLLDB the Linux image never uses — a needless network dependency that failed the build on a GitHub connectivity blip (loudly, now that #389's exit guard works). CODELLDB_VENDOR_ALL=false flips the script's local default to current-platform-only, which the Dockerfile's digest-verified shell vendor step already satisfied, so the prebuild vendor pass downloads nothing and the build is deterministic. (SKIP_ADAPTER_VENDOR would be wrong here: it also skips the js-debug vendoring the bundle needs.) Verified: docker build passes with the vendor step skipping instantly; the built image's vendor tree contains only linux-x64/linux-arm64 + the current symlink, and CODELLDB_PATH's engine is present/executable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
pnpm test:coverage's Docker prebuild failed: insidedocker build, the builder stage'spnpm run buildtriggersprebuild→vendor:adapters→vendor-codelldb.js, which — withCIunset in the container — defaults to vendoring all five CodeLLDB platforms. The.dockerignoredeliberately ships only the linux payloads into the context, so every fresh image build re-downloaded ~450 MB of win32/darwin payloads the Linux image never uses. That made the image build hostage to GitHub reachability for assets it doesn't need; a connectivity blip returned 404s and the build failed (loudly — #389's exit guard working as intended; upstream verified healthy, all pinned v1.11.8 assets return 200).Fix
One env in the builder stage:
CODELLDB_VENDOR_ALL=falseflips the vendor script's local default to current-platform-only. The Dockerfile's digest-verified shell vendor step already provides that platform, so the prebuild vendor pass finds it fresh and downloads nothing — deterministic on both amd64 and arm64. (SKIP_ADAPTER_VENDOR=truewould be wrong: it also skips the js-debug vendoring the bundle needs.)Verification
docker buildpasses end-to-end with the vendor step skipping instantly (the identical build failed on this machine minutes earlier on win32/darwin downloads)linux-x64/linux-arm64+ thecurrentsymlink;CODELLDB_PATH's engine is present and executable🤖 Generated with Claude Code