diff --git a/crates/turborepo-env/src/lib.rs b/crates/turborepo-env/src/lib.rs index ee35d5fd46cdc..399f0b5261565 100644 --- a/crates/turborepo-env/src/lib.rs +++ b/crates/turborepo-env/src/lib.rs @@ -13,22 +13,6 @@ use thiserror::Error; const DEFAULT_ENV_VARS: [&str; 1] = ["VERCEL_ANALYTICS_ID"]; -/// Environment mode after we've resolved the `Infer` variant -#[derive(Debug, Clone, Copy)] -pub enum ResolvedEnvMode { - Loose, - Strict, -} - -impl std::fmt::Display for ResolvedEnvMode { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - ResolvedEnvMode::Loose => write!(f, "loose"), - ResolvedEnvMode::Strict => write!(f, "strict"), - } - } -} - #[derive(Clone, Debug, Error)] pub enum Error { #[error("Failed to parse regex: {0}")] diff --git a/crates/turborepo-lib/src/cli/mod.rs b/crates/turborepo-lib/src/cli/mod.rs index 1e24bda0f193a..f2e43093ee3e3 100644 --- a/crates/turborepo-lib/src/cli/mod.rs +++ b/crates/turborepo-lib/src/cli/mod.rs @@ -121,17 +121,16 @@ impl Display for DryRunMode { } #[derive(Copy, Clone, Debug, Default, PartialEq, Serialize, ValueEnum)] +#[serde(rename_all = "lowercase")] pub enum EnvMode { - #[default] - Infer, Loose, + #[default] Strict, } impl fmt::Display for EnvMode { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str(match self { - EnvMode::Infer => "infer", EnvMode::Loose => "loose", EnvMode::Strict => "strict", }) @@ -677,9 +676,7 @@ pub struct ExecutionArgs { /// Environment variable mode. /// Use "loose" to pass the entire existing environment. /// Use "strict" to use an allowlist specified in turbo.json. - /// Use "infer" to defer to existence of "passThroughEnv" or - /// "globalPassThroughEnv" in turbo.json. (default infer) - #[clap(long = "env-mode", default_value = "infer", num_args = 0..=1, default_missing_value = "infer")] + #[clap(long = "env-mode", default_value = "strict", num_args = 0..=1, default_missing_value = "strict")] pub env_mode: EnvMode, /// Use the given selector to specify package(s) to act as /// entry points. The syntax mirrors pnpm's syntax, and @@ -1449,49 +1446,34 @@ mod test { "framework_inference: flag set to false" )] #[test_case::test_case( - &["turbo", "run", "build"], - Args { - command: Some(Command::Run { - execution_args: Box::new(ExecutionArgs { - tasks: vec!["build".to_string()], - env_mode: EnvMode::Infer, - ..get_default_execution_args() - }), - run_args: Box::new(get_default_run_args()) - }), - ..Args::default() - } ; - "env_mode: default infer" - )] - #[test_case::test_case( - &["turbo", "run", "build", "--env-mode"], + &["turbo", "run", "build", "--env-mode"], Args { command: Some(Command::Run { execution_args: Box::new(ExecutionArgs { tasks: vec!["build".to_string()], - env_mode: EnvMode::Infer, + env_mode: EnvMode::Strict, ..get_default_execution_args() }), run_args: Box::new(get_default_run_args()) }), ..Args::default() - } ; + } ; "env_mode: not fully-specified" - )] + )] #[test_case::test_case( - &["turbo", "run", "build", "--env-mode", "infer"], + &["turbo", "run", "build"], Args { command: Some(Command::Run { execution_args: Box::new(ExecutionArgs { tasks: vec!["build".to_string()], - env_mode: EnvMode::Infer, + env_mode: EnvMode::Strict, ..get_default_execution_args() }), run_args: Box::new(get_default_run_args()) }), ..Args::default() } ; - "env_mode: specified infer" + "env_mode: default strict" )] #[test_case::test_case( &["turbo", "run", "build", "--env-mode", "loose"], diff --git a/crates/turborepo-lib/src/hash/mod.rs b/crates/turborepo-lib/src/hash/mod.rs index d2f53ab9986fb..8dcba387ce5b1 100644 --- a/crates/turborepo-lib/src/hash/mod.rs +++ b/crates/turborepo-lib/src/hash/mod.rs @@ -10,12 +10,11 @@ use std::collections::HashMap; use capnp::message::{Builder, HeapAllocator}; pub use traits::TurboHash; -use turborepo_env::{EnvironmentVariablePairs, ResolvedEnvMode}; +use turborepo_env::EnvironmentVariablePairs; use crate::{cli::EnvMode, task_graph::TaskOutputs}; mod proto_capnp { - use turborepo_env::ResolvedEnvMode; use crate::cli::EnvMode; @@ -24,18 +23,17 @@ mod proto_capnp { impl From for global_hashable::EnvMode { fn from(value: EnvMode) -> Self { match value { - EnvMode::Infer => global_hashable::EnvMode::Infer, EnvMode::Loose => global_hashable::EnvMode::Loose, EnvMode::Strict => global_hashable::EnvMode::Strict, } } } - impl From for task_hashable::EnvMode { - fn from(value: ResolvedEnvMode) -> Self { + impl From for task_hashable::EnvMode { + fn from(value: EnvMode) -> Self { match value { - ResolvedEnvMode::Loose => task_hashable::EnvMode::Loose, - ResolvedEnvMode::Strict => task_hashable::EnvMode::Strict, + EnvMode::Loose => task_hashable::EnvMode::Loose, + EnvMode::Strict => task_hashable::EnvMode::Strict, } } } @@ -59,7 +57,7 @@ pub struct TaskHashable<'a> { pub(crate) env: &'a [String], pub(crate) resolved_env_vars: EnvVarPairs, pub(crate) pass_through_env: &'a [String], - pub(crate) env_mode: ResolvedEnvMode, + pub(crate) env_mode: EnvMode, } #[derive(Debug, Clone)] @@ -334,7 +332,6 @@ impl From> for Builder { } builder.set_env_mode(match hashable.env_mode { - EnvMode::Infer => proto_capnp::global_hashable::EnvMode::Infer, EnvMode::Loose => proto_capnp::global_hashable::EnvMode::Loose, EnvMode::Strict => proto_capnp::global_hashable::EnvMode::Strict, }); @@ -361,7 +358,6 @@ impl From> for Builder { #[cfg(test)] mod test { use test_case::test_case; - use turborepo_env::ResolvedEnvMode; use turborepo_lockfiles::Package; use super::{ @@ -386,7 +382,7 @@ mod test { env: &["env".to_string()], resolved_env_vars: vec![], pass_through_env: &["pass_thru_env".to_string()], - env_mode: ResolvedEnvMode::Loose, + env_mode: EnvMode::Loose, }; assert_eq!(task_hashable.hash(), "1f8b13161f57fca1"); @@ -408,11 +404,11 @@ mod test { env: &["env".to_string()], resolved_env_vars: vec![], pass_through_env: &["pass_through_env".to_string()], - env_mode: EnvMode::Infer, + env_mode: EnvMode::Strict, framework_inference: true, }; - assert_eq!(global_hash.hash(), "2144612ff08bddb9"); + assert_eq!(global_hash.hash(), "9f06917065be0a72"); } #[test_case(vec![], "459c029558afe716" ; "empty")] diff --git a/crates/turborepo-lib/src/hash/proto.capnp b/crates/turborepo-lib/src/hash/proto.capnp index c01ff4428f842..18a97de3fcdd2 100644 --- a/crates/turborepo-lib/src/hash/proto.capnp +++ b/crates/turborepo-lib/src/hash/proto.capnp @@ -44,9 +44,8 @@ struct GlobalHashable { enum EnvMode { - infer @0; - loose @1; - strict @2; + loose @0; + strict @1; } struct Entry { diff --git a/crates/turborepo-lib/src/run/builder.rs b/crates/turborepo-lib/src/run/builder.rs index 0202c5ed0fe1b..1baa38a6ec800 100644 --- a/crates/turborepo-lib/src/run/builder.rs +++ b/crates/turborepo-lib/src/run/builder.rs @@ -37,7 +37,7 @@ use { }; use crate::{ - cli::{DryRunMode, EnvMode}, + cli::DryRunMode, commands::CommandBase, engine::{Engine, EngineBuilder}, opts::Opts, @@ -387,12 +387,6 @@ impl RunBuilder { self.opts.run_opts.dry_run.is_some(), )); - if matches!(self.opts.run_opts.env_mode, EnvMode::Infer) - && root_turbo_json.global_pass_through_env.is_some() - { - self.opts.run_opts.env_mode = EnvMode::Strict; - } - let should_print_prelude = self.should_print_prelude_override.unwrap_or_else(|| { self.opts.run_opts.dry_run.is_none() && self.opts.run_opts.graph.is_none() }); diff --git a/crates/turborepo-lib/src/run/global_hash.rs b/crates/turborepo-lib/src/run/global_hash.rs index 6893b4c08d8dc..aa8d44431c2ca 100644 --- a/crates/turborepo-lib/src/run/global_hash.rs +++ b/crates/turborepo-lib/src/run/global_hash.rs @@ -19,7 +19,7 @@ use crate::{ static DEFAULT_ENV_VARS: [&str; 1] = ["VERCEL_ANALYTICS_ID"]; -const GLOBAL_CACHE_KEY: &str = "HEY STELLLLLLLAAAAAAAAAAAAA"; +const GLOBAL_CACHE_KEY: &str = "I can’t see ya, but I know you’re here"; #[derive(Debug, Error)] pub enum Error { @@ -222,7 +222,7 @@ mod tests { &env_var_map, &[], None, - EnvMode::Infer, + EnvMode::Strict, false, &SCM::new(&root), ); diff --git a/crates/turborepo-lib/src/run/mod.rs b/crates/turborepo-lib/src/run/mod.rs index 7e6174e7afe5a..d6ff7aef2a8de 100644 --- a/crates/turborepo-lib/src/run/mod.rs +++ b/crates/turborepo-lib/src/run/mod.rs @@ -260,22 +260,13 @@ impl Run { is_monorepo.then(|| get_external_deps_hash(&root_workspace.transitive_dependencies)); let global_hash_inputs = { - let (env_mode, pass_through_env) = match self.opts.run_opts.env_mode { - // In infer mode, if there is any pass_through config (even if it is an empty array) - // we'll hash the whole object, so we can detect changes to that config - // Further, resolve the envMode to the concrete value. - EnvMode::Infer if self.root_turbo_json.global_pass_through_env.is_some() => ( - EnvMode::Strict, - self.root_turbo_json.global_pass_through_env.as_deref(), - ), + let env_mode = self.opts.run_opts.env_mode; + let pass_through_env = match env_mode { EnvMode::Loose => { // Remove the passthroughs from hash consideration if we're explicitly loose. - (EnvMode::Loose, None) + None } - env_mode => ( - env_mode, - self.root_turbo_json.global_pass_through_env.as_deref(), - ), + EnvMode::Strict => self.root_turbo_json.global_pass_through_env.as_deref(), }; get_global_hash_inputs( diff --git a/crates/turborepo-lib/src/run/summary/mod.rs b/crates/turborepo-lib/src/run/summary/mod.rs index 6e6f697db9a3b..36ab46baef44f 100644 --- a/crates/turborepo-lib/src/run/summary/mod.rs +++ b/crates/turborepo-lib/src/run/summary/mod.rs @@ -37,7 +37,7 @@ use self::{ use super::task_id::TaskId; use crate::{ cli, - cli::DryRunMode, + cli::{DryRunMode, EnvMode}, engine::Engine, opts::RunOpts, run::summary::{ @@ -83,26 +83,6 @@ enum RunType { DryJson, } -// Can't reuse `cli::EnvMode` because the serialization -// is different (lowercase vs uppercase) -#[derive(Clone, Copy, Debug, Serialize)] -#[serde(rename_all = "lowercase")] -pub enum EnvMode { - Infer, - Loose, - Strict, -} - -impl From for EnvMode { - fn from(env_mode: cli::EnvMode) -> Self { - match env_mode { - cli::EnvMode::Infer => EnvMode::Infer, - cli::EnvMode::Loose => EnvMode::Loose, - cli::EnvMode::Strict => EnvMode::Strict, - } - } -} - #[derive(Debug, Serialize)] #[serde(rename_all = "camelCase")] pub struct RunSummary<'a> { @@ -300,7 +280,7 @@ impl RunTracker { run_opts, packages, global_hash_summary, - global_env_mode.into(), + global_env_mode, task_factory, ) .await?; diff --git a/crates/turborepo-lib/src/run/summary/task_factory.rs b/crates/turborepo-lib/src/run/summary/task_factory.rs index 0ee0390dcf9ce..e2bbaeb726a2d 100644 --- a/crates/turborepo-lib/src/run/summary/task_factory.rs +++ b/crates/turborepo-lib/src/run/summary/task_factory.rs @@ -6,7 +6,7 @@ use turborepo_repository::package_graph::{PackageGraph, PackageInfo, PackageName use super::{ execution::TaskExecutionSummary, task::{SharedTaskSummary, TaskEnvVarSummary}, - EnvMode, SinglePackageTaskSummary, TaskSummary, + SinglePackageTaskSummary, TaskSummary, }; use crate::{ cli, @@ -175,22 +175,7 @@ impl<'a> TaskSummaryFactory<'a> { framework, dependencies, dependents, - // TODO: this is some very messy code that appears in a few places - // we should attempt to calculate this once and reuse it - env_mode: match self.global_env_mode { - cli::EnvMode::Infer => { - if task_definition.pass_through_env.is_some() { - EnvMode::Strict - } else { - // If we're in infer mode we have just detected non-usage of strict env - // vars. But our behavior's actual meaning of this - // state is `loose`. - EnvMode::Loose - } - } - cli::EnvMode::Strict => EnvMode::Strict, - cli::EnvMode::Loose => EnvMode::Loose, - }, + env_mode: self.global_env_mode, environment_variables: TaskEnvVarSummary::new( task_definition, env_vars, diff --git a/crates/turborepo-lib/src/task_graph/visitor.rs b/crates/turborepo-lib/src/task_graph/visitor.rs index 64b2b0937a145..7d8956719890c 100644 --- a/crates/turborepo-lib/src/task_graph/visitor.rs +++ b/crates/turborepo-lib/src/task_graph/visitor.rs @@ -15,7 +15,7 @@ use tokio::sync::{mpsc, oneshot}; use tracing::{debug, error, Instrument, Span}; use turbopath::{AbsoluteSystemPath, AbsoluteSystemPathBuf, AnchoredSystemPath}; use turborepo_ci::{Vendor, VendorBehavior}; -use turborepo_env::{EnvironmentVariableMap, ResolvedEnvMode}; +use turborepo_env::EnvironmentVariableMap; use turborepo_repository::{ package_graph::{PackageGraph, PackageName, ROOT_PKG_NAME}, package_manager::PackageManager, @@ -195,18 +195,7 @@ impl<'a> Visitor<'a> { .task_definition(&info) .ok_or(Error::MissingDefinition)?; - let task_env_mode = match self.global_env_mode { - // Task env mode is only independent when global env mode is `infer`. - EnvMode::Infer if task_definition.pass_through_env.is_some() => { - ResolvedEnvMode::Strict - } - // If we're in infer mode we have just detected non-usage of strict env vars. - // But our behavior's actual meaning of this state is `loose`. - EnvMode::Infer => ResolvedEnvMode::Loose, - // Otherwise we just use the global env mode. - EnvMode::Strict => ResolvedEnvMode::Strict, - EnvMode::Loose => ResolvedEnvMode::Loose, - }; + let task_env_mode = self.global_env_mode; package_task_event.track_env_mode(&task_env_mode.to_string()); let dependency_set = engine.dependencies(&info).ok_or(Error::MissingDefinition)?; diff --git a/crates/turborepo-lib/src/task_hash.rs b/crates/turborepo-lib/src/task_hash.rs index 148462483b1c1..1cf7f9908c449 100644 --- a/crates/turborepo-lib/src/task_hash.rs +++ b/crates/turborepo-lib/src/task_hash.rs @@ -12,7 +12,7 @@ use turbopath::{ AbsoluteSystemPath, AnchoredSystemPath, AnchoredSystemPathBuf, RelativeUnixPathBuf, }; use turborepo_cache::CacheHitMetadata; -use turborepo_env::{BySource, DetailedMap, EnvironmentVariableMap, ResolvedEnvMode}; +use turborepo_env::{BySource, DetailedMap, EnvironmentVariableMap}; use turborepo_repository::package_graph::{PackageInfo, PackageName}; use turborepo_scm::SCM; use turborepo_telemetry::events::{ @@ -20,6 +20,7 @@ use turborepo_telemetry::events::{ }; use crate::{ + cli::EnvMode, engine::TaskNode, framework::infer_framework, hash::{FileHashes, LockFilePackages, TaskHashable, TurboHash}, @@ -55,7 +56,7 @@ pub enum Error { impl TaskHashable<'_> { fn calculate_task_hash(mut self) -> String { - if matches!(self.env_mode, ResolvedEnvMode::Loose) { + if matches!(self.env_mode, EnvMode::Loose) { self.pass_through_env = &[]; } @@ -265,7 +266,7 @@ impl<'a> TaskHasher<'a> { &self, task_id: &TaskId<'static>, task_definition: &TaskDefinition, - task_env_mode: ResolvedEnvMode, + task_env_mode: EnvMode, workspace: &PackageInfo, dependency_set: HashSet<&TaskNode>, telemetry: PackageTaskEventBuilder, @@ -448,22 +449,24 @@ impl<'a> TaskHasher<'a> { pub fn env( &self, task_id: &TaskId, - task_env_mode: ResolvedEnvMode, + task_env_mode: EnvMode, task_definition: &TaskDefinition, global_env: &EnvironmentVariableMap, ) -> Result { match task_env_mode { - ResolvedEnvMode::Strict => { + EnvMode::Strict => { let mut pass_through_env = EnvironmentVariableMap::default(); let default_env_var_pass_through_map = self.env_at_execution_start.from_wildcards(&[ "SHELL", // Command Prompt casing of env variables + "APPDATA", "PATH", "SYSTEMROOT", // Powershell casing of env variables "Path", "SystemRoot", + "AppData", ])?; let tracker_env = self .task_hash_tracker @@ -484,7 +487,7 @@ impl<'a> TaskHasher<'a> { Ok(pass_through_env) } - ResolvedEnvMode::Loose => Ok(self.env_at_execution_start.clone()), + EnvMode::Loose => Ok(self.env_at_execution_start.clone()), } } } diff --git a/turborepo-tests/integration/fixtures/lockfile_aware_caching/turbo.json b/turborepo-tests/integration/fixtures/lockfile_aware_caching/turbo.json index 3f16969b87b9a..66ceb3ce7ac14 100644 --- a/turborepo-tests/integration/fixtures/lockfile_aware_caching/turbo.json +++ b/turborepo-tests/integration/fixtures/lockfile_aware_caching/turbo.json @@ -3,7 +3,12 @@ "tasks": { "build": { "outputs": [], - "inputs": ["package.json"] + "env": [ + "COREPACK_ENABLE_DOWNLOAD_PROMPT" + ], + "inputs": [ + "package.json" + ] } } } diff --git a/turborepo-tests/integration/tests/dry-json/monorepo.t b/turborepo-tests/integration/tests/dry-json/monorepo.t index 92deebf228374..18141785b28a6 100644 --- a/turborepo-tests/integration/tests/dry-json/monorepo.t +++ b/turborepo-tests/integration/tests/dry-json/monorepo.t @@ -10,7 +10,7 @@ Setup $ cat tmpjson.log | jq .globalCacheInputs { - "rootKey": "HEY STELLLLLLLAAAAAAAAAAAAA", + "rootKey": "I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here", (esc) "files": { "foo.txt": "eebae5f3ca7b5831e429e947b7d61edd0de69236" }, @@ -49,7 +49,7 @@ Setup "taskId": "my-app#build", "task": "build", "package": "my-app", - "hash": "61394a550211cbe8", + "hash": "ed450f573b231cb7", "inputs": { ".env.local": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "package.json": "1746e0db2361085b5953a6a3beab08c24af5bc08" @@ -91,7 +91,7 @@ Setup }, "expandedOutputs": [], "framework": "", - "envMode": "loose", + "envMode": "strict", "environmentVariables": { "specified": { "env": [], @@ -109,7 +109,7 @@ Setup "taskId": "util#build", "task": "build", "package": "util", - "hash": "d30fc4474534c30e", + "hash": "41b033e352a43533", "inputs": { "package.json": "e755064fd7893809d10fc067bb409c7ae516327f" }, @@ -143,7 +143,7 @@ Setup }, "expandedOutputs": [], "framework": "", - "envMode": "loose", + "envMode": "strict", "environmentVariables": { "specified": { "env": [ diff --git a/turborepo-tests/integration/tests/dry-json/single-package-no-config.t b/turborepo-tests/integration/tests/dry-json/single-package-no-config.t index b86c500fb594c..12e18a1700c96 100644 --- a/turborepo-tests/integration/tests/dry-json/single-package-no-config.t +++ b/turborepo-tests/integration/tests/dry-json/single-package-no-config.t @@ -10,7 +10,7 @@ Setup "turboVersion": "[a-z0-9\.-]+", (re) "monorepo": false, "globalCacheInputs": { - "rootKey": "HEY STELLLLLLLAAAAAAAAAAAAA", + "rootKey": "I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here", (esc) "files": { "package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021", "package.json": "8606ff4b95a5330740d8d9d0948faeada64f1f32" @@ -26,13 +26,13 @@ Setup "passthrough": null } }, - "envMode": "infer", + "envMode": "strict", "frameworkInference": true, "tasks": [ { "taskId": "build", "task": "build", - "hash": "10229b8c4ed48f95", + "hash": "a6da7b8ddbe2bb84", "inputs": { ".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83", "package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021", @@ -66,7 +66,7 @@ Setup }, "expandedOutputs": [], "framework": "", - "envMode": "loose", + "envMode": "strict", "environmentVariables": { "specified": { "env": [], diff --git a/turborepo-tests/integration/tests/dry-json/single-package-with-deps.t b/turborepo-tests/integration/tests/dry-json/single-package-with-deps.t index c870e3c1d525a..ec43c0e5f382e 100644 --- a/turborepo-tests/integration/tests/dry-json/single-package-with-deps.t +++ b/turborepo-tests/integration/tests/dry-json/single-package-with-deps.t @@ -8,7 +8,7 @@ Setup "turboVersion": "[a-z0-9\.-]+", (re) "monorepo": false, "globalCacheInputs": { - "rootKey": "HEY STELLLLLLLAAAAAAAAAAAAA", + "rootKey": "I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here", (esc) "files": { "package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021", "package.json": "8606ff4b95a5330740d8d9d0948faeada64f1f32", @@ -25,13 +25,13 @@ Setup "passthrough": null } }, - "envMode": "infer", + "envMode": "strict", "frameworkInference": true, "tasks": [ { "taskId": "build", "task": "build", - "hash": "fbef1dba65f21ba4", + "hash": "4047a6e65d7dafef", "inputs": { ".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83", "package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021", @@ -72,7 +72,7 @@ Setup }, "expandedOutputs": [], "framework": "", - "envMode": "loose", + "envMode": "strict", "environmentVariables": { "specified": { "env": [], @@ -86,7 +86,7 @@ Setup { "taskId": "test", "task": "test", - "hash": "75187c3aff97a0a8", + "hash": "89d72e7337505ef6", "inputs": { ".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83", "package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021", @@ -125,7 +125,7 @@ Setup }, "expandedOutputs": [], "framework": "", - "envMode": "loose", + "envMode": "strict", "environmentVariables": { "specified": { "env": [], diff --git a/turborepo-tests/integration/tests/dry-json/single-package.t b/turborepo-tests/integration/tests/dry-json/single-package.t index 6f5f6afc63776..dee7da8682f2f 100644 --- a/turborepo-tests/integration/tests/dry-json/single-package.t +++ b/turborepo-tests/integration/tests/dry-json/single-package.t @@ -8,7 +8,7 @@ Setup "turboVersion": "[a-z0-9\.-]+", (re) "monorepo": false, "globalCacheInputs": { - "rootKey": "HEY STELLLLLLLAAAAAAAAAAAAA", + "rootKey": "I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here", (esc) "files": { "package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021", "package.json": "8606ff4b95a5330740d8d9d0948faeada64f1f32", @@ -25,13 +25,13 @@ Setup "passthrough": null } }, - "envMode": "infer", + "envMode": "strict", "frameworkInference": true, "tasks": [ { "taskId": "build", "task": "build", - "hash": "fbef1dba65f21ba4", + "hash": "4047a6e65d7dafef", "inputs": { ".gitignore": "03b541460c1b836f96f9c0a941ceb48e91a9fd83", "package-lock.json": "1c117cce37347befafe3a9cba1b8a609b3600021", @@ -70,7 +70,7 @@ Setup }, "expandedOutputs": [], "framework": "", - "envMode": "loose", + "envMode": "strict", "environmentVariables": { "specified": { "env": [], diff --git a/turborepo-tests/integration/tests/dry-run.t b/turborepo-tests/integration/tests/dry-run.t index ee0e937953398..52f7e8844ace0 100644 --- a/turborepo-tests/integration/tests/dry-run.t +++ b/turborepo-tests/integration/tests/dry-run.t @@ -18,7 +18,7 @@ Setup Global Hash Inputs Global Files = 1 External Dependencies Hash = 459c029558afe716 - Global Cache Key = HEY STELLLLLLLAAAAAAAAAAAAA + Global Cache Key = I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here (esc) Global Env Vars = SOME_ENV_VAR Global Env Vars Values = Inferred Global Env Vars Values = @@ -30,41 +30,41 @@ Setup my-app#build Task = build\s* (re) Package = my-app\s* (re) - Hash = 61394a550211cbe8\s* (re) - Cached \(Local\) = false\s* (re) - Cached \(Remote\) = false\s* (re) - Directory = apps(\/|\\)my-app\s* (re) - Command = echo building\s* (re) - Outputs = apple.json, banana.txt\s* (re) - Log File = apps(\/|\\)my-app(\/|\\)\.turbo(\/|\\)turbo-build\.log\s* (re) - Dependencies =\s* (re) - Dependents =\s* (re) - Inputs Files Considered = 2\s* (re) - Env Vars =\s* (re) - Env Vars Values =\s* (re) - Inferred Env Vars Values =\s* (re) - Passed Through Env Vars =\s* (re) - Passed Through Env Vars Values =\s* (re) + Hash = ed450f573b231cb7 + Cached (Local) = false + Cached (Remote) = false + Directory = apps(\/|\\)my-app (re) + Command = echo building + Outputs = apple.json, banana.txt + Log File = apps(\/|\\)my-app(\/|\\).turbo(\/|\\)turbo-build.log (re) + Dependencies = + Dependents = + Inputs Files Considered = 2 + Env Vars = + Env Vars Values = + Inferred Env Vars Values = + Passed Through Env Vars = + Passed Through Env Vars Values = $ cat tmp-3.txt | grep "util#build" -A 17 util#build Task = build\s* (re) Package = util\s* (re) - Hash = d30fc4474534c30e\s* (re) - Cached \(Local\) = false\s* (re) - Cached \(Remote\) = false\s* (re) - Directory = packages(\/|\\)util\s* (re) - Command = echo building\s* (re) - Outputs =\s* (re) - Log File = packages(\/|\\)util(\/|\\)\.turbo(\/|\\)turbo-build\.log\s* (re) - Dependencies =\s* (re) - Dependents =\s* (re) - Inputs Files Considered = 1\s* (re) - Env Vars = NODE_ENV\s* (re) - Env Vars Values =\s* (re) - Inferred Env Vars Values =\s* (re) - Passed Through Env Vars =\s* (re) - Passed Through Env Vars Values =\s* (re) + Hash = 41b033e352a43533 + Cached (Local) = false + Cached (Remote) = false + Directory = packages(\/|\\)util (re) + Command = echo building + Outputs = + Log File = packages(\/|\\)util(\/|\\).turbo(\/|\\)turbo-build.log (re) + Dependencies = + Dependents = + Inputs Files Considered = 1 + Env Vars = NODE_ENV + Env Vars Values = + Inferred Env Vars Values = + Passed Through Env Vars = + Passed Through Env Vars Values = # Run the task with NODE_ENV set and see it in summary. Use util package so it's just one package $ NODE_ENV=banana ${TURBO} run build --dry --filter=util | grep "Environment Variables" diff --git a/turborepo-tests/integration/tests/edit-turbo-json/task.t b/turborepo-tests/integration/tests/edit-turbo-json/task.t index 36595f3487119..c603b6ab7c641 100644 --- a/turborepo-tests/integration/tests/edit-turbo-json/task.t +++ b/turborepo-tests/integration/tests/edit-turbo-json/task.t @@ -6,15 +6,15 @@ Baseline task hashes $ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}' { "taskId": "another#build", - "hash": "1d62465edaa86a4e" + "hash": "78b732d9478d9b83" } { "taskId": "my-app#build", - "hash": "61394a550211cbe8" + "hash": "ed450f573b231cb7" } { "taskId": "util#build", - "hash": "d30fc4474534c30e" + "hash": "41b033e352a43533" } Change only my-app#build @@ -22,15 +22,15 @@ Change only my-app#build $ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}' { "taskId": "another#build", - "hash": "1d62465edaa86a4e" + "hash": "78b732d9478d9b83" } { "taskId": "my-app#build", - "hash": "1d7be3c12072f23c" + "hash": "eb391860afd5dfdc" } { "taskId": "util#build", - "hash": "d30fc4474534c30e" + "hash": "41b033e352a43533" } Change my-app#build dependsOn @@ -38,15 +38,15 @@ Change my-app#build dependsOn $ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}' { "taskId": "another#build", - "hash": "1d62465edaa86a4e" + "hash": "78b732d9478d9b83" } { "taskId": "my-app#build", - "hash": "ccf2441853eb8930" + "hash": "d71bf2777e3824b7" } { "taskId": "util#build", - "hash": "d30fc4474534c30e" + "hash": "41b033e352a43533" } Non-materially modifying the dep graph does nothing. @@ -54,15 +54,15 @@ Non-materially modifying the dep graph does nothing. $ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}' { "taskId": "another#build", - "hash": "1d62465edaa86a4e" + "hash": "78b732d9478d9b83" } { "taskId": "my-app#build", - "hash": "ccf2441853eb8930" + "hash": "d71bf2777e3824b7" } { "taskId": "util#build", - "hash": "d30fc4474534c30e" + "hash": "41b033e352a43533" } @@ -71,13 +71,13 @@ Change util#build impacts itself and my-app $ ${TURBO} build --dry=json | jq -r '.tasks | sort_by(.taskId)[] | {taskId, hash}' { "taskId": "another#build", - "hash": "1d62465edaa86a4e" + "hash": "78b732d9478d9b83" } { "taskId": "my-app#build", - "hash": "71c6f7392eeebdc1" + "hash": "550479ca3246010d" } { "taskId": "util#build", - "hash": "73e9903a46832238" + "hash": "d29ee2ca954217ef" } diff --git a/turborepo-tests/integration/tests/global-deps.t b/turborepo-tests/integration/tests/global-deps.t index 9bc1ddf35dbfb..bcda1fe66e165 100644 --- a/turborepo-tests/integration/tests/global-deps.t +++ b/turborepo-tests/integration/tests/global-deps.t @@ -6,7 +6,7 @@ Run a build \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache miss, executing beb8106f9ebe42f9 + my-app:build: cache miss, executing c3e42e9c9ba94cab Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -18,7 +18,7 @@ Run a build \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache miss, executing ab899db87390362e + my-app:build: cache miss, executing ded57f1945fa82be Tasks: 1 successful, 1 total Cached: 0 cached, 1 total diff --git a/turborepo-tests/integration/tests/global-env.t b/turborepo-tests/integration/tests/global-env.t index 16cb1d8506560..89c0aebe90d26 100644 --- a/turborepo-tests/integration/tests/global-env.t +++ b/turborepo-tests/integration/tests/global-env.t @@ -8,7 +8,7 @@ Setup \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache miss, executing d30fc4474534c30e + util:build: cache miss, executing 41b033e352a43533 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -19,7 +19,7 @@ Setup \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache hit, suppressing logs d30fc4474534c30e + util:build: cache hit, suppressing logs 41b033e352a43533 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -30,7 +30,7 @@ Setup \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache miss, executing b67982f6f3a6f305 + util:build: cache miss, executing 8b36aff0371ed688 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -41,7 +41,7 @@ Setup \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache hit, suppressing logs d30fc4474534c30e + util:build: cache hit, suppressing logs 41b033e352a43533 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -52,7 +52,7 @@ Setup \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache miss, executing 83ec044d1376f47b + util:build: cache miss, executing b1d5cc042db323ed Tasks: 1 successful, 1 total Cached: 0 cached, 1 total diff --git a/turborepo-tests/integration/tests/no-args.t b/turborepo-tests/integration/tests/no-args.t index b58c3f46a4a22..5800aa1128069 100644 --- a/turborepo-tests/integration/tests/no-args.t +++ b/turborepo-tests/integration/tests/no-args.t @@ -77,7 +77,7 @@ Make sure exit code is 2 when no args are passed --global-deps Specify glob of global filesystem dependencies to be hashed. Useful for .env and files --env-mode [] - Environment variable mode. Use "loose" to pass the entire existing environment. Use "strict" to use an allowlist specified in turbo.json. Use "infer" to defer to existence of "passThroughEnv" or "globalPassThroughEnv" in turbo.json. (default infer) [default: infer] [possible values: infer, loose, strict] + Environment variable mode. Use "loose" to pass the entire existing environment. Use "strict" to use an allowlist specified in turbo.json [default: strict] [possible values: loose, strict] -F, --filter Use the given selector to specify package(s) to act as entry points. The syntax mirrors pnpm's syntax, and additional documentation and examples can be found in turbo's documentation https://turbo.build/repo/docs/reference/command-line-reference/run#--filter --ignore diff --git a/turborepo-tests/integration/tests/persistent-dependencies/6-topological-unimplemented.t b/turborepo-tests/integration/tests/persistent-dependencies/6-topological-unimplemented.t index c3f2bd26beb4a..a817607a25b2a 100644 --- a/turborepo-tests/integration/tests/persistent-dependencies/6-topological-unimplemented.t +++ b/turborepo-tests/integration/tests/persistent-dependencies/6-topological-unimplemented.t @@ -17,7 +17,7 @@ \xe2\x80\xa2 Packages in scope: app-a, pkg-a (esc) \xe2\x80\xa2 Running dev in 2 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - app-a:dev: cache miss, executing 123f031c97be8067 + app-a:dev: cache miss, executing 80e89b04d985ccbc app-a:dev: app-a:dev: > dev app-a:dev: > echo dev-app-a diff --git a/turborepo-tests/integration/tests/pkg-inference.t b/turborepo-tests/integration/tests/pkg-inference.t index 400bfe7bb9ed9..40832ad8e5b53 100644 --- a/turborepo-tests/integration/tests/pkg-inference.t +++ b/turborepo-tests/integration/tests/pkg-inference.t @@ -6,7 +6,7 @@ Setup \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache miss, executing d30fc4474534c30e + util:build: cache miss, executing 41b033e352a43533 util:build: util:build: > build util:build: > echo building diff --git a/turborepo-tests/integration/tests/prune/composable-config.t b/turborepo-tests/integration/tests/prune/composable-config.t index 6b178e90603c8..a67674d6f91ec 100644 --- a/turborepo-tests/integration/tests/prune/composable-config.t +++ b/turborepo-tests/integration/tests/prune/composable-config.t @@ -11,7 +11,7 @@ Make sure that the internal util package is part of the prune output \xe2\x80\xa2 Packages in scope: docs, shared, util (esc) \xe2\x80\xa2 Running new-task in 3 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - docs:new-task: cache miss, executing 021bcd5005a1c133 + docs:new-task: cache miss, executing 7e5957e9303be3e2 docs:new-task: docs:new-task: > docs@ new-task .*out(\/|\\)apps(\/|\\)docs (re) docs:new-task: > echo building diff --git a/turborepo-tests/integration/tests/run-caching/excluded-inputs/excluded-inputs.t b/turborepo-tests/integration/tests/run-caching/excluded-inputs/excluded-inputs.t index d3ea122601a75..383f15d136b98 100644 --- a/turborepo-tests/integration/tests/run-caching/excluded-inputs/excluded-inputs.t +++ b/turborepo-tests/integration/tests/run-caching/excluded-inputs/excluded-inputs.t @@ -9,7 +9,7 @@ Running build for my-app succeeds \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache miss, executing 493990a10ad3129e + my-app:build: cache miss, executing 87e69a7e18f039da my-app:build: my-app:build: > build my-app:build: > echo building @@ -26,7 +26,7 @@ Update exluded file and try again \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache hit, replaying logs 493990a10ad3129e + my-app:build: cache hit, replaying logs 87e69a7e18f039da my-app:build: my-app:build: > build my-app:build: > echo building diff --git a/turborepo-tests/integration/tests/run-logging/errors-only.t b/turborepo-tests/integration/tests/run-logging/errors-only.t index 5095f4a5f8ad7..08bb0f85c1c17 100644 --- a/turborepo-tests/integration/tests/run-logging/errors-only.t +++ b/turborepo-tests/integration/tests/run-logging/errors-only.t @@ -37,7 +37,7 @@ Setup \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running builderror in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - app-a:builderror: cache miss, executing a434651ebfd5e29b + app-a:builderror: cache miss, executing 30379ede8c4fd252 app-a:builderror: app-a:builderror: > builderror app-a:builderror: > echo error-builderror-app-a && exit 1 @@ -67,7 +67,7 @@ Setup \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running builderror2 in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - app-a:builderror2: cache miss, executing 37f4f3e6503bb5d2 + app-a:builderror2: cache miss, executing 29c91fda7cb5f934 app-a:builderror2: app-a:builderror2: > builderror2 app-a:builderror2: > echo error-builderror2-app-a && exit 1 diff --git a/turborepo-tests/integration/tests/run-logging/log-order-github.t b/turborepo-tests/integration/tests/run-logging/log-order-github.t index f0c1c4e3cd891..cff26d8894c0f 100644 --- a/turborepo-tests/integration/tests/run-logging/log-order-github.t +++ b/turborepo-tests/integration/tests/run-logging/log-order-github.t @@ -9,7 +9,7 @@ because otherwise prysk interprets them as multiline commands \xe2\x80\xa2 Running build in 2 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) ::group::my-app:build - cache bypass, force executing ee861306d76acfba + cache bypass, force executing 15b8c7d115cd7403 >\sbuild (re) \>\secho building && sleep 1 && echo done (re) @@ -18,7 +18,7 @@ because otherwise prysk interprets them as multiline commands done ::endgroup:: ::group::util:build - cache bypass, force executing d2c8604a72ebce55 + cache bypass, force executing a5ccc37ed8b7b2df >\sbuild (re) \>\ssleep 0.5 && echo building && sleep 1 && echo completed (re) @@ -37,7 +37,7 @@ because otherwise prysk interprets them as multiline commands \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) ::group::util:build - util:build: cache bypass, force executing d2c8604a72ebce55 + util:build: cache bypass, force executing a5ccc37ed8b7b2df util:build: util:build: > build util:build: > sleep 0.5 && echo building && sleep 1 && echo completed @@ -57,7 +57,7 @@ Verify that errors are grouped properly \xe2\x80\xa2 Running fail in 2 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) \x1b[;31mutil:fail\x1b[;0m (esc) - cache miss, executing c2f80a6e64adbc38 + cache miss, executing 778f804f3d3d75cd \> fail (re) \> echo failing; exit 1 (re) diff --git a/turborepo-tests/integration/tests/run-logging/log-prefix.t b/turborepo-tests/integration/tests/run-logging/log-prefix.t index 3827e08262c1c..be851ec2cca03 100644 --- a/turborepo-tests/integration/tests/run-logging/log-prefix.t +++ b/turborepo-tests/integration/tests/run-logging/log-prefix.t @@ -6,7 +6,7 @@ Setup \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - cache miss, executing 91de4eaf400f908e + cache miss, executing e0140bf4d9fbed7a \> build (re) \> echo build-app-a (re) @@ -30,7 +30,7 @@ Setup \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - cache hit, replaying logs 91de4eaf400f908e + cache hit, replaying logs e0140bf4d9fbed7a \> build (re) \> echo build-app-a (re) @@ -46,7 +46,7 @@ Setup \xe2\x80\xa2 Packages in scope: app-a (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - app-a:build: cache hit, replaying logs 91de4eaf400f908e + app-a:build: cache hit, replaying logs e0140bf4d9fbed7a app-a:build: app-a:build: > build app-a:build: > echo build-app-a diff --git a/turborepo-tests/integration/tests/run-logging/verbosity.t b/turborepo-tests/integration/tests/run-logging/verbosity.t index dc707d56b99c5..f3c06b1c893f0 100644 --- a/turborepo-tests/integration/tests/run-logging/verbosity.t +++ b/turborepo-tests/integration/tests/run-logging/verbosity.t @@ -6,7 +6,7 @@ Verbosity level 1 \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache bypass, force executing d30fc4474534c30e + util:build: cache bypass, force executing 41b033e352a43533 util:build: util:build: > build util:build: > echo building @@ -21,7 +21,7 @@ Verbosity level 1 \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache bypass, force executing d30fc4474534c30e + util:build: cache bypass, force executing 41b033e352a43533 util:build: util:build: > build util:build: > echo building diff --git a/turborepo-tests/integration/tests/run-summary/discovery.t b/turborepo-tests/integration/tests/run-summary/discovery.t index 0b844394ffe46..afbed1f105701 100644 --- a/turborepo-tests/integration/tests/run-summary/discovery.t +++ b/turborepo-tests/integration/tests/run-summary/discovery.t @@ -6,7 +6,7 @@ Setup \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache miss, executing 61394a550211cbe8 + my-app:build: cache miss, executing ed450f573b231cb7 my-app:build: my-app:build: > build my-app:build: > echo building diff --git a/turborepo-tests/integration/tests/run-summary/error.t b/turborepo-tests/integration/tests/run-summary/error.t index d46b23566cf85..e37cee9198af1 100644 --- a/turborepo-tests/integration/tests/run-summary/error.t +++ b/turborepo-tests/integration/tests/run-summary/error.t @@ -32,7 +32,7 @@ Validate that we got a full task summary for the failed task with an error in .e "taskId": "my-app#maybefails", "task": "maybefails", "package": "my-app", - "hash": "8f681db4d5b591ee", + "hash": "5708afa4de2b80ea", "inputs": { ".env.local": "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", "package.json": "1746e0db2361085b5953a6a3beab08c24af5bc08" @@ -65,7 +65,7 @@ Validate that we got a full task summary for the failed task with an error in .e }, "expandedOutputs": [], "framework": "", - "envMode": "loose", + "envMode": "strict", "environmentVariables": { "specified": { "env": [], diff --git a/turborepo-tests/integration/tests/run-summary/strict-env.t b/turborepo-tests/integration/tests/run-summary/strict-env.t index bb4cba1621bce..9a2522b8889ad 100644 --- a/turborepo-tests/integration/tests/run-summary/strict-env.t +++ b/turborepo-tests/integration/tests/run-summary/strict-env.t @@ -13,9 +13,9 @@ Run as `infer` $ rm -rf .turbo/runs $ ${TURBO} run build --summarize > /dev/null $ cat .turbo/runs/*.json | jq -r '.envMode' - infer + strict $ cat .turbo/runs/*.json | jq -r '.tasks[0].envMode' - loose + strict $ cat .turbo/runs/*.json | jq -r '.tasks[0].environmentVariables | {passthrough, globalPassthrough}' { "passthrough": null, @@ -141,7 +141,7 @@ Task passthrough specified empty array + infer $ ${TESTDIR}/../../../helpers/replace_turbo_json.sh $(pwd) "strict_env_vars/task_pt-empty.json" $ ${TURBO} run build --summarize > /dev/null $ cat .turbo/runs/*.json | jq -r '.envMode' - infer + strict $ cat .turbo/runs/*.json | jq -r '.tasks[0].envMode' strict $ cat .turbo/runs/*.json | jq -r '.tasks[0].environmentVariables | {passthrough, globalPassthrough}' @@ -155,7 +155,7 @@ Task passthrough specified value + infer $ ${TESTDIR}/../../../helpers/replace_turbo_json.sh $(pwd) "strict_env_vars/task_pt.json" $ ${TURBO} run build --summarize > /dev/null $ cat .turbo/runs/*.json | jq -r '.envMode' - infer + strict $ cat .turbo/runs/*.json | jq -r '.tasks[0].envMode' strict $ cat .turbo/runs/*.json | jq -r '.tasks[0].environmentVariables | {passthrough, globalPassthrough}' diff --git a/turborepo-tests/integration/tests/run/continue.t b/turborepo-tests/integration/tests/run/continue.t index 34c62b72dffb9..90df09f311b62 100644 --- a/turborepo-tests/integration/tests/run/continue.t +++ b/turborepo-tests/integration/tests/run/continue.t @@ -5,7 +5,7 @@ Run without --continue \xe2\x80\xa2 Packages in scope: my-app, other-app, some-lib (esc) \xe2\x80\xa2 Running build in 3 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - some-lib:build: cache miss, executing 223a3af003231594 + some-lib:build: cache miss, executing 6a27a9769c374e7b some-lib:build: some-lib:build: > build some-lib:build: > exit 2 @@ -31,7 +31,7 @@ Run without --continue, and with only errors. \xe2\x80\xa2 Packages in scope: my-app, other-app, some-lib (esc) \xe2\x80\xa2 Running build in 3 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - some-lib:build: cache miss, executing 223a3af003231594 + some-lib:build: cache miss, executing 6a27a9769c374e7b some-lib:build: some-lib:build: > build some-lib:build: > exit 2 @@ -56,7 +56,7 @@ Run with --continue \xe2\x80\xa2 Packages in scope: my-app, other-app, some-lib (esc) \xe2\x80\xa2 Running build in 3 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - some-lib:build: cache miss, executing 223a3af003231594 + some-lib:build: cache miss, executing 6a27a9769c374e7b some-lib:build: some-lib:build: > build some-lib:build: > exit 2 @@ -66,7 +66,7 @@ Run with --continue some-lib:build: npm ERR! in workspace: some-lib some-lib:build: npm ERR! at location: (.*)(\/|\\)apps(\/|\\)some-lib (re) some-lib:build: command finished with error, but continuing... - other-app:build: cache miss, executing 30cb4d864c805a98 + other-app:build: cache miss, executing 39fcb4fcad874e05 other-app:build: other-app:build: > build other-app:build: > exit 3 @@ -86,4 +86,3 @@ Run with --continue ERROR run failed: command exited (1) [1] - diff --git a/turborepo-tests/integration/tests/run/force.t b/turborepo-tests/integration/tests/run/force.t index e25303443593d..664a91a2eb18e 100644 --- a/turborepo-tests/integration/tests/run/force.t +++ b/turborepo-tests/integration/tests/run/force.t @@ -24,7 +24,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache miss, executing 61394a550211cbe8 + my-app:build: cache miss, executing ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -36,7 +36,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache bypass, force executing 61394a550211cbe8 + my-app:build: cache bypass, force executing ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -47,7 +47,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache bypass, force executing 61394a550211cbe8 + my-app:build: cache bypass, force executing ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -58,7 +58,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache hit, suppressing logs 61394a550211cbe8 + my-app:build: cache hit, suppressing logs ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -69,7 +69,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache bypass, force executing 61394a550211cbe8 + my-app:build: cache bypass, force executing ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -81,7 +81,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache hit, suppressing logs 61394a550211cbe8 + my-app:build: cache hit, suppressing logs ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -92,7 +92,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache bypass, force executing 61394a550211cbe8 + my-app:build: cache bypass, force executing ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -103,7 +103,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache hit, suppressing logs 61394a550211cbe8 + my-app:build: cache hit, suppressing logs ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -114,7 +114,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache bypass, force executing 61394a550211cbe8 + my-app:build: cache bypass, force executing ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -126,7 +126,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache hit, suppressing logs 61394a550211cbe8 + my-app:build: cache hit, suppressing logs ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -137,7 +137,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache bypass, force executing 61394a550211cbe8 + my-app:build: cache bypass, force executing ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -148,7 +148,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache hit, suppressing logs 61394a550211cbe8 + my-app:build: cache hit, suppressing logs ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -159,7 +159,7 @@ baseline to generate cache \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:build: cache bypass, force executing 61394a550211cbe8 + my-app:build: cache bypass, force executing ed450f573b231cb7 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total diff --git a/turborepo-tests/integration/tests/run/gitignored-inputs.t b/turborepo-tests/integration/tests/run/gitignored-inputs.t index e595ce14f604b..347cd648c796d 100644 --- a/turborepo-tests/integration/tests/run/gitignored-inputs.t +++ b/turborepo-tests/integration/tests/run/gitignored-inputs.t @@ -16,7 +16,7 @@ Some helper functions to parse the summary file Just run the util package, it's simpler $ ${TURBO} run build --filter=util --output-logs=hash-only --summarize | grep "util:build: cache" - util:build: cache miss, executing 546eb92dc465adf3 + util:build: cache miss, executing ae2e852267f3b5c9 $ FIRST=$(/bin/ls .turbo/runs/*.json | head -n1) $ echo $(getSummaryTaskId $FIRST "util#build") | jq -r '.inputs."internal.txt"' @@ -30,7 +30,7 @@ Change the content of internal.txt Hash does not change, because it is gitignored $ ${TURBO} run build --filter=util --output-logs=hash-only --summarize | grep "util:build: cache" - util:build: cache miss, executing 4e08438130b53119 + util:build: cache miss, executing 117a08af942aa435 The internal.txt hash should be different from the one before $ SECOND=$(/bin/ls .turbo/runs/*.json | head -n1) diff --git a/turborepo-tests/integration/tests/run/globs.t b/turborepo-tests/integration/tests/run/globs.t index 0c7afe65e357c..7f3e956ed73c3 100644 --- a/turborepo-tests/integration/tests/run/globs.t +++ b/turborepo-tests/integration/tests/run/globs.t @@ -5,7 +5,7 @@ Verify that input directory change causes cache miss \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache miss, executing feb6c37d2db8dda5 + util:build: cache miss, executing de4d32c1d7909fd6 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -16,7 +16,7 @@ Verify that input directory change causes cache miss \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache miss, executing 5ca84fbcfb192408 + util:build: cache miss, executing 9dc5d552226836c8 Tasks: 1 successful, 1 total Cached: 0 cached, 1 total @@ -29,7 +29,7 @@ Verify that input directory change causes cache miss \xe2\x80\xa2 Packages in scope: util (esc) \xe2\x80\xa2 Running build in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache hit, suppressing logs 5ca84fbcfb192408 + util:build: cache hit, suppressing logs 9dc5d552226836c8 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total diff --git a/turborepo-tests/integration/tests/run/one-script-error.t b/turborepo-tests/integration/tests/run/one-script-error.t index f60066a898217..d26cc4b18b034 100644 --- a/turborepo-tests/integration/tests/run/one-script-error.t +++ b/turborepo-tests/integration/tests/run/one-script-error.t @@ -7,13 +7,13 @@ Note that npm reports any failed script as exit code 1, even though we "exit 2" \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running error in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:okay: cache miss, executing 90bba097751d6fc5 + my-app:okay: cache miss, executing 730881de77077bd7 my-app:okay: my-app:okay: > okay my-app:okay: > echo working my-app:okay: my-app:okay: working - my-app:error: cache miss, executing 6da0be6250fdaee0 + my-app:error: cache miss, executing 6bcb083c31200821 my-app:error: my-app:error: > error my-app:error: > exit 2 @@ -38,13 +38,13 @@ Make sure error isn't cached \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running error in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:okay: cache hit, replaying logs 90bba097751d6fc5 + my-app:okay: cache hit, replaying logs 730881de77077bd7 my-app:okay: my-app:okay: > okay my-app:okay: > echo working my-app:okay: my-app:okay: working - my-app:error: cache miss, executing 6da0be6250fdaee0 + my-app:error: cache miss, executing 6bcb083c31200821 my-app:error: my-app:error: > error my-app:error: > exit 2 @@ -69,13 +69,13 @@ Make sure error code isn't swallowed with continue \xe2\x80\xa2 Packages in scope: my-app (esc) \xe2\x80\xa2 Running okay2 in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - my-app:okay: cache hit, replaying logs 90bba097751d6fc5 + my-app:okay: cache hit, replaying logs 730881de77077bd7 my-app:okay: my-app:okay: > okay my-app:okay: > echo working my-app:okay: my-app:okay: working - my-app:error: cache miss, executing 6da0be6250fdaee0 + my-app:error: cache miss, executing 6bcb083c31200821 my-app:error: my-app:error: > error my-app:error: > exit 2 @@ -85,7 +85,7 @@ Make sure error code isn't swallowed with continue my-app:error: npm ERR! in workspace: my-app my-app:error: npm ERR! at location: .*apps(\/|\\)my-app (re) my-app:error: command finished with error, but continuing... - my-app:okay2: cache miss, executing 9a07ba5887a54500 + my-app:okay2: cache miss, executing c9df11d745bab324 my-app:okay2: my-app:okay2: > okay2 my-app:okay2: > echo working diff --git a/turborepo-tests/integration/tests/run/single-package/dry-run.t b/turborepo-tests/integration/tests/run/single-package/dry-run.t index 02850cfbe7600..1958631040661 100644 --- a/turborepo-tests/integration/tests/run/single-package/dry-run.t +++ b/turborepo-tests/integration/tests/run/single-package/dry-run.t @@ -7,7 +7,7 @@ Check Global Hash Inputs Global Files = 3 External Dependencies Hash = - Global Cache Key = HEY STELLLLLLLAAAAAAAAAAAAA + Global Cache Key = I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here (esc) Global Env Vars = Global Env Vars Values = Inferred Global Env Vars Values = @@ -17,15 +17,15 @@ Check Tasks to Run build Task = build\s* (re) - Hash = fbef1dba65f21ba4 - Cached \(Local\) = false\s* (re) - Cached \(Remote\) = false\s* (re) - Command = echo building > foo.txt\s* (re) - Outputs = foo.txt\s* (re) - Log File = .turbo(\/|\\)turbo-build.log\s* (re) - Dependencies =\s* (re) - Dependents =\s* (re) - Inputs Files Considered = 5\s* (re) + Hash = 4047a6e65d7dafef + Cached (Local) = false + Cached (Remote) = false + Command = echo building > foo.txt + Outputs = foo.txt + Log File = .turbo(\/|\\)turbo-build.log (re) + Dependencies = + Dependents = + Inputs Files Considered = 5 Env Vars = Env Vars Values = Inferred Env Vars Values = diff --git a/turborepo-tests/integration/tests/run/single-package/no-config.t b/turborepo-tests/integration/tests/run/single-package/no-config.t index 1a56f4e13a16d..f8173533271e4 100644 --- a/turborepo-tests/integration/tests/run/single-package/no-config.t +++ b/turborepo-tests/integration/tests/run/single-package/no-config.t @@ -9,7 +9,7 @@ Check Global Hash Inputs Global Files = 2\s* (re) External Dependencies Hash =\s* (re) - Global Cache Key = HEY STELLLLLLLAAAAAAAAAAAAA\s* (re) + Global Cache Key = I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here (esc) Global Env Vars = Global Env Vars Values = Inferred Global Env Vars Values = @@ -19,15 +19,15 @@ Check Tasks to Run build Task = build\s* (re) - Hash = 10229b8c4ed48f95 - Cached \(Local\) = false\s* (re) - Cached \(Remote\) = false\s* (re) - Command = echo building > foo.txt\s* (re) - Outputs =\s* (re) - Log File = .turbo(\/|\\)turbo-build.log\s* (re) - Dependencies =\s* (re) - Dependents =\s* (re) - Inputs Files Considered = 4\s* (re) + Hash = a6da7b8ddbe2bb84 + Cached (Local) = false + Cached (Remote) = false + Command = echo building > foo.txt + Outputs = + Log File = .turbo(\/|\\)turbo-build.log (re) + Dependencies = + Dependents = + Inputs Files Considered = 4 Env Vars = Env Vars Values = Inferred Env Vars Values = @@ -50,7 +50,7 @@ Run real once $ ${TURBO} run build \xe2\x80\xa2 Running build (esc) \xe2\x80\xa2 Remote caching disabled (esc) - build: cache bypass, force executing 10229b8c4ed48f95 + build: cache bypass, force executing a6da7b8ddbe2bb84 build: build: > build build: > echo building > foo.txt @@ -64,7 +64,7 @@ Run a second time, verify no caching because there is no config $ ${TURBO} run build \xe2\x80\xa2 Running build (esc) \xe2\x80\xa2 Remote caching disabled (esc) - build: cache bypass, force executing 10229b8c4ed48f95 + build: cache bypass, force executing a6da7b8ddbe2bb84 build: build: > build build: > echo building > foo.txt diff --git a/turborepo-tests/integration/tests/run/single-package/run-yarn.t b/turborepo-tests/integration/tests/run/single-package/run-yarn.t index bc4af3e15694e..31ab878c2b0c4 100644 --- a/turborepo-tests/integration/tests/run/single-package/run-yarn.t +++ b/turborepo-tests/integration/tests/run/single-package/run-yarn.t @@ -5,7 +5,7 @@ Check $ ${TURBO} run build \xe2\x80\xa2 Running build (esc) \xe2\x80\xa2 Remote caching disabled (esc) - build: cache miss, executing 178267ee3c25fe0a + build: cache miss, executing ed245ad45c9be274 build: yarn run v1.22.17 build: warning package.json: No license field build: $ echo building > foo.txt @@ -18,7 +18,7 @@ Check $ ${TURBO} run build \xe2\x80\xa2 Running build (esc) \xe2\x80\xa2 Remote caching disabled (esc) - build: cache hit, replaying logs 178267ee3c25fe0a + build: cache hit, replaying logs ed245ad45c9be274 build: yarn run v1.22.17 build: warning package.json: No license field build: $ echo building > foo.txt diff --git a/turborepo-tests/integration/tests/run/single-package/run.t b/turborepo-tests/integration/tests/run/single-package/run.t index ebf39bd0b54b1..f83c8605f253e 100644 --- a/turborepo-tests/integration/tests/run/single-package/run.t +++ b/turborepo-tests/integration/tests/run/single-package/run.t @@ -5,7 +5,7 @@ Check $ ${TURBO} run build \xe2\x80\xa2 Running build (esc) \xe2\x80\xa2 Remote caching disabled (esc) - build: cache miss, executing fbef1dba65f21ba4 + build: cache miss, executing 4047a6e65d7dafef build: build: > build build: > echo building > foo.txt @@ -22,7 +22,7 @@ Run a second time, verify caching works because there is a config $ ${TURBO} run build \xe2\x80\xa2 Running build (esc) \xe2\x80\xa2 Remote caching disabled (esc) - build: cache hit, replaying logs fbef1dba65f21ba4 + build: cache hit, replaying logs 4047a6e65d7dafef build: build: > build build: > echo building > foo.txt diff --git a/turborepo-tests/integration/tests/run/single-package/with-deps-dry-run.t b/turborepo-tests/integration/tests/run/single-package/with-deps-dry-run.t index 15bdc0f2448ca..4c8ba3e3ae2e3 100644 --- a/turborepo-tests/integration/tests/run/single-package/with-deps-dry-run.t +++ b/turborepo-tests/integration/tests/run/single-package/with-deps-dry-run.t @@ -7,7 +7,7 @@ Check Global Hash Inputs Global Files = 3 External Dependencies Hash = - Global Cache Key = HEY STELLLLLLLAAAAAAAAAAAAA + Global Cache Key = I can\xe2\x80\x99t see ya, but I know you\xe2\x80\x99re here (esc) Global Env Vars = Global Env Vars Values = Inferred Global Env Vars Values = @@ -17,15 +17,15 @@ Check Tasks to Run build Task = build\s* (re) - Hash = fbef1dba65f21ba4 - Cached \(Local\) = false\s* (re) - Cached \(Remote\) = false\s* (re) - Command = echo building > foo.txt\s* (re) - Outputs = foo.txt\s* (re) - Log File = .turbo(\/|\\)turbo-build.log\s* (re) - Dependencies =\s* (re) - Dependents = test\s* (re) - Inputs Files Considered = 5\s* (re) + Hash = 4047a6e65d7dafef + Cached (Local) = false + Cached (Remote) = false + Command = echo building > foo.txt + Outputs = foo.txt + Log File = .turbo(\/|\\)turbo-build.log (re) + Dependencies = + Dependents = test + Inputs Files Considered = 5 Env Vars = Env Vars Values = Inferred Env Vars Values = @@ -35,15 +35,15 @@ Check Framework = test Task = test\s* (re) - Hash = 75187c3aff97a0a8 - Cached \(Local\) = false\s* (re) - Cached \(Remote\) = false\s* (re) - Command = cat foo.txt\s* (re) - Outputs =\s* (re) - Log File = .turbo(\/|\\)turbo-test.log\s* (re) - Dependencies = build\s* (re) - Dependents =\s* (re) - Inputs Files Considered = 5\s* (re) + Hash = 89d72e7337505ef6 + Cached (Local) = false + Cached (Remote) = false + Command = cat foo.txt + Outputs = + Log File = .turbo(\/|\\)turbo-test.log (re) + Dependencies = build + Dependents = + Inputs Files Considered = 5 Env Vars = Env Vars Values = Inferred Env Vars Values = diff --git a/turborepo-tests/integration/tests/run/single-package/with-deps-run.t b/turborepo-tests/integration/tests/run/single-package/with-deps-run.t index 703c009d86899..9617532f902f5 100644 --- a/turborepo-tests/integration/tests/run/single-package/with-deps-run.t +++ b/turborepo-tests/integration/tests/run/single-package/with-deps-run.t @@ -5,12 +5,12 @@ Check $ ${TURBO} run test \xe2\x80\xa2 Running test (esc) \xe2\x80\xa2 Remote caching disabled (esc) - build: cache miss, executing fbef1dba65f21ba4 + build: cache miss, executing 4047a6e65d7dafef build: build: > build build: > echo building > foo.txt build: - test: cache miss, executing 75187c3aff97a0a8 + test: cache miss, executing 89d72e7337505ef6 test: test: > test test: > cat foo.txt @@ -21,22 +21,16 @@ Check Cached: 0 cached, 2 total Time:\s*[\.0-9]+m?s (re) -<<<<<<< HEAD -======= ->>>>>>> b668d5abb3 (chore: remove task dotEnv field) -<<<<<<< HEAD -======= ->>>>>>> b668d5abb3 (chore: remove task dotEnv field) Run a second time, verify caching works because there is a config $ ${TURBO} run test \xe2\x80\xa2 Running test (esc) \xe2\x80\xa2 Remote caching disabled (esc) - build: cache hit, replaying logs fbef1dba65f21ba4 + build: cache hit, replaying logs 4047a6e65d7dafef build: build: > build build: > echo building > foo.txt build: - test: cache hit, replaying logs 75187c3aff97a0a8 + test: cache hit, replaying logs 89d72e7337505ef6 test: test: > test test: > cat foo.txt @@ -47,26 +41,18 @@ Run a second time, verify caching works because there is a config Cached: 2 cached, 2 total Time:\s*[\.0-9]+m?s >>> FULL TURBO (re) -<<<<<<< HEAD -======= ->>>>>>> b668d5abb3 (chore: remove task dotEnv field) -<<<<<<< HEAD -======= ->>>>>>> b668d5abb3 (chore: remove task dotEnv field) Run with --output-logs=hash-only $ ${TURBO} run test --output-logs=hash-only \xe2\x80\xa2 Running test (esc) \xe2\x80\xa2 Remote caching disabled (esc) - build: cache hit, suppressing logs fbef1dba65f21ba4 - test: cache hit, suppressing logs 75187c3aff97a0a8 + build: cache hit, suppressing logs 4047a6e65d7dafef + test: cache hit, suppressing logs 89d72e7337505ef6 Tasks: 2 successful, 2 total Cached: 2 cached, 2 total Time:\s*[\.0-9]+m?s >>> FULL TURBO (re) -<<<<<<< HEAD -======= ->>>>>>> b668d5abb3 (chore: remove task dotEnv field) + Run with --output-logs=errors-only $ ${TURBO} run test --output-logs=errors-only \xe2\x80\xa2 Running test (esc) diff --git a/turborepo-tests/integration/tests/strict-env-vars/usage-infer.t b/turborepo-tests/integration/tests/strict-env-vars/usage-infer.t deleted file mode 100644 index f9dcb5180115f..0000000000000 --- a/turborepo-tests/integration/tests/strict-env-vars/usage-infer.t +++ /dev/null @@ -1,44 +0,0 @@ -Setup - $ . ${TESTDIR}/../../../helpers/setup_integration_test.sh strict_env_vars - -With --env-mode=infer - -Set the env vars - $ export GLOBAL_VAR_PT=higlobalpt - $ export GLOBAL_VAR_DEP=higlobaldep - $ export LOCAL_VAR_PT=hilocalpt - $ export LOCAL_VAR_DEP=hilocaldep - $ export OTHER_VAR=hiother - -Set the output file with the right path separator for the OS - $ if [[ "$OSTYPE" == "msys" ]]; then OUTPUT="apps\\my-app\\out.txt"; else OUTPUT="apps/my-app/out.txt"; fi - -Conditionally set these vars if they aren't already there for the purpose of the test. -The test doesn't care about the values, it just checks that the var is available to the task -so we just have to make sure the parent process has them set. In Github CI, for example SHELL -isn't already set. - $ export SYSTEMROOT="${SYSTEMROOT:=hisysroot}" - $ export PATH="${PATH:=hipath}" - -Inferred mode as loose because no pass through configs, all vars are available - $ ${TURBO} build -vv --env-mode=infer > /dev/null 2>&1 - $ cat "$OUTPUT" - globalpt: 'higlobalpt', localpt: 'hilocalpt', globaldep: 'higlobaldep', localdep: 'hilocaldep', other: 'hiother', sysroot set: 'yes', path set: 'yes' - -Inferred mode as strict, because global pass through config, no vars available - $ ${TESTDIR}/../../../helpers/replace_turbo_json.sh $(pwd) "strict_env_vars/global_pt-empty.json" - $ ${TURBO} build -vv --env-mode=infer > /dev/null 2>&1 - $ cat "$OUTPUT" - globalpt: '', localpt: '', globaldep: '', localdep: '', other: '', sysroot set: 'yes', path set: 'yes' - -Inferred mode as strict, because task pass through config, no vars available - $ ${TESTDIR}/../../../helpers/replace_turbo_json.sh $(pwd) "strict_env_vars/task_pt-empty.json" - $ ${TURBO} build -vv --env-mode=infer > /dev/null 2>&1 - $ cat "$OUTPUT" - globalpt: '', localpt: '', globaldep: '', localdep: '', other: '', sysroot set: 'yes', path set: 'yes' - -Inferred mode as strict, with declared deps and pass through. all declared available, other is not available - $ ${TESTDIR}/../../../helpers/replace_turbo_json.sh $(pwd) "strict_env_vars/all.json" - $ ${TURBO} build -vv --env-mode=infer > /dev/null 2>&1 - $ cat "$OUTPUT" - globalpt: 'higlobalpt', localpt: 'hilocalpt', globaldep: 'higlobaldep', localdep: 'hilocaldep', other: '', sysroot set: 'yes', path set: 'yes' diff --git a/turborepo-tests/integration/tests/task-dependencies/overwriting.t b/turborepo-tests/integration/tests/task-dependencies/overwriting.t index 9210b6f2467ea..d22aac7241c1f 100644 --- a/turborepo-tests/integration/tests/task-dependencies/overwriting.t +++ b/turborepo-tests/integration/tests/task-dependencies/overwriting.t @@ -11,7 +11,7 @@ Test # workspace-a#generate ran $ cat tmp.log | grep "workspace-a:generate" - workspace-a:generate: cache miss, executing 8e1618d20f6303dc + workspace-a:generate: cache miss, executing a7a2aa3909d7b0d8 workspace-a:generate: workspace-a:generate: > generate workspace-a:generate: > echo generate-workspace-a @@ -19,7 +19,7 @@ Test workspace-a:generate: generate-workspace-a workspace-a#build ran $ cat tmp.log | grep "workspace-a:build" - workspace-a:build: cache miss, executing 50df012517e672e6 + workspace-a:build: cache miss, executing 9ccc135d65c4a495 workspace-a:build: workspace-a:build: > build workspace-a:build: > echo build-workspace-a @@ -32,7 +32,7 @@ workspace-b#generate DID NOT run workspace-b#build ran $ cat tmp.log | grep "workspace-b:build" - workspace-b:build: cache miss, executing a4ecaf3902039f0c + workspace-b:build: cache miss, executing 02c3fac1077fc71c workspace-b:build: workspace-b:build: > build workspace-b:build: > echo build-workspace-b diff --git a/turborepo-tests/integration/tests/task-dependencies/root-worksapce.t b/turborepo-tests/integration/tests/task-dependencies/root-workspace.t similarity index 86% rename from turborepo-tests/integration/tests/task-dependencies/root-worksapce.t rename to turborepo-tests/integration/tests/task-dependencies/root-workspace.t index 2e51d19dfb12f..0e1817ce91b0f 100644 --- a/turborepo-tests/integration/tests/task-dependencies/root-worksapce.t +++ b/turborepo-tests/integration/tests/task-dependencies/root-workspace.t @@ -5,13 +5,13 @@ This tests asserts that root tasks can depend on workspace#task \xe2\x80\xa2 Packages in scope: //, lib-a (esc) \xe2\x80\xa2 Running mytask in 2 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - lib-a:build: cache miss, executing cd724fed7c588f9d + lib-a:build: cache miss, executing 113b85e31603db1c lib-a:build: lib-a:build: > build lib-a:build: > echo build-lib-a lib-a:build: lib-a:build: build-lib-a - //:mytask: cache miss, executing 4998aef8c3bccdea + //:mytask: cache miss, executing 79bfd20384932bbb //:mytask: //:mytask: > mytask //:mytask: > echo root-mytask diff --git a/turborepo-tests/integration/tests/task-dependencies/topological.t b/turborepo-tests/integration/tests/task-dependencies/topological.t index 8451102db5de1..07cd1a4c406c8 100644 --- a/turborepo-tests/integration/tests/task-dependencies/topological.t +++ b/turborepo-tests/integration/tests/task-dependencies/topological.t @@ -6,13 +6,13 @@ Check my-app#build output \xe2\x80\xa2 Packages in scope: //, my-app, util (esc) \xe2\x80\xa2 Running build in 3 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - util:build: cache miss, executing c6b545f723eb2015 + util:build: cache miss, executing fc4462f9a33623c2 util:build: util:build: > build util:build: > echo building util:build: util:build: building - my-app:build: cache miss, executing b9d1448560566404 + my-app:build: cache miss, executing bd5855867ade972a my-app:build: my-app:build: > build my-app:build: > echo building diff --git a/turborepo-tests/integration/tests/turbo-help.t b/turborepo-tests/integration/tests/turbo-help.t index 4cf84423c213a..7e3cc2014cfa5 100644 --- a/turborepo-tests/integration/tests/turbo-help.t +++ b/turborepo-tests/integration/tests/turbo-help.t @@ -77,7 +77,7 @@ Test help flag --global-deps Specify glob of global filesystem dependencies to be hashed. Useful for .env and files --env-mode [] - Environment variable mode. Use "loose" to pass the entire existing environment. Use "strict" to use an allowlist specified in turbo.json. Use "infer" to defer to existence of "passThroughEnv" or "globalPassThroughEnv" in turbo.json. (default infer) [default: infer] [possible values: infer, loose, strict] + Environment variable mode. Use "loose" to pass the entire existing environment. Use "strict" to use an allowlist specified in turbo.json [default: strict] [possible values: loose, strict] -F, --filter Use the given selector to specify package(s) to act as entry points. The syntax mirrors pnpm's syntax, and additional documentation and examples can be found in turbo's documentation https://turbo.build/repo/docs/reference/command-line-reference/run#--filter --ignore @@ -173,7 +173,7 @@ Test help flag --global-deps Specify glob of global filesystem dependencies to be hashed. Useful for .env and files --env-mode [] - Environment variable mode. Use "loose" to pass the entire existing environment. Use "strict" to use an allowlist specified in turbo.json. Use "infer" to defer to existence of "passThroughEnv" or "globalPassThroughEnv" in turbo.json. (default infer) [default: infer] [possible values: infer, loose, strict] + Environment variable mode. Use "loose" to pass the entire existing environment. Use "strict" to use an allowlist specified in turbo.json [default: strict] [possible values: loose, strict] -F, --filter Use the given selector to specify package(s) to act as entry points. The syntax mirrors pnpm's syntax, and additional documentation and examples can be found in turbo's documentation https://turbo.build/repo/docs/reference/command-line-reference/run#--filter --ignore diff --git a/turborepo-tests/integration/tests/workspace-configs/add-keys.t b/turborepo-tests/integration/tests/workspace-configs/add-keys.t index ae2f3c336f6de..c02b733667fe3 100644 --- a/turborepo-tests/integration/tests/workspace-configs/add-keys.t +++ b/turborepo-tests/integration/tests/workspace-configs/add-keys.t @@ -14,13 +14,13 @@ Setup \xe2\x80\xa2 Packages in scope: add-keys (esc) \xe2\x80\xa2 Running add-keys-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - add-keys:add-keys-underlying-task: cache miss, executing 7b8d0e4150f525f1 + add-keys:add-keys-underlying-task: cache miss, executing b1b44ef21c97573a add-keys:add-keys-underlying-task: add-keys:add-keys-underlying-task: > add-keys-underlying-task add-keys:add-keys-underlying-task: > echo running-add-keys-underlying-task add-keys:add-keys-underlying-task: add-keys:add-keys-underlying-task: running-add-keys-underlying-task - add-keys:add-keys-task: cache miss, executing d67e79a3677e5e90 + add-keys:add-keys-task: cache miss, executing 900c42a3c99fcb70 add-keys:add-keys-task: add-keys:add-keys-task: > add-keys-task add-keys:add-keys-task: > echo running-add-keys-task > out/foo.min.txt @@ -30,6 +30,12 @@ Setup Cached: 0 cached, 2 total Time:\s*[\.0-9]+m?s (re) +<<<<<<< HEAD +======= +>>>>>>> 37c3c596f1 (chore: update integration tests) +<<<<<<< HEAD +======= +>>>>>>> 37c3c596f1 (chore: update integration tests) $ HASH=$(cat tmp.log | grep -E "add-keys:add-keys-task.* executing .*" | awk '{print $5}') $ tar -tf $TARGET_DIR/.turbo/cache/$HASH.tar.zst; apps/add-keys/.turbo/turbo-add-keys-task.log @@ -42,13 +48,13 @@ Setup \xe2\x80\xa2 Packages in scope: add-keys (esc) \xe2\x80\xa2 Running add-keys-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - add-keys:add-keys-underlying-task: cache hit, replaying logs 7b8d0e4150f525f1 + add-keys:add-keys-underlying-task: cache hit, replaying logs b1b44ef21c97573a add-keys:add-keys-underlying-task: add-keys:add-keys-underlying-task: > add-keys-underlying-task add-keys:add-keys-underlying-task: > echo running-add-keys-underlying-task add-keys:add-keys-underlying-task: add-keys:add-keys-underlying-task: running-add-keys-underlying-task - add-keys:add-keys-task: cache hit, suppressing logs d67e79a3677e5e90 + add-keys:add-keys-task: cache hit, suppressing logs 900c42a3c99fcb70 Tasks: 2 successful, 2 total Cached: 2 cached, 2 total @@ -60,13 +66,13 @@ Setup \xe2\x80\xa2 Packages in scope: add-keys (esc) \xe2\x80\xa2 Running add-keys-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - add-keys:add-keys-underlying-task: cache miss, executing 4486bc731e70d399 + add-keys:add-keys-underlying-task: cache miss, executing 8e33b91a6ca8fcd4 add-keys:add-keys-underlying-task: add-keys:add-keys-underlying-task: > add-keys-underlying-task add-keys:add-keys-underlying-task: > echo running-add-keys-underlying-task add-keys:add-keys-underlying-task: add-keys:add-keys-underlying-task: running-add-keys-underlying-task - add-keys:add-keys-task: cache miss, executing a0611f6cbc16dae2 + add-keys:add-keys-task: cache miss, executing c99ca18c10380fb8 add-keys:add-keys-task: add-keys:add-keys-task: > add-keys-task add-keys:add-keys-task: > echo running-add-keys-task > out/foo.min.txt @@ -81,13 +87,13 @@ Setup \xe2\x80\xa2 Packages in scope: add-keys (esc) \xe2\x80\xa2 Running add-keys-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - add-keys:add-keys-underlying-task: cache hit, replaying logs 4486bc731e70d399 + add-keys:add-keys-underlying-task: cache hit, replaying logs 8e33b91a6ca8fcd4 add-keys:add-keys-underlying-task: add-keys:add-keys-underlying-task: > add-keys-underlying-task add-keys:add-keys-underlying-task: > echo running-add-keys-underlying-task add-keys:add-keys-underlying-task: add-keys:add-keys-underlying-task: running-add-keys-underlying-task - add-keys:add-keys-task: cache miss, executing 4e213910a9f5424a + add-keys:add-keys-task: cache miss, executing de9692b5d6414208 add-keys:add-keys-task: add-keys:add-keys-task: > add-keys-task add-keys:add-keys-task: > echo running-add-keys-task > out/foo.min.txt diff --git a/turborepo-tests/integration/tests/workspace-configs/add-tasks.t b/turborepo-tests/integration/tests/workspace-configs/add-tasks.t index 547e12746cdb6..00b9c9840e405 100644 --- a/turborepo-tests/integration/tests/workspace-configs/add-tasks.t +++ b/turborepo-tests/integration/tests/workspace-configs/add-tasks.t @@ -5,7 +5,7 @@ Setup \xe2\x80\xa2 Packages in scope: add-tasks (esc) \xe2\x80\xa2 Running added-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - add-tasks:added-task: cache miss, executing d820864cd1c0cf4f + add-tasks:added-task: cache miss, executing f0fda27365e9306b add-tasks:added-task: add-tasks:added-task: > added-task add-tasks:added-task: > echo running-added-task > out/foo.min.txt diff --git a/turborepo-tests/integration/tests/workspace-configs/cache.t b/turborepo-tests/integration/tests/workspace-configs/cache.t index fab62bfffbe6d..c77c19c52199f 100644 --- a/turborepo-tests/integration/tests/workspace-configs/cache.t +++ b/turborepo-tests/integration/tests/workspace-configs/cache.t @@ -13,7 +13,7 @@ This test covers: \xe2\x80\xa2 Packages in scope: cached (esc) \xe2\x80\xa2 Running cached-task-1 in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - cached:cached-task-1: cache miss, executing 21deabfcd122b4f1 + cached:cached-task-1: cache miss, executing aa4b3344d5e068e0 cached:cached-task-1: cached:cached-task-1: > cached-task-1 cached:cached-task-1: > echo cached-task-1 > out/foo.min.txt @@ -38,7 +38,7 @@ This test covers: \xe2\x80\xa2 Packages in scope: cached (esc) \xe2\x80\xa2 Running cached-task-2 in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - cached:cached-task-2: cache bypass, force executing 16a7b4fae5625489 + cached:cached-task-2: cache bypass, force executing 4a1c738de315d340 cached:cached-task-2: cached:cached-task-2: > cached-task-2 cached:cached-task-2: > echo cached-task-2 > out/foo.min.txt @@ -60,7 +60,7 @@ no `cache` config in root, cache:false in workspace \xe2\x80\xa2 Packages in scope: cached (esc) \xe2\x80\xa2 Running cached-task-3 in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - cached:cached-task-3: cache bypass, force executing c532469fc19ac3f9 + cached:cached-task-3: cache bypass, force executing 53e08724d086baa4 cached:cached-task-3: cached:cached-task-3: > cached-task-3 cached:cached-task-3: > echo cached-task-3 > out/foo.min.txt @@ -84,7 +84,7 @@ we already have a workspace that doesn't have a config \xe2\x80\xa2 Packages in scope: missing-workspace-config (esc) \xe2\x80\xa2 Running cached-task-4 in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - missing-workspace-config:cached-task-4: cache bypass, force executing 3ad36069ee49ca14 + missing-workspace-config:cached-task-4: cache bypass, force executing b18fb0016b2ba646 missing-workspace-config:cached-task-4: missing-workspace-config:cached-task-4: > cached-task-4 missing-workspace-config:cached-task-4: > echo cached-task-4 > out/foo.min.txt diff --git a/turborepo-tests/integration/tests/workspace-configs/config-change.t b/turborepo-tests/integration/tests/workspace-configs/config-change.t index e0ed42238b38c..157c11803181b 100644 --- a/turborepo-tests/integration/tests/workspace-configs/config-change.t +++ b/turborepo-tests/integration/tests/workspace-configs/config-change.t @@ -3,13 +3,13 @@ Setup # 1. First run, check the hash $ ${TURBO} run config-change-task --filter=config-change --dry=json | jq .tasks[0].hash - "e0471b5eddce1aab" + "20a4384e7b8a0cdd" 2. Run again and assert task hash stays the same $ ${TURBO} run config-change-task --filter=config-change --dry=json | jq .tasks[0].hash - "e0471b5eddce1aab" + "20a4384e7b8a0cdd" 3. Change turbo.json and assert that hash changes $ cp $TARGET_DIR/apps/config-change/turbo-changed.json $TARGET_DIR/apps/config-change/turbo.json $ ${TURBO} run config-change-task --filter=config-change --dry=json | jq .tasks[0].hash - "41e50d2dc738d0f8" + "95ceb90873e75c02" diff --git a/turborepo-tests/integration/tests/workspace-configs/cross-workspace.t b/turborepo-tests/integration/tests/workspace-configs/cross-workspace.t index 74d8da593536d..094ae62b38636 100644 --- a/turborepo-tests/integration/tests/workspace-configs/cross-workspace.t +++ b/turborepo-tests/integration/tests/workspace-configs/cross-workspace.t @@ -4,13 +4,13 @@ Setup \xe2\x80\xa2 Packages in scope: cross-workspace (esc) \xe2\x80\xa2 Running cross-workspace-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - blank-pkg:cross-workspace-underlying-task: cache miss, executing 6002174173495dbf + blank-pkg:cross-workspace-underlying-task: cache miss, executing 48f39663b18e630a blank-pkg:cross-workspace-underlying-task: blank-pkg:cross-workspace-underlying-task: > cross-workspace-underlying-task blank-pkg:cross-workspace-underlying-task: > echo cross-workspace-underlying-task from blank-pkg blank-pkg:cross-workspace-underlying-task: blank-pkg:cross-workspace-underlying-task: cross-workspace-underlying-task from blank-pkg - cross-workspace:cross-workspace-task: cache miss, executing 6dd8e4d2ceda14c4 + cross-workspace:cross-workspace-task: cache miss, executing a78fae9c6961965b cross-workspace:cross-workspace-task: cross-workspace:cross-workspace-task: > cross-workspace-task cross-workspace:cross-workspace-task: > echo cross-workspace-task diff --git a/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config-deps.t b/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config-deps.t index c95961f140954..ba202ca405684 100644 --- a/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config-deps.t +++ b/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config-deps.t @@ -15,14 +15,14 @@ Setup \xe2\x80\xa2 Remote caching disabled (esc) $ cat tmp.log | grep "missing-workspace-config:missing-workspace-config-task-with-deps" - missing-workspace-config:missing-workspace-config-task-with-deps: cache miss, executing e3c2ce9dfb0e09f0 + missing-workspace-config:missing-workspace-config-task-with-deps: cache miss, executing 41733826c1f80f57 missing-workspace-config:missing-workspace-config-task-with-deps: missing-workspace-config:missing-workspace-config-task-with-deps: > missing-workspace-config-task-with-deps missing-workspace-config:missing-workspace-config-task-with-deps: > echo running-missing-workspace-config-task-with-deps > out/foo.min.txt missing-workspace-config:missing-workspace-config-task-with-deps: $ cat tmp.log | grep "missing-workspace-config:missing-workspace-config-underlying-task" - missing-workspace-config:missing-workspace-config-underlying-task: cache miss, executing 1bf9a4ec81009b46 + missing-workspace-config:missing-workspace-config-underlying-task: cache miss, executing 2cfd313fc94ee8b6 missing-workspace-config:missing-workspace-config-underlying-task: missing-workspace-config:missing-workspace-config-underlying-task: > missing-workspace-config-underlying-task missing-workspace-config:missing-workspace-config-underlying-task: > echo running-missing-workspace-config-underlying-task @@ -30,7 +30,7 @@ Setup missing-workspace-config:missing-workspace-config-underlying-task: running-missing-workspace-config-underlying-task $ cat tmp.log | grep "blank-pkg:missing-workspace-config-underlying-topo-task" - blank-pkg:missing-workspace-config-underlying-topo-task: cache miss, executing 47524700b306888a + blank-pkg:missing-workspace-config-underlying-topo-task: cache miss, executing acee90d9ccd6adb5 blank-pkg:missing-workspace-config-underlying-topo-task: blank-pkg:missing-workspace-config-underlying-topo-task: > missing-workspace-config-underlying-topo-task blank-pkg:missing-workspace-config-underlying-topo-task: > echo missing-workspace-config-underlying-topo-task from blank-pkg diff --git a/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config.t b/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config.t index 5b823f3f38c75..5069d93f08b6e 100644 --- a/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config.t +++ b/turborepo-tests/integration/tests/workspace-configs/missing-workspace-config.t @@ -11,7 +11,7 @@ Setup \xe2\x80\xa2 Packages in scope: missing-workspace-config (esc) \xe2\x80\xa2 Running missing-workspace-config-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - missing-workspace-config:missing-workspace-config-task: cache miss, executing be6ec3d0f0471849 + missing-workspace-config:missing-workspace-config-task: cache miss, executing 9033f2738d479c41 missing-workspace-config:missing-workspace-config-task: missing-workspace-config:missing-workspace-config-task: > missing-workspace-config-task missing-workspace-config:missing-workspace-config-task: > echo running-missing-workspace-config-task > out/foo.min.txt @@ -33,7 +33,7 @@ Setup \xe2\x80\xa2 Packages in scope: missing-workspace-config (esc) \xe2\x80\xa2 Running missing-workspace-config-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - missing-workspace-config:missing-workspace-config-task: cache hit, suppressing logs be6ec3d0f0471849 + missing-workspace-config:missing-workspace-config-task: cache hit, suppressing logs 9033f2738d479c41 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -45,7 +45,7 @@ Setup \xe2\x80\xa2 Packages in scope: missing-workspace-config (esc) \xe2\x80\xa2 Running missing-workspace-config-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - missing-workspace-config:missing-workspace-config-task: cache miss, executing b39bb84af921847c + missing-workspace-config:missing-workspace-config-task: cache miss, executing 089b7a4154e2247c missing-workspace-config:missing-workspace-config-task: missing-workspace-config:missing-workspace-config-task: > missing-workspace-config-task missing-workspace-config:missing-workspace-config-task: > echo running-missing-workspace-config-task > out/foo.min.txt @@ -62,7 +62,7 @@ Setup \xe2\x80\xa2 Packages in scope: missing-workspace-config (esc) \xe2\x80\xa2 Running missing-workspace-config-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - missing-workspace-config:missing-workspace-config-task: cache hit, suppressing logs b39bb84af921847c + missing-workspace-config:missing-workspace-config-task: cache hit, suppressing logs 089b7a4154e2247c Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -73,7 +73,7 @@ Setup \xe2\x80\xa2 Packages in scope: missing-workspace-config (esc) \xe2\x80\xa2 Running missing-workspace-config-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - missing-workspace-config:missing-workspace-config-task: cache miss, executing 4f8cbf0317430e42 + missing-workspace-config:missing-workspace-config-task: cache miss, executing b0dd739b01bd5c0f missing-workspace-config:missing-workspace-config-task: missing-workspace-config:missing-workspace-config-task: > missing-workspace-config-task missing-workspace-config:missing-workspace-config-task: > echo running-missing-workspace-config-task > out/foo.min.txt @@ -89,7 +89,7 @@ Setup \xe2\x80\xa2 Packages in scope: missing-workspace-config (esc) \xe2\x80\xa2 Running cached-task-4 in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - missing-workspace-config:cached-task-4: cache bypass, force executing c33b6bab007f82f7 + missing-workspace-config:cached-task-4: cache bypass, force executing 68b4a1bc2bbfe5d8 missing-workspace-config:cached-task-4: missing-workspace-config:cached-task-4: > cached-task-4 missing-workspace-config:cached-task-4: > echo cached-task-4 > out/foo.min.txt diff --git a/turborepo-tests/integration/tests/workspace-configs/omit-keys-deps.t b/turborepo-tests/integration/tests/workspace-configs/omit-keys-deps.t index cca6abfbf5732..e6250b669be04 100644 --- a/turborepo-tests/integration/tests/workspace-configs/omit-keys-deps.t +++ b/turborepo-tests/integration/tests/workspace-configs/omit-keys-deps.t @@ -15,14 +15,14 @@ Setup \xe2\x80\xa2 Running omit-keys-task-with-deps in 1 packages (esc) $ cat tmp.log | grep "omit-keys:omit-keys-task-with-deps" - omit-keys:omit-keys-task-with-deps: cache miss, executing ba0de8c23e1f20f2 + omit-keys:omit-keys-task-with-deps: cache miss, executing bdb68ffb10d89fca omit-keys:omit-keys-task-with-deps: omit-keys:omit-keys-task-with-deps: > omit-keys-task-with-deps omit-keys:omit-keys-task-with-deps: > echo running-omit-keys-task-with-deps > out/foo.min.txt omit-keys:omit-keys-task-with-deps: $ cat tmp.log | grep "omit-keys:omit-keys-underlying-task" - omit-keys:omit-keys-underlying-task: cache miss, executing 885430a20f708165 + omit-keys:omit-keys-underlying-task: cache miss, executing f61e962fa122bb3b omit-keys:omit-keys-underlying-task: omit-keys:omit-keys-underlying-task: > omit-keys-underlying-task omit-keys:omit-keys-underlying-task: > echo running-omit-keys-underlying-task @@ -30,7 +30,7 @@ Setup omit-keys:omit-keys-underlying-task: running-omit-keys-underlying-task $ cat tmp.log | grep "blank-pkg:omit-keys-underlying-topo-task" - blank-pkg:omit-keys-underlying-topo-task: cache miss, executing 1e075d887938cdcb + blank-pkg:omit-keys-underlying-topo-task: cache miss, executing 7e41e6d75d5fcaa1 blank-pkg:omit-keys-underlying-topo-task: blank-pkg:omit-keys-underlying-topo-task: > omit-keys-underlying-topo-task blank-pkg:omit-keys-underlying-topo-task: > echo omit-keys-underlying-topo-task from blank-pkg diff --git a/turborepo-tests/integration/tests/workspace-configs/omit-keys.t b/turborepo-tests/integration/tests/workspace-configs/omit-keys.t index 8d7a76f760d24..03677fedba919 100644 --- a/turborepo-tests/integration/tests/workspace-configs/omit-keys.t +++ b/turborepo-tests/integration/tests/workspace-configs/omit-keys.t @@ -14,7 +14,7 @@ Setup \xe2\x80\xa2 Packages in scope: omit-keys (esc) \xe2\x80\xa2 Running omit-keys-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - omit-keys:omit-keys-task: cache miss, executing 28d0677a62c0aa7a + omit-keys:omit-keys-task: cache miss, executing 7720930a8a9e9832 omit-keys:omit-keys-task: omit-keys:omit-keys-task: > omit-keys-task omit-keys:omit-keys-task: > echo running-omit-keys-task > out/foo.min.txt @@ -36,7 +36,7 @@ Setup \xe2\x80\xa2 Packages in scope: omit-keys (esc) \xe2\x80\xa2 Running omit-keys-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - omit-keys:omit-keys-task: cache hit, suppressing logs 28d0677a62c0aa7a + omit-keys:omit-keys-task: cache hit, suppressing logs 7720930a8a9e9832 Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -48,7 +48,7 @@ Setup \xe2\x80\xa2 Packages in scope: omit-keys (esc) \xe2\x80\xa2 Running omit-keys-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - omit-keys:omit-keys-task: cache miss, executing c3e410b01cce8dd2 + omit-keys:omit-keys-task: cache miss, executing 3a68017c72f94e2f omit-keys:omit-keys-task: omit-keys:omit-keys-task: > omit-keys-task omit-keys:omit-keys-task: > echo running-omit-keys-task > out/foo.min.txt @@ -65,7 +65,7 @@ Setup \xe2\x80\xa2 Packages in scope: omit-keys (esc) \xe2\x80\xa2 Running omit-keys-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - omit-keys:omit-keys-task: cache hit, suppressing logs c3e410b01cce8dd2 + omit-keys:omit-keys-task: cache hit, suppressing logs 3a68017c72f94e2f Tasks: 1 successful, 1 total Cached: 1 cached, 1 total @@ -76,7 +76,7 @@ Setup \xe2\x80\xa2 Packages in scope: omit-keys (esc) \xe2\x80\xa2 Running omit-keys-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - omit-keys:omit-keys-task: cache miss, executing 382ecc9fe3be2294 + omit-keys:omit-keys-task: cache miss, executing f0b1da3da9634589 omit-keys:omit-keys-task: omit-keys:omit-keys-task: > omit-keys-task omit-keys:omit-keys-task: > echo running-omit-keys-task > out/foo.min.txt diff --git a/turborepo-tests/integration/tests/workspace-configs/override-values-deps.t b/turborepo-tests/integration/tests/workspace-configs/override-values-deps.t index 1bf9e1e0cd7a5..b798ff8cdb17d 100644 --- a/turborepo-tests/integration/tests/workspace-configs/override-values-deps.t +++ b/turborepo-tests/integration/tests/workspace-configs/override-values-deps.t @@ -12,7 +12,7 @@ Setup \xe2\x80\xa2 Packages in scope: override-values (esc) \xe2\x80\xa2 Running override-values-task-with-deps in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - override-values:override-values-task-with-deps: cache miss, executing 81fe3129c1a9147c + override-values:override-values-task-with-deps: cache miss, executing 00e16c342cfa94ec override-values:override-values-task-with-deps: override-values:override-values-task-with-deps: > override-values-task-with-deps override-values:override-values-task-with-deps: > echo running-override-values-task-with-deps > out/foo.min.txt diff --git a/turborepo-tests/integration/tests/workspace-configs/override-values.t b/turborepo-tests/integration/tests/workspace-configs/override-values.t index 127efbc94198d..8cbdaa60b0c31 100644 --- a/turborepo-tests/integration/tests/workspace-configs/override-values.t +++ b/turborepo-tests/integration/tests/workspace-configs/override-values.t @@ -11,7 +11,7 @@ Setup \xe2\x80\xa2 Packages in scope: override-values (esc) \xe2\x80\xa2 Running override-values-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - override-values:override-values-task: cache miss, executing 6c14afaa74bffc4a + override-values:override-values-task: cache miss, executing ead3f3edd38fc1fd override-values:override-values-task: override-values:override-values-task: > override-values-task override-values:override-values-task: > echo running-override-values-task > lib/bar.min.txt @@ -21,6 +21,9 @@ Setup Cached: 0 cached, 1 total Time:\s*[\.0-9]+m?s (re) +<<<<<<< HEAD +======= +>>>>>>> 37c3c596f1 (chore: update integration tests) $ HASH=$(cat tmp.log | grep -E "override-values:override-values-task.* executing .*" | awk '{print $5}') $ tar -tf $TARGET_DIR/.turbo/cache/$HASH.tar.zst; apps/override-values/.turbo/turbo-override-values-task.log @@ -33,7 +36,7 @@ Setup \xe2\x80\xa2 Packages in scope: override-values (esc) \xe2\x80\xa2 Running override-values-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - override-values:override-values-task: cache hit, replaying logs 6c14afaa74bffc4a + override-values:override-values-task: cache hit, replaying logs ead3f3edd38fc1fd override-values:override-values-task: override-values:override-values-task: > override-values-task override-values:override-values-task: > echo running-override-values-task > lib/bar.min.txt @@ -43,13 +46,16 @@ Setup Cached: 1 cached, 1 total Time:\s*[\.0-9]+m?s >>> FULL TURBO (re) +<<<<<<< HEAD +======= +>>>>>>> 37c3c596f1 (chore: update integration tests) 3. Change input file and assert cache miss $ echo "more text" >> $TARGET_DIR/apps/override-values/src/bar.txt $ ${TURBO} run override-values-task --filter=override-values \xe2\x80\xa2 Packages in scope: override-values (esc) \xe2\x80\xa2 Running override-values-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - override-values:override-values-task: cache miss, executing 044ce2c43ae740f8 + override-values:override-values-task: cache miss, executing 8b11eb45f619dba5 override-values:override-values-task: override-values:override-values-task: > override-values-task override-values:override-values-task: > echo running-override-values-task > lib/bar.min.txt @@ -65,7 +71,7 @@ Setup \xe2\x80\xa2 Packages in scope: override-values (esc) \xe2\x80\xa2 Running override-values-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - override-values:override-values-task: cache hit, replaying logs 044ce2c43ae740f8 + override-values:override-values-task: cache hit, replaying logs 8b11eb45f619dba5 override-values:override-values-task: override-values:override-values-task: > override-values-task override-values:override-values-task: > echo running-override-values-task > lib/bar.min.txt @@ -80,7 +86,7 @@ Setup \xe2\x80\xa2 Packages in scope: override-values (esc) \xe2\x80\xa2 Running override-values-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - override-values:override-values-task: cache miss, executing 961e6285b43ebb88 + override-values:override-values-task: cache miss, executing 50fae434a20ed36e override-values:override-values-task: override-values:override-values-task: > override-values-task override-values:override-values-task: > echo running-override-values-task > lib/bar.min.txt @@ -95,7 +101,7 @@ Setup \xe2\x80\xa2 Packages in scope: override-values (esc) \xe2\x80\xa2 Running override-values-task in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - override-values:override-values-task: cache hit, replaying logs 961e6285b43ebb88 + override-values:override-values-task: cache hit, replaying logs 50fae434a20ed36e override-values:override-values-task: override-values:override-values-task: > override-values-task override-values:override-values-task: > echo running-override-values-task > lib/bar.min.txt diff --git a/turborepo-tests/integration/tests/workspace-configs/persistent.t b/turborepo-tests/integration/tests/workspace-configs/persistent.t index 20e7c49c182fb..81054f8ec24fb 100644 --- a/turborepo-tests/integration/tests/workspace-configs/persistent.t +++ b/turborepo-tests/integration/tests/workspace-configs/persistent.t @@ -30,13 +30,13 @@ This test covers: \xe2\x80\xa2 Packages in scope: persistent (esc) \xe2\x80\xa2 Running persistent-task-2-parent in 1 packages (esc) \xe2\x80\xa2 Remote caching disabled (esc) - persistent:persistent-task-2: cache miss, executing 0053dfd3e40fd7e9 + persistent:persistent-task-2: cache miss, executing 73c5debabd593f2f persistent:persistent-task-2: persistent:persistent-task-2: > persistent-task-2 persistent:persistent-task-2: > echo persistent-task-2 persistent:persistent-task-2: persistent:persistent-task-2: persistent-task-2 - persistent:persistent-task-2-parent: cache miss, executing d91647fc86c1a419 + persistent:persistent-task-2-parent: cache miss, executing 4e085f900c5be969 persistent:persistent-task-2-parent: persistent:persistent-task-2-parent: > persistent-task-2-parent persistent:persistent-task-2-parent: > echo persistent-task-2-parent