A `tracked` env query is validated against the unfiltered parent environment (broad queries are CI-hostile)
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- github-actions, rust
- Área
- build-system, ci-cd
Línea de trabajo
Ejecuta la reproducción enlazada con pnpm install y ./repro.sh, y luego sigue getEnvs({ prefix: "" }, { tracked }) a través de @voidzero-dev/vite-task-client y del punto de entrada vp build. Compara el comportamiento de las variables rastreadas y no rastreadas cuando cambia una variable ambiental no relacionada; se considera completado cuando se ha establecido el comportamiento previsto de la consulta de variables rastreadas y la reproducción ya no informa del fallo descrito, problemático para CI.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Rust
- Estrellas
- 466
- Forks
- 42
- Merge medio
- 1 d 20 h
- PR fusionados (30 d)
- 21
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de voidzero-dev/vite-task
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
voidzero-dev/vite-task#738 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
voidzero-dev/vite-task#719 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
voidzero-dev/vite-task#717 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
voidzero-dev/vite-task#702 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
voidzero-dev/vite-task#700 · 2 comentarios ·
Todos los issues de voidzero-dev/vite-task
Issues similares
-
Browser (wasm) relay client cannot connect to relays whose URL has a trailing-dot FQDN hostname Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
n0-computer/iroh#4550 ·
-
impl detach for native Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
paritytech/zombienet-sdk#591 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
farion1231/cc-switch#7638 · 1 comentario ·
-
onnx-ir re-exports ModelProto and GraphProto but not NodeProto, AttributeProto and AttributeType Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100