Repository navigation
fix(deploy): ship vendored crate patches in market image contexts - #3810
Merged
Merged
Conversation
The root manifest patches `tao` and `wry` to in-tree paths, and Cargo resolves
every `[patch.crates-io]` entry from the workspace root even for a service-only
build. The miniapp and skin Dockerfiles only copied `third_party/eioc`, so a
clean checkout failed with:
error: failed to load source for dependency `tao`
Caused by: unable to update /build/third_party/tao
Copy both vendored engines and allowlist them in the per-Dockerfile ignore
files. Because those ignore files are hand-maintained whitelists, add a
contract test that keeps `[patch.crates-io]` paths, third_party COPY sources
and the committed `ppt-live` bundle in sync with the build context.
Verified by building both images from the repository root.
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.
问题
从干净 checkout 构建
miniapp-market/skin-market镜像会直接失败:根因
根
Cargo.toml的[patch.crates-io]把tao和wry指向仓库内的third_party/路径。Cargo 在解析 workspace 时就会读取这些 path 依赖的 manifest,哪怕本次只构建某个 service crate、根本不编译它们。但两个市场的 Dockerfile 只
COPY third_party/eioc/,per-Dockerfile 的.dockerignore也只放行eioc。tao/wry是 2026-10-10 引入的(3e9cdc5ed),Dockerfile 没跟上,所以这两个镜像的构建路径从那时起就是坏的。改动
src/apps/{miniapp,skin}-market-server/Dockerfile:补COPY third_party/tao/、COPY third_party/wry/Dockerfile.dockerignore:放行这两个目录scripts/market/market-image-context.test.mjs+ CI step:这些 ignore 文件是手写白名单,测试保证[patch.crates-io]里每个 path 依赖都有COPY且被放行third_party/*COPY 源都被放行product-domains用include_str!引用的ppt-live/dist/ui.bundle.js不会被**/dist规则剪掉验证
从仓库根用官方路径各构建一次,均成功:
新测试在删掉一行 ignore 规则时会失败(已反向验证),
node --test scripts/market/*.test.mjs三条全过。