diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e517b475..e216f4421 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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/` 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)). diff --git a/crates/vt_graph/src/config/mod.rs b/crates/vt_graph/src/config/mod.rs index 3f2eecff3..a6c492d0d 100644 --- a/crates/vt_graph/src/config/mod.rs +++ b/crates/vt_graph/src/config/mod.rs @@ -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 diff --git a/crates/vt_plan/src/envs.rs b/crates/vt_plan/src/envs.rs index 336540d3a..5f0313e3c 100644 --- a/crates/vt_plan/src/envs.rs +++ b/crates/vt_plan/src/envs.rs @@ -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()); + } }