A `tracked` env query is validated against the unfiltered parent environment (broad queries are CI-hostile)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, rust
- Lĩnh vực
- build-system, ci-cd
Hướng nghiên cứu
Chạy reproduction được liên kết bằng pnpm install và ./repro.sh, sau đó lần theo getEnvs({ prefix: "" }, { tracked }) qua @voidzero-dev/vite-task-client và entry point vp build. So sánh hành vi của biến được tracked và không được tracked khi một biến môi trường không liên quan thay đổi; được xem là hoàn tất khi hành vi truy vấn tracked dự kiến đã được xác lập và reproduction không còn báo lỗi miss gây vấn đề cho CI được mô tả nữa.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
A tracked env query is validated against the full unfiltered parent process environment. A broad query (empty prefix, matching every variable) therefore cache-misses whenever any ambient variable changes, even one the build never reads. In CI, per-run variables (e.g. ACTIONS_ORCHESTRATION_ID) change every run, so such a build never cache-hits.
Reproduction
https://github.com/why-reproductions-are-required/vite-task-tracked-env-query-unfiltered-parent-env
pnpm install
./repro.sh
Two tasks call getEnvs({ prefix: "" }, { tracked }) via @voidzero-dev/vite-task-client and read no variable in particular. Run 3 sets one unrelated ambient variable before running.
| task | tracked |
run 3 (one unrelated ambient var set) |
|---|---|---|
untracked-bulk-env |
false |
HIT (control) |
tracked-bulk-env |
true |
MISS: TrackedEnvQueryChanged { Prefix "", Added ... } |
Where this bites a real build
vp build loads env via Vite's loader, which issues getEnvs({ prefix }, { tracked: true }) for each configured envPrefix (@voidzero-dev/vite-plus-core, chunks/node.js). In a Vite + void app one of those queries is empty-prefix (Prefix "", all variables), so on GitHub Actions vp run build misses every run:
$ vp build ○ cache miss: env 'ACTIONS_ORCHESTRATION_ID' changed, executing
Note env: [] on the task does not help (that controls value-fingerprinting, not the bulk query). The only workaround found is to run the build under a sanitized environment, e.g. env -i PATH="$PATH" HOME="$HOME" vp run build.
Question for maintainers
Is validating a tracked query against the unfiltered parent env intended? A broad tracked query is unavoidably CI-hostile this way. Options might include validating against the filtered env the task received, an ignore-list for ambient/volatile variables, or scoping/untracking broad reads on the consumer side (Vite env loader / void). Filing here to confirm where the fix belongs.
Environment
vite-plus0.2.2,@voidzero-dev/vite-task-client0.2.0- Reproduced on macOS (darwin 25.x) and GitHub Actions
ubuntu-latest
Found alongside #504 while enabling the GitHub Actions cache for a real Vite + void app.
- Ngôn ngữ chính
- Rust
- Star
- 466
- Fork
- 42
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 21
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của voidzero-dev/vite-task
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
voidzero-dev/vite-task#738 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
voidzero-dev/vite-task#719 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-task#717 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
voidzero-dev/vite-task#702 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
voidzero-dev/vite-task#700 · 2 bình luận ·
Tất cả issue của voidzero-dev/vite-task
Issue tương tự
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
paritytech/zombienet-sdk#591 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
farion1231/cc-switch#7638 · 1 bình luận ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100