Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog

- **Fixed** Cached tasks now receive OpenTelemetry's `OTEL_*` variables, such as `OTEL_EXPORTER_OTLP_ENDPOINT`, so tools that export telemetry from a cached task no longer need `OTEL_*` in every task's `untrackedEnv`. Like the other default pass-through variables, their values are not part of the cache key ([#927](https://github.com/voidzero-dev/vite-task/pull/927)).
- **Changed** Tasks that write a file they also read are now cached, instead of being reported as `not cached because it modified its inputs`. For example, `tsc --incremental` reads and rewrites `tsconfig.tsbuildinfo`: the next run is a cache hit if the file is as `tsc` left it, or if it is missing, as on a fresh clone, in which case the hit restores it ([#913](https://github.com/voidzero-dev/vite-task/pull/913)).
- **Fixed** A cache hit restores the symbolic links a task's `output` globs match as links, instead of dropping them, so a replayed output that links a directory, such as a bundler's `node_modules/<package>` link, is complete ([#885](https://github.com/voidzero-dev/vite-task/pull/885)).
- **Fixed** On Linux and macOS, programs using automatic file-access tracking no longer abort when they call `execve`, `execv`, `execl`, `execle`, or `posix_spawn` with an empty path; the call fails with `ENOENT`, as it does without tracking. On Linux, `execveat` with an empty path and without `AT_EMPTY_PATH` now also fails with `ENOENT`, instead of trying to run what its directory descriptor refers to ([#896](https://github.com/voidzero-dev/vite-task/pull/896)).
Expand Down
2 changes: 2 additions & 0 deletions crates/vt_graph/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,8 @@ pub const DEFAULT_UNTRACKED_ENV: &[&str] = &[
"COMPOSE_*",
// Playwright specific
"PLAYWRIGHT_*",
// OpenTelemetry SDK settings, such as the exporter endpoint and service name
"OTEL_*",
// Vite+ internal (not fingerprinted — internal state, not build-affecting)
"VP_*",
// Token patterns
Expand Down
18 changes: 18 additions & 0 deletions crates/vt_plan/src/envs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,4 +614,22 @@ mod tests {
assert!(envs.contains_key(EnvName::from_ref(OsStr::new("ACTIONS_ID_TOKEN_REQUEST_TOKEN"))));
assert!(!envs.contains_key(EnvName::from_ref(OsStr::new("ACTIONS_UNRELATED"))));
}

#[test]
fn test_opentelemetry_env_untracked() {
let env_config = create_env_config(&[], DEFAULT_UNTRACKED_ENV);

let mut envs = create_test_envs(vec![
("OTEL_EXPORTER_OTLP_ENDPOINT", "http://localhost:4318"),
("OTEL_SERVICE_NAME", "build"),
("OTHER_VAR", "should-be-filtered"),
]);

let result = EnvFingerprints::resolve(&mut envs, &env_config).unwrap();

assert!(envs.contains_key(EnvName::from_ref(OsStr::new("OTEL_EXPORTER_OTLP_ENDPOINT"))));
assert!(envs.contains_key(EnvName::from_ref(OsStr::new("OTEL_SERVICE_NAME"))));
assert!(!envs.contains_key(EnvName::from_ref(OsStr::new("OTHER_VAR"))));
assert!(result.fingerprinted_envs.is_empty());
}
}