diff --git a/Cargo.lock b/Cargo.lock index 8d914ad24..d9496e796 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1018,17 +1018,6 @@ dependencies = [ "objc2", ] -[[package]] -name = "displaydoc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.6", -] - [[package]] name = "document-features" version = "0.2.12" @@ -1232,15 +1221,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - [[package]] name = "fsevent-sys" version = "4.1.0" @@ -1731,89 +1711,6 @@ dependencies = [ "typenum", ] -[[package]] -name = "icu_collections" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" -dependencies = [ - "displaydoc", - "potential_utf", - "utf8_iter", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec 1.15.1", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" - -[[package]] -name = "icu_properties" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" - -[[package]] -name = "icu_provider" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - [[package]] name = "id-arena" version = "2.3.0" @@ -1826,27 +1723,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec 1.15.1", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - [[package]] name = "indenter" version = "0.3.4" @@ -2140,12 +2016,6 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" -[[package]] -name = "litemap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" - [[package]] name = "litrs" version = "1.0.0" @@ -2770,12 +2640,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "132dca9b868d927b35b5dd728167b2dee150eb1ad686008fc71ccb298b776fca" -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - [[package]] name = "pest" version = "2.8.6" @@ -2981,15 +2845,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "potential_utf" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" -dependencies = [ - "zerovec", -] - [[package]] name = "powerfmt" version = "0.2.0" @@ -3739,12 +3594,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "stable_deref_trait" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" - [[package]] name = "stackalloc" version = "1.2.1" @@ -3850,28 +3699,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "syn" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.6", -] - [[package]] name = "syscalls" version = "0.8.1" @@ -4076,16 +3903,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" -[[package]] -name = "tinystr" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" -dependencies = [ - "displaydoc", - "zerovec", -] - [[package]] name = "tokio" version = "1.49.0" @@ -4365,19 +4182,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39abd59bf32521c7f2301b52d05a6a2c975b6003521cbd0c6dc1582f0a22104" -[[package]] -name = "url" -version = "2.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", - "serde_derive", -] - [[package]] name = "utf8-chars" version = "3.0.6" @@ -4387,12 +4191,6 @@ dependencies = [ "arrayvec", ] -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - [[package]] name = "utf8parse" version = "0.2.2" @@ -4660,7 +4458,6 @@ dependencies = [ "tokio", "toml", "tracing", - "url", "vt", "vt_bin", "vt_casefold", @@ -5293,12 +5090,6 @@ dependencies = [ "wasmparser", ] -[[package]] -name = "writeable" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" - [[package]] name = "xattr" version = "1.6.1" @@ -5321,29 +5112,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" -[[package]] -name = "yoke" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33811428bee40dbceb6d545e95754741d17a6aef9a4849f0fd62e2ba4f412a78" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.6", - "synstructure", -] - [[package]] name = "zerocopy" version = "0.8.39" @@ -5364,60 +5132,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "zerofrom" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.6", - "synstructure", -] - -[[package]] -name = "zerotrie" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" -dependencies = [ - "proc-macro2", - "quote", - "syn 3.0.6", -] - [[package]] name = "zmij" version = "1.0.20" diff --git a/Cargo.toml b/Cargo.toml index c3e02155a..9a5647905 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,7 +57,6 @@ bytemuck = "1.23.0" cargo-platform = "=0.3.2" cc = "1.2.39" clap = "4.5.53" -url = "2.5.8" color-eyre = "0.6.5" compact_str = "0.9.0" constcat = "0.6.1" diff --git a/crates/vt/src/cli/mod.rs b/crates/vt/src/cli/mod.rs index f2724163d..6e050f964 100644 --- a/crates/vt/src/cli/mod.rs +++ b/crates/vt/src/cli/mod.rs @@ -19,6 +19,27 @@ pub enum LogMode { Grouped, } +/// Remote cache mode selected with `--remote-cache`. +#[derive(Debug, Clone, Copy, PartialEq, Eq, clap::ValueEnum)] +pub enum RemoteCacheMode { + /// Remote caching is disabled. + Off, + /// Cached results are downloaded. + Read, + /// Cached results are downloaded and new results are uploaded after successful execution. + ReadWrite, +} + +impl From for vt_plan::remote_cache::RemoteCacheMode { + fn from(mode: RemoteCacheMode) -> Self { + match mode { + RemoteCacheMode::Off => Self::Off, + RemoteCacheMode::Read => Self::Read, + RemoteCacheMode::ReadWrite => Self::ReadWrite, + } + } +} + #[derive(Debug, Clone, clap::Subcommand)] pub enum CacheSubcommand { /// Clean up all the cache @@ -48,6 +69,13 @@ pub struct RunFlags { #[clap(long, conflicts_with = "cache")] pub no_cache: bool, + /// How the remote cache is accessed. + /// + /// If you don't pass this flag, `VP_REMOTE_CACHE` selects the mode. If neither + /// is set, the mode is `read` when an endpoint is configured, or `off` otherwise. + #[clap(long)] + pub remote_cache: Option, + /// How task output is displayed. #[clap(long, default_value = "interleaved")] pub log: LogMode, @@ -233,6 +261,7 @@ impl ResolvedRunCommand { plan_options: PlanOptions { extra_args: self.additional_args.into(), cache_override, + remote_cache_mode: self.flags.remote_cache.map(Into::into), concurrency_limit, parallel, fail_if_no_match, diff --git a/crates/vt/src/session/mod.rs b/crates/vt/src/session/mod.rs index edddddb3a..6ec70e3e3 100644 --- a/crates/vt/src/session/mod.rs +++ b/crates/vt/src/session/mod.rs @@ -582,6 +582,7 @@ impl<'a> Session<'a> { plan_options: PlanOptions { extra_args: run_command.additional_args.clone().into(), cache_override: run_command.flags.cache_override(), + remote_cache_mode: run_command.flags.remote_cache.map(Into::into), concurrency_limit: None, parallel: false, // The selector path runs whatever the user picked interactively; diff --git a/crates/vt_bin/src/lib.rs b/crates/vt_bin/src/lib.rs index c18112e0d..ebe44c02a 100644 --- a/crates/vt_bin/src/lib.rs +++ b/crates/vt_bin/src/lib.rs @@ -99,6 +99,7 @@ impl vt::CommandHandler for CommandHandler { untracked_env: None, input: None, output: None, + remote: None, }), envs: Arc::clone(&command.envs), })) diff --git a/crates/vt_graph/Cargo.toml b/crates/vt_graph/Cargo.toml index 1fc421017..603b9faeb 100644 --- a/crates/vt_graph/Cargo.toml +++ b/crates/vt_graph/Cargo.toml @@ -13,7 +13,7 @@ async-trait = { workspace = true } wincode = { workspace = true, features = ["derive"] } petgraph = { workspace = true } rustc-hash = { workspace = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = ["derive", "rc"] } serde_json = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } diff --git a/crates/vt_graph/run-config.ts b/crates/vt_graph/run-config.ts index b32282aef..b1d68ee16 100644 --- a/crates/vt_graph/run-config.ts +++ b/crates/vt_graph/run-config.ts @@ -26,6 +26,12 @@ base: InputBase, }; export type InputBase = "package" | "workspace"; +export type RemoteCacheConfig = { +/** + * HTTP or HTTPS namespace endpoint. Overridden by `VP_REMOTE_CACHE_URL`. + */ +url: string, }; + export type Task = { /** * Command to run, or an array of commands to run in order. @@ -87,7 +93,18 @@ input?: Array, * - `{auto: true}` enables automatic output tracking * - Negative patterns (e.g. `"!dist/cache/**"`) exclude matched files */ -output?: Array, }; +output?: Array, +/** + * Whether this task can use the remote cache. Defaults to `true`. + * + * The remote cache is used only when these also hold: + * - Caching isn't turned off by `--no-cache` or the workspace root's `cache` setting. + * - An endpoint is set with `cache.remote.url` in the workspace root config or with + * `VP_REMOTE_CACHE_URL`. + * - Remote access isn't set to `off` with `--remote-cache` or `VP_REMOTE_CACHE`. It + * defaults to `read`, which downloads cached results without uploading new ones. + */ +remote?: boolean, }; export type TaskDefinition = Task | Command; @@ -111,7 +128,11 @@ scripts?: boolean, * * Default: `true` */ -tasks?: boolean, }; +tasks?: boolean, +/** + * Remote cache shared by tasks in the workspace. + */ +remote?: RemoteCacheConfig, }; export type UserPackageDependency = { /** diff --git a/crates/vt_graph/src/config/mod.rs b/crates/vt_graph/src/config/mod.rs index b98a364b7..967ef82a1 100644 --- a/crates/vt_graph/src/config/mod.rs +++ b/crates/vt_graph/src/config/mod.rs @@ -82,7 +82,7 @@ impl ResolvedTaskOptions { )?; Some(CacheConfig { - remote_cache: true, + remote_cache_allowed: enabled_cache_config.remote.unwrap_or(true), env_config: EnvConfig { fingerprinted_envs: enabled_cache_config .env @@ -101,8 +101,9 @@ impl ResolvedTaskOptions { #[derive(Debug, Clone, Serialize)] pub struct CacheConfig { - /// Whether this task permits remote caching when local caching is enabled. - pub remote_cache: bool, + /// Whether the task's `cache.remote` allows remote caching. An execution uses + /// the remote cache only if its `vp run` level also resolves one. + pub remote_cache_allowed: bool, pub env_config: EnvConfig, pub input_config: ResolvedGlobConfig, pub output_config: ResolvedGlobConfig, diff --git a/crates/vt_graph/src/config/user.rs b/crates/vt_graph/src/config/user.rs index e526d1bed..0564a97eb 100644 --- a/crates/vt_graph/src/config/user.rs +++ b/crates/vt_graph/src/config/user.rs @@ -231,6 +231,16 @@ pub struct EnabledCacheConfig { #[serde(default)] #[cfg_attr(all(test, not(clippy)), ts(inline))] pub output: Option>, + + /// Whether this task can use the remote cache. Defaults to `true`. + /// + /// The remote cache is used only when these also hold: + /// - Caching isn't turned off by `--no-cache` or the workspace root's `cache` setting. + /// - An endpoint is set with `cache.remote.url` in the workspace root config or with + /// `VP_REMOTE_CACHE_URL`. + /// - Remote access isn't set to `off` with `--remote-cache` or `VP_REMOTE_CACHE`. It + /// defaults to `read`, which downloads cached results without uploading new ones. + pub remote: Option, } /// Options for user-defined tasks in `vite.config.*`, excluding the command. @@ -331,7 +341,7 @@ pub enum UserTaskDefinition { /// /// This option can only be set in the workspace root's config file. /// Setting it in a package's config will result in an error. -#[derive(Debug, Clone, Copy, Deserialize, PartialEq, Eq)] +#[derive(Debug, Clone, Deserialize, PartialEq, Eq)] // TS derive macro generates code using std types that clippy disallows; skip derive during linting #[cfg_attr(all(test, not(clippy)), derive(TS), ts(optional_fields))] #[serde(untagged, deny_unknown_fields)] @@ -356,14 +366,20 @@ pub enum UserGlobalCacheConfig { /// /// Default: `true` tasks: Option, + + /// Remote cache shared by tasks in the workspace. + remote: Option, }, } -/// Resolved global cache configuration with concrete boolean values. -#[derive(Debug, Clone, Copy)] +/// Resolved global cache configuration with concrete values. +#[derive(Debug, Clone)] pub struct ResolvedGlobalCacheConfig { pub scripts: bool, pub tasks: bool, + /// Remote cache endpoint from `cache.remote.url`, if configured. Planning + /// uses `VP_REMOTE_CACHE_URL` instead when it's set. + pub remote_url: Option>, } impl ResolvedGlobalCacheConfig { @@ -373,16 +389,32 @@ impl ResolvedGlobalCacheConfig { #[must_use] pub fn resolve_from(config: Option<&UserGlobalCacheConfig>) -> Self { match config { - None => Self { scripts: false, tasks: true }, - Some(UserGlobalCacheConfig::Bool(true)) => Self { scripts: true, tasks: true }, - Some(UserGlobalCacheConfig::Bool(false)) => Self { scripts: false, tasks: false }, - Some(UserGlobalCacheConfig::Detailed { scripts, tasks }) => { - Self { scripts: scripts.unwrap_or(false), tasks: tasks.unwrap_or(true) } + None => Self { scripts: false, tasks: true, remote_url: None }, + Some(UserGlobalCacheConfig::Bool(true)) => { + Self { scripts: true, tasks: true, remote_url: None } + } + Some(UserGlobalCacheConfig::Bool(false)) => { + Self { scripts: false, tasks: false, remote_url: None } } + Some(UserGlobalCacheConfig::Detailed { scripts, tasks, remote }) => Self { + scripts: scripts.unwrap_or(false), + tasks: tasks.unwrap_or(true), + remote_url: remote.as_ref().map(|remote| Arc::clone(&remote.url)), + }, } } } +/// Remote cache settings in the workspace root's `cache` config. +#[derive(Debug, Clone, Deserialize, PartialEq, Eq)] +// TS derive macro generates code using std types that clippy disallows; skip derive during linting +#[cfg_attr(all(test, not(clippy)), derive(TS), ts(rename = "RemoteCacheConfig"))] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct UserRemoteCacheConfig { + /// HTTP or HTTPS namespace endpoint. Overridden by `VP_REMOTE_CACHE_URL`. + pub url: Arc, +} + /// User configuration structure for `run` field in `vite.config.*` #[derive(Debug, Default, Deserialize)] // TS derive macro generates code using std types that clippy disallows; skip derive during linting @@ -733,6 +765,7 @@ mod tests { "untrackedEnv": ["FOO"], "input": ["src/**"], "output": ["dist/**"], + "remote": false, }, }); let user_config: UserTaskConfig = serde_json::from_value(user_config_json.clone()).unwrap(); @@ -744,6 +777,7 @@ mod tests { untracked_env: Some(std::iter::once("FOO".into()).collect()), input: Some(vec![UserInputEntry::Glob("src/**".into())]), output: Some(vec![UserOutputEntry::Glob("dist/**".into())]), + remote: Some(false), }) ); } @@ -757,6 +791,15 @@ mod tests { assert!(serde_json::from_value::(user_config_json).is_err()); } + #[test] + fn test_top_level_remote_cache_error() { + let user_config_json = json!({ + "command": "echo test", + "remoteCache": false, + }); + assert!(serde_json::from_value::(user_config_json).is_err()); + } + #[test] fn test_input_empty_array() { let user_config_json = json!({ @@ -974,6 +1017,25 @@ mod tests { assert!(!resolved.tasks); } + #[test] + fn test_global_cache_detailed_remote() { + let config: UserGlobalCacheConfig = serde_json::from_value(json!({ + "scripts": true, + "remote": { "url": "https://cache.example/projects/test" }, + })) + .unwrap(); + let resolved = ResolvedGlobalCacheConfig::resolve_from(Some(&config)); + assert!(resolved.scripts); + assert!(resolved.tasks); + assert_eq!(resolved.remote_url.as_deref(), Some("https://cache.example/projects/test")); + + assert!( + serde_json::from_value::(json!({ "remote": { "foo": 42 } })) + .is_err() + ); + assert!(serde_json::from_value::(json!({ "remoteCache": {} })).is_err()); + } + #[test] fn test_global_cache_none_defaults() { let resolved = ResolvedGlobalCacheConfig::resolve_from(None); diff --git a/crates/vt_graph/src/lib.rs b/crates/vt_graph/src/lib.rs index 69dd9db36..7169a95b0 100644 --- a/crates/vt_graph/src/lib.rs +++ b/crates/vt_graph/src/lib.rs @@ -293,9 +293,9 @@ impl IndexedTaskGraph { })? .unwrap_or_default(); - if let Some(cache) = user_config.cache { + if let Some(cache) = &user_config.cache { if is_workspace_root { - root_cache = Some(cache); + root_cache = Some(cache.clone()); } else { return Err(TaskGraphLoadError::CacheInNonRootPackage { package_path: package_dir.clone(), diff --git a/crates/vt_plan/Cargo.toml b/crates/vt_plan/Cargo.toml index 86efc13f9..1c23e81b3 100644 --- a/crates/vt_plan/Cargo.toml +++ b/crates/vt_plan/Cargo.toml @@ -19,12 +19,11 @@ futures-util = { workspace = true } pathdiff = { workspace = true } petgraph = { workspace = true } rustc-hash = { workspace = true } -serde = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = ["derive", "rc"] } sha2 = { workspace = true } shell-escape = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } -url = { workspace = true, features = ["serde"] } vt_casefold = { workspace = true } vt_glob = { workspace = true } vt_graph_ser = { workspace = true } diff --git a/crates/vt_plan/src/cache_metadata.rs b/crates/vt_plan/src/cache_metadata.rs index 0071ed595..d544e78f1 100644 --- a/crates/vt_plan/src/cache_metadata.rs +++ b/crates/vt_plan/src/cache_metadata.rs @@ -9,7 +9,7 @@ use vt_str::{self, Str}; use wincode::{SchemaRead, SchemaWrite}; pub use crate::envs::EnvValueHash; -use crate::{envs::EnvFingerprints, remote_cache::RemoteCacheConfig}; +use crate::{envs::EnvFingerprints, remote_cache::ResolvedRemoteCacheConfig}; /// Key to identify an execution across sessions. #[derive(Debug, SchemaWrite, SchemaRead, Serialize)] @@ -55,8 +55,9 @@ pub struct CacheMetadata { /// Used at execution time to determine what output files to archive. pub output_config: ResolvedGlobConfig, - /// Remote cache access. `None` means local caching only. - pub remote_cache: Option, + /// Remote cache for this execution: the one resolved for its `vp run` level, + /// unless the task sets `cache.remote: false`. `None` means local caching only. + pub remote_cache: Option, /// The unfiltered env context for runner-aware APIs. This is the planning /// context's envs before spawn-env filtering, including command prefix envs diff --git a/crates/vt_plan/src/context.rs b/crates/vt_plan/src/context.rs index b69462fee..f6c4526eb 100644 --- a/crates/vt_plan/src/context.rs +++ b/crates/vt_plan/src/context.rs @@ -8,7 +8,9 @@ use vt_graph::{ use vt_path::AbsolutePath; use vt_str::Str; -use crate::{PlanRequestParser, path_env::prepend_path_env}; +use crate::{ + PlanRequestParser, path_env::prepend_path_env, remote_cache::ResolvedRemoteCacheConfig, +}; #[derive(Debug, thiserror::Error)] #[error( @@ -52,6 +54,21 @@ pub struct PlanContext<'a> { /// Final resolved global cache config, combining the graph's config with any CLI override. resolved_global_cache: ResolvedGlobalCacheConfig, + /// Remote cache access for the commands planned at this `vp run` level. + /// + /// `plan_query_request` resolves it at the start of each level from + /// `cache.remote.url` and the envs visible at that level, after writing the + /// level's `--remote-cache` flag to `VP_REMOTE_CACHE`. Those envs include the + /// process env, outer levels' flags, and prefixes on the command that + /// started the level, like `VP_REMOTE_CACHE=off vp run build`. Prefixes on + /// the level's own commands are added afterwards, so they reach the task + /// processes but don't change this value. + /// + /// Settings pass between levels only through envs. A nested level gets a + /// copy of this value through [`duplicate`](Self::duplicate), but replaces + /// it before any reads. + resolved_remote_cache: Option, + /// The query that caused the current expansion. /// Used by the skip rule to detect and skip duplicate nested expansions. parent_query: Arc, @@ -76,6 +93,7 @@ impl<'a> PlanContext<'a> { indexed_task_graph, extra_args: Arc::default(), resolved_global_cache, + resolved_remote_cache: None, parent_query, } } @@ -146,10 +164,18 @@ impl<'a> PlanContext<'a> { &self.resolved_global_cache } - pub const fn set_resolved_global_cache(&mut self, config: ResolvedGlobalCacheConfig) { + pub fn set_resolved_global_cache(&mut self, config: ResolvedGlobalCacheConfig) { self.resolved_global_cache = config; } + pub const fn resolved_remote_cache(&self) -> Option<&ResolvedRemoteCacheConfig> { + self.resolved_remote_cache.as_ref() + } + + pub fn set_resolved_remote_cache(&mut self, config: Option) { + self.resolved_remote_cache = config; + } + pub fn parent_query(&self) -> &TaskQuery { &self.parent_query } @@ -173,7 +199,8 @@ impl<'a> PlanContext<'a> { task_call_stack: self.task_call_stack.clone(), indexed_task_graph: self.indexed_task_graph, extra_args: Arc::clone(&self.extra_args), - resolved_global_cache: self.resolved_global_cache, + resolved_global_cache: self.resolved_global_cache.clone(), + resolved_remote_cache: self.resolved_remote_cache.clone(), parent_query: Arc::clone(&self.parent_query), } } diff --git a/crates/vt_plan/src/error.rs b/crates/vt_plan/src/error.rs index 8923c1d6b..39c5f87fe 100644 --- a/crates/vt_plan/src/error.rs +++ b/crates/vt_plan/src/error.rs @@ -175,6 +175,15 @@ pub enum Error { #[error("Invalid value for VP_RUN_CONCURRENCY_LIMIT: {0:?}")] InvalidConcurrencyLimitEnv(Arc), + #[error("Invalid value for VP_REMOTE_CACHE: {0:?}, expected off, read, or read-write")] + InvalidRemoteCacheModeEnv(Arc), + + #[error("Invalid value for VP_REMOTE_CACHE_URL: {0:?}")] + InvalidRemoteCacheUrlEnv(Arc), + + #[error("Remote caching requires cache.remote.url or VP_REMOTE_CACHE_URL")] + MissingRemoteCacheEndpoint, + /// A cycle was detected in the task dependency graph during planning. /// /// This is caught by `AcyclicGraph::try_from_graph`, which validates that the diff --git a/crates/vt_plan/src/lib.rs b/crates/vt_plan/src/lib.rs index f74bf0aeb..e58884c94 100644 --- a/crates/vt_plan/src/lib.rs +++ b/crates/vt_plan/src/lib.rs @@ -209,10 +209,7 @@ pub async fn plan_query( ) -> Result { let indexed_task_graph = task_graph_loader.load_task_graph().await?; - let resolved_global_cache = resolve_cache_with_override( - *indexed_task_graph.global_cache_config(), - query_plan_request.plan_options.cache_override, - ); + let resolved_global_cache = indexed_task_graph.global_cache_config().clone(); let QueryPlanRequest { query, plan_options } = query_plan_request; let query = Arc::new(query); @@ -228,17 +225,21 @@ pub async fn plan_query( plan_query_request(query, plan_options, context).await } -const fn resolve_cache_with_override( +fn resolve_cache_with_override( graph_cache: vt_graph::config::ResolvedGlobalCacheConfig, cache_override: CacheOverride, ) -> vt_graph::config::ResolvedGlobalCacheConfig { match cache_override { - CacheOverride::ForceEnabled => { - vt_graph::config::ResolvedGlobalCacheConfig { scripts: true, tasks: true } - } - CacheOverride::ForceDisabled => { - vt_graph::config::ResolvedGlobalCacheConfig { scripts: false, tasks: false } - } + CacheOverride::ForceEnabled => vt_graph::config::ResolvedGlobalCacheConfig { + scripts: true, + tasks: true, + ..graph_cache + }, + CacheOverride::ForceDisabled => vt_graph::config::ResolvedGlobalCacheConfig { + scripts: false, + tasks: false, + ..graph_cache + }, CacheOverride::None => graph_cache, } } @@ -267,5 +268,6 @@ pub fn plan_synthetic( cwd, cwd, ParentCacheConfig::None, + None, ) } diff --git a/crates/vt_plan/src/plan.rs b/crates/vt_plan/src/plan.rs index b18f1887c..c76ba93f8 100644 --- a/crates/vt_plan/src/plan.rs +++ b/crates/vt_plan/src/plan.rs @@ -41,6 +41,7 @@ use crate::{ CacheOverride, PlanOptions, PlanRequest, QueryPlanRequest, ScriptCommand, SyntheticPlanRequest, }, + remote_cache::{self, ResolvedRemoteCacheConfig}, resolve_cache_with_override, }; @@ -72,7 +73,7 @@ fn which( fn effective_cache_config( task_cache_config: Option<&CacheConfig>, source: TaskSource, - resolved_global_cache: ResolvedGlobalCacheConfig, + resolved_global_cache: &ResolvedGlobalCacheConfig, ) -> Option { let enabled = match source { TaskSource::PackageJsonScript => resolved_global_cache.scripts, @@ -290,7 +291,7 @@ async fn plan_task_as_execution_node( let task_effective_cache = effective_cache_config( task_node.resolved_config.resolved_options.cache_config.as_ref(), task_node.source, - *context.resolved_global_cache(), + context.resolved_global_cache(), ); let parent_cache_config = task_effective_cache .as_ref() @@ -305,6 +306,7 @@ async fn plan_task_as_execution_node( &cwd, package_path, parent_cache_config, + context.resolved_remote_cache(), )?; ExecutionItemKind::Leaf(LeafExecutionKind::Spawn(spawn_execution)) } @@ -327,7 +329,7 @@ async fn plan_task_as_execution_node( cache_config: effective_cache_config( task_node.resolved_config.resolved_options.cache_config.as_ref(), task_node.source, - *context.resolved_global_cache(), + context.resolved_global_cache(), ), }; let spawn_execution = plan_spawn_execution( @@ -335,6 +337,7 @@ async fn plan_task_as_execution_node( Some(task_execution_cache_key), &and_item.envs, &resolved_options, + context.resolved_remote_cache(), &script_command.envs, program_path, spawn_args, @@ -384,7 +387,7 @@ async fn plan_task_as_execution_node( cache_config: effective_cache_config( task_node.resolved_config.resolved_options.cache_config.as_ref(), task_node.source, - *context.resolved_global_cache(), + context.resolved_global_cache(), ), }; let spawn_execution = plan_spawn_execution( @@ -402,6 +405,7 @@ async fn plan_task_as_execution_node( }), &BTreeMap::new(), &resolved_options, + context.resolved_remote_cache(), context.envs(), Arc::clone(&*SHELL_PROGRAM_PATH), SHELL_ARGS.iter().map(|s| Str::from(*s)).chain(std::iter::once(script)).collect(), @@ -490,8 +494,9 @@ fn resolve_synthetic_cache_config( Ok(match synthetic_cache_config.into_enabled() { Option::None => Option::None, Some(enabled_cache_config) => { - let EnabledCacheConfig { env, untracked_env, input, output } = + let EnabledCacheConfig { env, untracked_env, input, output, remote } = enabled_cache_config; + parent_config.remote_cache_allowed &= remote.unwrap_or(true); parent_config.env_config.fingerprinted_envs.extend(env.unwrap_or_default()); parent_config .env_config @@ -542,6 +547,10 @@ fn resolve_synthetic_cache_config( } } +#[expect( + clippy::too_many_arguments, + reason = "remote policy is separate from local cache configuration" +)] pub fn plan_synthetic_request( workspace_path: &Arc, prefix_envs: &BTreeMap, Str>, @@ -550,6 +559,7 @@ pub fn plan_synthetic_request( cwd: &Arc, package_dir: &AbsolutePath, parent_cache_config: ParentCacheConfig, + resolved_remote_cache: Option<&ResolvedRemoteCacheConfig>, ) -> Result { let SyntheticPlanRequest { program, args, cache_config, envs } = synthetic_plan_request; @@ -570,6 +580,7 @@ pub fn plan_synthetic_request( execution_cache_key, prefix_envs, &resolved_options, + resolved_remote_cache, &envs, program_path, args, @@ -597,11 +608,16 @@ fn strip_prefix_for_cache( clippy::needless_pass_by_value, reason = "program_path ownership is needed for Arc construction" )] +#[expect( + clippy::too_many_arguments, + reason = "remote policy is separate from local cache configuration" +)] fn plan_spawn_execution( workspace_path: &Arc, execution_cache_key: Option, prefix_envs: &BTreeMap, Str>, resolved_task_options: &ResolvedTaskOptions, + resolved_remote_cache: Option<&ResolvedRemoteCacheConfig>, envs: &Arc>, Arc>>, program_path: Arc, args: Arc<[Str]>, @@ -675,7 +691,11 @@ fn plan_spawn_execution( execution_cache_key, input_config: cache_config.input_config.clone(), output_config: cache_config.output_config.clone(), - remote_cache: None, + remote_cache: if cache_config.remote_cache_allowed { + resolved_remote_cache.cloned() + } else { + None + }, unfiltered_envs: Arc::clone(envs), }); } @@ -739,11 +759,23 @@ pub async fn plan_query_request( // runs `vp run --cache inner` re-enables caching from the workspace // defaults, rather than from the parent's disabled state. let final_cache = resolve_cache_with_override( - *context.indexed_task_graph().global_cache_config(), + context.indexed_task_graph().global_cache_config().clone(), cache_override, ); context.set_resolved_global_cache(final_cache); } + // Resolve `context.resolved_remote_cache` for this level (see its doc for + // the data flow). Write this level's `--remote-cache` flag to + // `VP_REMOTE_CACHE` first, so it overrides inherited values and nested + // levels inherit it. Leave the default unset so each level picks its own + // from the endpoint it sees. + if let Some(mode) = plan_options.remote_cache_mode { + context.add_envs(std::iter::once((remote_cache::MODE_ENV, mode.as_str()))); + } + let resolved_remote_cache = + remote_cache::resolve(context.resolved_global_cache().remote_url.as_ref(), context.envs())?; + context.set_resolved_remote_cache(resolved_remote_cache); + // Resolve effective concurrency for this level. // // Priority (highest to lowest): @@ -947,7 +979,7 @@ mod tests { fn parent_config(includes_auto: bool, positive_globs: &[&str]) -> CacheConfig { CacheConfig { - remote_cache: true, + remote_cache_allowed: true, env_config: EnvConfig { fingerprinted_envs: FxHashSet::default(), untracked_env: FxHashSet::default(), @@ -980,6 +1012,7 @@ mod tests { untracked_env: None, input: None, output: None, + remote: None, }), &pkg, &ws, @@ -1002,6 +1035,7 @@ mod tests { untracked_env: None, input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, + remote: None, }), &pkg, &ws, @@ -1024,6 +1058,7 @@ mod tests { untracked_env: None, input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, + remote: None, }), &pkg, &ws, @@ -1052,6 +1087,7 @@ mod tests { UserInputEntry::Auto(vt_graph::config::user::AutoTracking { auto: true }), ]), output: None, + remote: None, }), &pkg, &ws, @@ -1078,6 +1114,7 @@ mod tests { untracked_env: None, input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, + remote: None, }), &pkg, &ws, @@ -1102,6 +1139,7 @@ mod tests { untracked_env: None, input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, + remote: None, }), &pkg, &ws, @@ -1124,6 +1162,27 @@ mod tests { assert!(result.is_none()); } + #[test] + fn synthetic_disables_remote_cache_despite_parent() { + let (pkg, ws) = test_paths(); + let parent = parent_config(true, &["src/**"]); + let result = resolve_synthetic_cache_config( + ParentCacheConfig::Inherited(parent), + UserCacheConfig::with_config(EnabledCacheConfig { + env: None, + untracked_env: None, + input: None, + output: None, + remote: Some(false), + }), + &pkg, + &ws, + ) + .unwrap() + .unwrap(); + assert!(!result.remote_cache_allowed); + } + #[test] fn synthetic_negative_globs_merged() { let (pkg, ws) = test_paths(); @@ -1135,6 +1194,7 @@ mod tests { untracked_env: None, input: Some(vec![UserInputEntry::Glob("!dist/**".into())]), output: None, + remote: None, }), &pkg, &ws, diff --git a/crates/vt_plan/src/plan_request.rs b/crates/vt_plan/src/plan_request.rs index bc56ab8fb..dd876555d 100644 --- a/crates/vt_plan/src/plan_request.rs +++ b/crates/vt_plan/src/plan_request.rs @@ -50,6 +50,9 @@ pub enum CacheOverride { pub struct PlanOptions { pub extra_args: Arc<[Str]>, pub cache_override: CacheOverride, + /// This level's `--remote-cache` flag. `None` when the flag isn't passed, + /// leaving `VP_REMOTE_CACHE` from the envs to select the mode. + pub remote_cache_mode: Option, /// Per-level concurrency limit. `None` means inherit from the parent level /// (or default to [`crate::DEFAULT_CONCURRENCY_LIMIT`] at the root). pub concurrency_limit: Option, diff --git a/crates/vt_plan/src/remote_cache.rs b/crates/vt_plan/src/remote_cache.rs index 1c2356251..d02a78808 100644 --- a/crates/vt_plan/src/remote_cache.rs +++ b/crates/vt_plan/src/remote_cache.rs @@ -1,11 +1,19 @@ -//! Remote cache settings carried by planned executions. +//! Remote cache settings: the mode requested with `--remote-cache` or +//! `VP_REMOTE_CACHE`, and the access resolved from it for each `vp run` level. -use std::sync::Arc; +use std::{ffi::OsStr, sync::Arc}; +use rustc_hash::FxHashMap; use serde::Serialize; -use url::Url; +use vt_casefold::EnvName; -/// Remote access requested by an invocation. Local cache policy is independent. +use crate::Error; + +pub(crate) const MODE_ENV: &str = "VP_REMOTE_CACHE"; +const URL_ENV: &str = "VP_REMOTE_CACHE_URL"; + +/// Remote cache mode requested with `--remote-cache` or `VP_REMOTE_CACHE`. +/// `resolve` combines it with the endpoint into a [`ResolvedRemoteCacheConfig`]. #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)] #[serde(rename_all = "kebab-case")] pub enum RemoteCacheMode { @@ -14,17 +22,101 @@ pub enum RemoteCacheMode { ReadWrite, } -/// Remote endpoint and access mode for a cacheable execution. +impl RemoteCacheMode { + pub(crate) const fn as_str(self) -> &'static str { + match self { + Self::Off => "off", + Self::Read => "read", + Self::ReadWrite => "read-write", + } + } +} + +/// Remote cache access and endpoint resolved for a `vp run` level from the +/// requested mode, `VP_REMOTE_CACHE_URL`, and `cache.remote.url`. #[derive(Debug, Clone, Serialize)] -pub struct RemoteCacheConfig { - pub mode: RemoteCacheAccess, - pub url: Arc, +pub struct ResolvedRemoteCacheConfig { + pub access: RemoteCacheAccess, + /// Endpoint as configured. It is validated when the remote cache is used. + pub url: Arc, } -/// Access permitted when remote caching is enabled. +/// Remote cache access after resolution. `off` resolves to no remote cache. #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)] #[serde(rename_all = "kebab-case")] pub enum RemoteCacheAccess { Read, ReadWrite, } + +/// Reads a control env. An empty value counts as unset, like a CI secret that +/// isn't available to the job. +fn env_value<'a>( + envs: &'a FxHashMap>, Arc>, + name: &str, +) -> Option<&'a Arc> { + envs.get(EnvName::from_ref(OsStr::new(name))).filter(|value| !value.is_empty()) +} + +/// Resolves remote cache access for one `vp run` level from the envs visible at +/// that level. See `PlanContext::resolved_remote_cache` for what they include. +pub(crate) fn resolve( + configured_url: Option<&Arc>, + envs: &FxHashMap>, Arc>, +) -> Result, Error> { + let mode = match env_value(envs, MODE_ENV) { + None => None, + Some(value) => Some(match value.to_str() { + Some("off") => RemoteCacheMode::Off, + Some("read") => RemoteCacheMode::Read, + Some("read-write") => RemoteCacheMode::ReadWrite, + _ => return Err(Error::InvalidRemoteCacheModeEnv(Arc::clone(value))), + }), + }; + let url = match env_value(envs, URL_ENV) { + Some(value) => Some(Arc::::from( + value.to_str().ok_or_else(|| Error::InvalidRemoteCacheUrlEnv(Arc::clone(value)))?, + )), + None => configured_url.filter(|url| !url.is_empty()).cloned(), + }; + + match (mode, url) { + (Some(RemoteCacheMode::Off), _) | (None, None) => Ok(None), + (Some(RemoteCacheMode::Read) | None, Some(url)) => { + Ok(Some(ResolvedRemoteCacheConfig { access: RemoteCacheAccess::Read, url })) + } + (Some(RemoteCacheMode::ReadWrite), Some(url)) => { + Ok(Some(ResolvedRemoteCacheConfig { access: RemoteCacheAccess::ReadWrite, url })) + } + (Some(RemoteCacheMode::Read | RemoteCacheMode::ReadWrite), None) => { + Err(Error::MissingRemoteCacheEndpoint) + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn reads_envs_by_platform_name_rules() { + let envs = + [("vp_remote_cache", "read-write"), ("vp_remote_cache_url", "https://cache.example")] + .into_iter() + .map(|(name, value)| { + ( + EnvName::new(Arc::::from(OsStr::new(name))), + Arc::::from(OsStr::new(value)), + ) + }) + .collect(); + let resolved = resolve(None, &envs).unwrap(); + if cfg!(windows) { + let resolved = resolved.unwrap(); + assert_eq!(resolved.access, RemoteCacheAccess::ReadWrite); + assert_eq!(&*resolved.url, "https://cache.example"); + } else { + assert!(resolved.is_none()); + } + } +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/task_graph.md index dd1de35d9..4ecb373ed 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/task_graph.md index 134cbbe5f..512da2f2f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/task_graph.md @@ -25,7 +25,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -127,7 +127,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -167,7 +167,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_config_forms/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_config_forms/snapshots/task_graph.md index 370898cf0..f132ba7e7 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_config_forms/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_config_forms/snapshots/task_graph.md @@ -25,7 +25,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -87,7 +87,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [ "MY_ENV" @@ -136,7 +136,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -176,7 +176,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/task_graph.md index 75291a957..80bae33ee 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/task_graph.md @@ -24,7 +24,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,7 +104,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -144,7 +144,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/task_graph.md index fbee1e5a6..6410e19de 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_enabled/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_enabled/snapshots/task_graph.md index 3b34d3411..7a97e8f48 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_enabled/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_enabled/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/task_graph.md index bd4680125..b78448b99 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/task_graph.md @@ -23,7 +23,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,7 +63,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -103,7 +103,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_sharing/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_sharing/snapshots/task_graph.md index 3fd3c274a..05e680687 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_sharing/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_sharing/snapshots/task_graph.md @@ -23,7 +23,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,7 +63,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -103,7 +103,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/task_graph.md index 3e4bddb7a..276653f1f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/task_graph.md @@ -21,7 +21,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/task_graph.md index 03706fff6..fb449cc1e 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/task_graph.md @@ -23,7 +23,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,7 +63,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -103,7 +103,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/task_graph.md index e6b4c1061..013228324 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/task_graph.md @@ -45,7 +45,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -85,7 +85,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/task_graph.md index 79c3c2eeb..38a31e0aa 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/task_graph.md @@ -23,7 +23,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,7 +63,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -103,7 +103,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/comprehensive_task_graph/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/comprehensive_task_graph/snapshots/task_graph.md index e918344da..bd77a19c1 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/comprehensive_task_graph/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/comprehensive_task_graph/snapshots/task_graph.md @@ -43,7 +43,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/api", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -83,7 +83,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/api", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -123,7 +123,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/api", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -163,7 +163,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/api", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -203,7 +203,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -243,7 +243,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -283,7 +283,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -323,7 +323,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -363,7 +363,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -403,7 +403,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/config", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -443,7 +443,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/config", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -483,7 +483,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/pkg#special", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -523,7 +523,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/pkg#special", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -563,7 +563,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/shared", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -603,7 +603,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/shared", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -643,7 +643,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/shared", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -683,7 +683,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/shared", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -723,7 +723,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/tools", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -763,7 +763,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/tools", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -803,7 +803,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/ui", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -843,7 +843,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/ui", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -883,7 +883,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/ui", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -923,7 +923,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/ui", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/conflict_test/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/conflict_test/snapshots/task_graph.md index 438080f2e..ae8c28f1e 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/conflict_test/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/conflict_test/snapshots/task_graph.md @@ -24,7 +24,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/scope-a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/scope-a-b", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,7 +104,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/test-package", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cycle_dependency/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cycle_dependency/snapshots/task_graph.md index 663563d0c..8a1963a7b 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cycle_dependency/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cycle_dependency/snapshots/task_graph.md @@ -24,7 +24,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/dependency_both_topo_and_explicit/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/dependency_both_topo_and_explicit/snapshots/task_graph.md index ce5aa047b..3d286a163 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/dependency_both_topo_and_explicit/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/dependency_both_topo_and_explicit/snapshots/task_graph.md @@ -23,7 +23,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,7 +63,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/b", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/duplicate_package_names/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/duplicate_package_names/snapshots/task_graph.md index 6ce5942d4..b1fac46d5 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/duplicate_package_names/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/duplicate_package_names/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/pkg-a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/pkg-b", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/empty_package_test/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/empty_package_test/snapshots/task_graph.md index 9ea4b56af..7439fe3de 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/empty_package_test/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/empty_package_test/snapshots/task_graph.md @@ -34,7 +34,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/another-empty", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -96,7 +96,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/another-empty", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -136,7 +136,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/another-empty", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -176,7 +176,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/empty-name", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -216,7 +216,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/empty-name", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -256,7 +256,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/empty-name", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -296,7 +296,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/normal-package", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -336,7 +336,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/normal-package", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_unix/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_unix/snapshots/task_graph.md index b5f77d7a6..476b79597 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_unix/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_unix/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [ "foo", @@ -66,7 +66,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_windows/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_windows/snapshots/task_graph.md index b5f77d7a6..476b79597 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_windows/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_windows/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [ "foo", @@ -66,7 +66,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/explicit_deps_workspace/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/explicit_deps_workspace/snapshots/task_graph.md index 2cfb33a46..0088fa12e 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/explicit_deps_workspace/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/explicit_deps_workspace/snapshots/task_graph.md @@ -37,7 +37,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -99,7 +99,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -139,7 +139,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -179,7 +179,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/core", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -219,7 +219,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/core", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -259,7 +259,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/core", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -299,7 +299,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/core", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -339,7 +339,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/utils", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -379,7 +379,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/utils", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -419,7 +419,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/utils", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/task_graph.md index 05e6f657d..bce2a45b1 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/task_graph.md @@ -23,7 +23,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,7 +63,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/filter_workspace/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/filter_workspace/snapshots/task_graph.md index bf7308fe6..e40e075f9 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/filter_workspace/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/filter_workspace/snapshots/task_graph.md @@ -33,7 +33,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -73,7 +73,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -113,7 +113,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -153,7 +153,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -193,7 +193,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -233,7 +233,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/cli", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -273,7 +273,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/cli", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -313,7 +313,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/core", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -353,7 +353,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/core", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -393,7 +393,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/core", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -433,7 +433,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/lib", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -473,7 +473,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/lib", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -513,7 +513,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/utils", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/input_trailing_slash/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/input_trailing_slash/snapshots/task_graph.md index e8ba0e819..c57055a81 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/input_trailing_slash/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/input_trailing_slash/snapshots/task_graph.md @@ -21,7 +21,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/input_workspace_base/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/input_workspace_base/snapshots/task_graph.md index 75ef90e4f..395f58b32 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/input_workspace_base/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/input_workspace_base/snapshots/task_graph.md @@ -21,7 +21,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/task_graph.md index 3ee435e0e..f9faff974 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/task_graph.md @@ -24,7 +24,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,7 +104,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -144,7 +144,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_tasks/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_tasks/snapshots/task_graph.md index ce3539cb6..09d1d40a0 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_tasks/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_tasks/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_duplicate_fields/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_duplicate_fields/snapshots/task_graph.md index 47d8d55f6..83ccf1218 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_duplicate_fields/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_duplicate_fields/snapshots/task_graph.md @@ -25,7 +25,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,7 +105,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/b", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_global_graph/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_global_graph/snapshots/task_graph.md index bde6cc9c6..8f9a28c40 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_global_graph/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_global_graph/snapshots/task_graph.md @@ -36,7 +36,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -76,7 +76,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -116,7 +116,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -156,7 +156,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -196,7 +196,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/dev-a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -236,7 +236,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/dev-a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -276,7 +276,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/peer-a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -316,7 +316,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/prod-a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -356,7 +356,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/prod-missing-task", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -396,7 +396,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/shared", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/package_self_dependency/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/package_self_dependency/snapshots/task_graph.md index c33cbfa38..037b1f2d0 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/package_self_dependency/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/package_self_dependency/snapshots/task_graph.md @@ -21,7 +21,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/self-dep", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/parallel_and_concurrency/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/parallel_and_concurrency/snapshots/task_graph.md index 7f5c8193b..92d6d98fa 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/parallel_and_concurrency/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/parallel_and_concurrency/snapshots/task_graph.md @@ -25,7 +25,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,7 +105,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,7 +145,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/b", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -185,7 +185,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/c", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/pnpm_workspace_packages_optional/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/pnpm_workspace_packages_optional/snapshots/task_graph.md index 49605f895..2a86e92dc 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/pnpm_workspace_packages_optional/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/pnpm_workspace_packages_optional/snapshots/task_graph.md @@ -21,7 +21,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/prefix_env_path_lookup/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/prefix_env_path_lookup/snapshots/task_graph.md index a698b3dff..0c3cfab7b 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/prefix_env_path_lookup/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/prefix_env_path_lookup/snapshots/task_graph.md @@ -21,7 +21,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/recursive_topological_workspace/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/recursive_topological_workspace/snapshots/task_graph.md index 492cc6234..173248f97 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/recursive_topological_workspace/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/recursive_topological_workspace/snapshots/task_graph.md @@ -28,7 +28,7 @@ flowchart TD "resolved_options": { "cwd": "/apps/web", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -68,7 +68,7 @@ flowchart TD "resolved_options": { "cwd": "/apps/web", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -108,7 +108,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -148,7 +148,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/app", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -188,7 +188,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/core", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -228,7 +228,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/core", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -268,7 +268,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/utils", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -308,7 +308,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/utils", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/package.json b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/package.json new file mode 100644 index 000000000..be7fbe32c --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/package.json @@ -0,0 +1,11 @@ +{ + "name": "@test/remote-cache-config", + "scripts": { + "inherit": "vt run build", + "env-off": "VP_REMOTE_CACHE=off vt run build", + "cli-read": "VP_REMOTE_CACHE=off vt run --remote-cache=read build", + "siblings": "VP_REMOTE_CACHE=off vt run build && vt run build", + "endpoints": "VP_REMOTE_CACHE_URL=https://other.example/projects/nested vt run build && vt run build", + "prefix": "VP_REMOTE_CACHE=off VP_REMOTE_CACHE_URL=https://other.example vtt print-file package.json" + } +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml new file mode 100644 index 000000000..bf023f6b1 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml @@ -0,0 +1,72 @@ +[fields] +key = true + +[fields.cache_metadata] +remote_cache = true +spawn_fingerprint.env_fingerprints.untracked_env_config = true + +[fields.cache_metadata.spawn_fingerprint.env_fingerprints.fingerprinted_envs] +VP_REMOTE_CACHE = true +VP_REMOTE_CACHE_URL = true + +[fields.spawn_command.spawn_envs] +VP_REMOTE_CACHE = true +VP_REMOTE_CACHE_URL = true + +[[plan]] +name = "default_read" +args = ["run", "build"] + +[[plan]] +name = "cli_overrides_invalid_env" +args = ["run", "--remote-cache=read-write", "build"] +env = { "VP_REMOTE_CACHE" = "invalid" } + +[[plan]] +name = "task_local_only" +args = ["run", "--remote-cache=read-write", "local-only"] + +[[plan]] +name = "no_cache" +args = ["run", "--no-cache", "build"] +env = { "VP_REMOTE_CACHE" = "read-write" } + +[[plan]] +name = "synthetic_local_only" +args = ["run", "synthetic"] + +[[plan]] +name = "empty_env_endpoint_uses_config" +args = ["run", "build"] +env = { "VP_REMOTE_CACHE_URL" = "" } + +[[plan]] +name = "controls_in_env_fingerprinted" +args = ["run", "tracked-controls"] +env = { "VP_REMOTE_CACHE" = "read-write", "VP_REMOTE_CACHE_URL" = "https://other.example/projects/test" } + +[[plan]] +name = "prefix_controls_fingerprinted" +args = ["run", "prefix"] + +[[plan]] +name = "nested_inherits_cli" +args = ["run", "--remote-cache=off", "inherit"] +env = { "VP_REMOTE_CACHE" = "read-write" } + +[[plan]] +name = "nested_env_override" +args = ["run", "--remote-cache=read", "env-off"] +env = { "VP_REMOTE_CACHE" = "off" } + +[[plan]] +name = "nested_cli_overrides_env" +args = ["run", "--remote-cache=off", "cli-read"] + +[[plan]] +name = "sibling_mode_isolation" +args = ["run", "siblings"] + +[[plan]] +name = "sibling_endpoint_isolation" +args = ["run", "endpoints"] diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc new file mode 100644 index 000000000..52053f1c5 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc @@ -0,0 +1,42 @@ +// run --remote-cache=read-write build +{ + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read-write", + "url": "https://cache.example/projects/test" + } + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE": "read-write" + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc new file mode 100644 index 000000000..4d9a5ef95 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc @@ -0,0 +1,46 @@ +// run tracked-controls +{ + "graph": [ + { + "key": [ + "/", + "tracked-controls" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": { + "VP_REMOTE_CACHE": "sha256:e12ba4f30a4148691508e0280768a94d1885322da87a394e6768e7809dd7ec95", + "VP_REMOTE_CACHE_URL": "sha256:80df658e142dadcbb87d5e16ed4733a5391f6e540c6ed00b7f64623af0c5bc4a" + }, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read-write", + "url": "https://other.example/projects/test" + } + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE": "read-write", + "VP_REMOTE_CACHE_URL": "https://other.example/projects/test" + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc new file mode 100644 index 000000000..4e74f8cde --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc @@ -0,0 +1,40 @@ +// run build +{ + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read", + "url": "https://cache.example/projects/test" + } + }, + "spawn_command": { + "spawn_envs": {} + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc new file mode 100644 index 000000000..e5e06b568 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc @@ -0,0 +1,42 @@ +// run build +{ + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read", + "url": "https://cache.example/projects/test" + } + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE_URL": "" + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc new file mode 100644 index 000000000..c4507f82a --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc @@ -0,0 +1,60 @@ +// run --remote-cache=off cli-read +{ + "graph": [ + { + "key": [ + "/", + "cli-read" + ], + "node": { + "items": [ + { + "kind": { + "Expanded": { + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read", + "url": "https://cache.example/projects/test" + } + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE": "read" + } + } + } + } + } + } + ] + } + } + ] + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_env_override.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_env_override.jsonc new file mode 100644 index 000000000..a5bd9802f --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_env_override.jsonc @@ -0,0 +1,57 @@ +// run --remote-cache=read env-off +{ + "graph": [ + { + "key": [ + "/", + "env-off" + ], + "node": { + "items": [ + { + "kind": { + "Expanded": { + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": null + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE": "off" + } + } + } + } + } + } + ] + } + } + ] + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_inherits_cli.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_inherits_cli.jsonc new file mode 100644 index 000000000..e259b84ef --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_inherits_cli.jsonc @@ -0,0 +1,57 @@ +// run --remote-cache=off inherit +{ + "graph": [ + { + "key": [ + "/", + "inherit" + ], + "node": { + "items": [ + { + "kind": { + "Expanded": { + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": null + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE": "off" + } + } + } + } + } + } + ] + } + } + ] + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_no_cache.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_no_cache.jsonc new file mode 100644 index 000000000..af4313d13 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_no_cache.jsonc @@ -0,0 +1,29 @@ +// run --no-cache build +{ + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": null, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE": "read-write" + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc new file mode 100644 index 000000000..c01626269 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc @@ -0,0 +1,46 @@ +// run prefix +{ + "graph": [ + { + "key": [ + "/", + "prefix" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": { + "VP_REMOTE_CACHE": "sha256:b4dc66dde806261bdda8607d8707aa727d308cd80272381a5583f63899918467", + "VP_REMOTE_CACHE_URL": "sha256:eb8aeaa7d6dcc18abb2804c93fb01cd25864d4d5a62cff2bd38f95232a68928c" + }, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read", + "url": "https://cache.example/projects/test" + } + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE": "off", + "VP_REMOTE_CACHE_URL": "https://other.example" + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc new file mode 100644 index 000000000..2d495235c --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc @@ -0,0 +1,103 @@ +// run endpoints +{ + "graph": [ + { + "key": [ + "/", + "endpoints" + ], + "node": { + "items": [ + { + "kind": { + "Expanded": { + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read", + "url": "https://other.example/projects/nested" + } + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE_URL": "https://other.example/projects/nested" + } + } + } + } + } + } + ] + } + } + ] + } + } + }, + { + "kind": { + "Expanded": { + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read", + "url": "https://cache.example/projects/test" + } + }, + "spawn_command": { + "spawn_envs": {} + } + } + } + } + } + ] + } + } + ] + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc new file mode 100644 index 000000000..34b06f5f9 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc @@ -0,0 +1,100 @@ +// run siblings +{ + "graph": [ + { + "key": [ + "/", + "siblings" + ], + "node": { + "items": [ + { + "kind": { + "Expanded": { + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": null + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE": "off" + } + } + } + } + } + } + ] + } + } + ] + } + } + }, + { + "kind": { + "Expanded": { + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read", + "url": "https://cache.example/projects/test" + } + }, + "spawn_command": { + "spawn_envs": {} + } + } + } + } + } + ] + } + } + ] + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_local_only.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_local_only.jsonc new file mode 100644 index 000000000..11d460a1b --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_local_only.jsonc @@ -0,0 +1,37 @@ +// run synthetic +{ + "graph": [ + { + "key": [ + "/", + "synthetic" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": null + }, + "spawn_command": { + "spawn_envs": {} + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_task_local_only.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_task_local_only.jsonc new file mode 100644 index 000000000..1b5ca185a --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_task_local_only.jsonc @@ -0,0 +1,39 @@ +// run --remote-cache=read-write local-only +{ + "graph": [ + { + "key": [ + "/", + "local-only" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": null + }, + "spawn_command": { + "spawn_envs": { + "VP_REMOTE_CACHE": "read-write" + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/task_graph.md new file mode 100644 index 000000000..093fbdb8c --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/task_graph.md @@ -0,0 +1,419 @@ +# task graph + +```mermaid +flowchart TD + task_0["/#build"] + task_1["/#cli-read"] + task_2["/#endpoints"] + task_3["/#env-off"] + task_4["/#inherit"] + task_5["/#local-only"] + task_6["/#prefix"] + task_7["/#siblings"] + task_8["/#synthetic"] + task_9["/#tracked-controls"] +``` + +## `/#build` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "build", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "TaskConfig" +} +``` + +## `/#cli-read` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "cli-read", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "VP_REMOTE_CACHE=off vt run --remote-cache=read build" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "PackageJsonScript" +} +``` + +## `/#endpoints` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "endpoints", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "VP_REMOTE_CACHE_URL=https://other.example/projects/nested vt run build && vt run build" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "PackageJsonScript" +} +``` + +## `/#env-off` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "env-off", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "VP_REMOTE_CACHE=off vt run build" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "PackageJsonScript" +} +``` + +## `/#inherit` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "inherit", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vt run build" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "PackageJsonScript" +} +``` + +## `/#local-only` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "local-only", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": false, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "TaskConfig" +} +``` + +## `/#prefix` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "prefix", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "VP_REMOTE_CACHE=off VP_REMOTE_CACHE_URL=https://other.example vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "PackageJsonScript" +} +``` + +## `/#siblings` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "siblings", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "VP_REMOTE_CACHE=off vt run build && vt run build" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "PackageJsonScript" +} +``` + +## `/#synthetic` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "synthetic", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vt tool print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": false, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "TaskConfig" +} +``` + +## `/#tracked-controls` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "tracked-controls", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [ + "VP_REMOTE_CACHE", + "VP_REMOTE_CACHE_URL" + ], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "TaskConfig" +} +``` + diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json new file mode 100644 index 000000000..150a0c9d8 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json @@ -0,0 +1,28 @@ +{ + "cache": { + "scripts": true, + "remote": { + "url": "https://cache.example/projects/test" + } + }, + "tasks": { + "build": { + "command": "vtt print-file package.json", + "cache": { "remote": true } + }, + "local-only": { + "command": "vtt print-file package.json", + "cache": { "remote": false } + }, + "synthetic": { + "command": "vt tool print-file package.json", + "cache": { "remote": false } + }, + "tracked-controls": { + "command": "vtt print-file package.json", + "cache": { + "env": ["VP_REMOTE_CACHE", "VP_REMOTE_CACHE_URL"] + } + } + } +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/package.json b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/package.json new file mode 100644 index 000000000..164135393 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/package.json @@ -0,0 +1,7 @@ +{ + "name": "@test/remote-cache-without-endpoint", + "scripts": { + "build": "vtt print-file package.json", + "with-url": "VP_REMOTE_CACHE_URL=https://cache.example/projects/inner vt run build" + } +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots.toml b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots.toml new file mode 100644 index 000000000..8347ad81b --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots.toml @@ -0,0 +1,38 @@ +[fields] +key = true +cache_metadata = { remote_cache = true } + +[[plan]] +name = "default_off" +args = ["run", "build"] + +[[plan]] +name = "nested_endpoint_enables_read" +args = ["run", "with-url"] + +[[plan]] +name = "nested_endpoint_preserves_explicit_off" +args = ["run", "--remote-cache=off", "with-url"] + +[[plan]] +name = "missing_cli_endpoint" +args = ["run", "--remote-cache=read", "build"] + +[[plan]] +name = "invalid_env_mode" +args = ["run", "build"] +env = { "VP_REMOTE_CACHE" = "invalid" } + +[[plan]] +name = "invalid_cli_mode" +args = ["run", "--remote-cache=invalid", "build"] + +[[plan]] +name = "endpoint_not_validated" +args = ["run", "build"] +env = { "VP_REMOTE_CACHE_URL" = "cache.example/projects/test" } + +[[plan]] +name = "empty_controls_unset" +args = ["run", "build"] +env = { "VP_REMOTE_CACHE" = "", "VP_REMOTE_CACHE_URL" = "" } diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_default_off.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_default_off.jsonc new file mode 100644 index 000000000..8708ec15b --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_default_off.jsonc @@ -0,0 +1,26 @@ +// run build +{ + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "remote_cache": null + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_empty_controls_unset.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_empty_controls_unset.jsonc new file mode 100644 index 000000000..8708ec15b --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_empty_controls_unset.jsonc @@ -0,0 +1,26 @@ +// run build +{ + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "remote_cache": null + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc new file mode 100644 index 000000000..9331bbe09 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc @@ -0,0 +1,29 @@ +// run build +{ + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "remote_cache": { + "access": "read", + "url": "cache.example/projects/test" + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_invalid_cli_mode.snap b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_invalid_cli_mode.snap new file mode 100644 index 000000000..7c78ef10d --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_invalid_cli_mode.snap @@ -0,0 +1,4 @@ +error: invalid value 'invalid' for '--remote-cache ' + [possible values: off, read, read-write] + +For more information, try '--help'. diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_invalid_env_mode.snap b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_invalid_env_mode.snap new file mode 100644 index 000000000..2dc74e0af --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_invalid_env_mode.snap @@ -0,0 +1 @@ +Invalid value for VP_REMOTE_CACHE: "invalid", expected off, read, or read-write \ No newline at end of file diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_missing_cli_endpoint.snap b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_missing_cli_endpoint.snap new file mode 100644 index 000000000..adb634a0b --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_missing_cli_endpoint.snap @@ -0,0 +1 @@ +Remote caching requires cache.remote.url or VP_REMOTE_CACHE_URL \ No newline at end of file diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc new file mode 100644 index 000000000..b95a400c9 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc @@ -0,0 +1,47 @@ +// run with-url +{ + "graph": [ + { + "key": [ + "/", + "with-url" + ], + "node": { + "items": [ + { + "kind": { + "Expanded": { + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "remote_cache": { + "access": "read", + "url": "https://cache.example/projects/inner" + } + } + } + } + } + } + ] + } + } + ] + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_preserves_explicit_off.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_preserves_explicit_off.jsonc new file mode 100644 index 000000000..282423f1b --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_preserves_explicit_off.jsonc @@ -0,0 +1,44 @@ +// run --remote-cache=off with-url +{ + "graph": [ + { + "key": [ + "/", + "with-url" + ], + "node": { + "items": [ + { + "kind": { + "Expanded": { + "graph": [ + { + "key": [ + "/", + "build" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "remote_cache": null + } + } + } + } + } + ] + } + } + ] + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/task_graph.md new file mode 100644 index 000000000..2bc564422 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/task_graph.md @@ -0,0 +1,88 @@ +# task graph + +```mermaid +flowchart TD + task_0["/#build"] + task_1["/#with-url"] +``` + +## `/#build` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-without-endpoint", + "task_name": "build", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "PackageJsonScript" +} +``` + +## `/#with-url` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-without-endpoint", + "task_name": "with-url", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "VP_REMOTE_CACHE_URL=https://cache.example/projects/inner vt run build" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "PackageJsonScript" +} +``` + diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/vite-task.json b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/vite-task.json new file mode 100644 index 000000000..d548edfac --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/vite-task.json @@ -0,0 +1,3 @@ +{ + "cache": true +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks/snapshots/task_graph.md index 20b089ac3..54dd61816 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks/snapshots/task_graph.md @@ -26,7 +26,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,7 +66,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,7 +106,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -146,7 +146,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -186,7 +186,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -226,7 +226,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_disabled/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_disabled/snapshots/task_graph.md index 5c96c5b5f..88c6e57c0 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_disabled/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_disabled/snapshots/task_graph.md @@ -23,7 +23,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,7 +63,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -103,7 +103,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_nested_run/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_nested_run/snapshots/task_graph.md index dbe7186ae..74e5b0cbf 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_nested_run/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_nested_run/snapshots/task_graph.md @@ -24,7 +24,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,7 +104,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -144,7 +144,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_task_no_hook/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_task_no_hook/snapshots/task_graph.md index 8ab47e34f..ba2702aa0 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_task_no_hook/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_task_no_hook/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/task_graph.md index a8cc9ca3f..8d7eb3d75 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/task_graph.md @@ -21,7 +21,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/task_graph.md index 4bc59e0aa..3c64bb07b 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/task_graph.md @@ -27,7 +27,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -67,7 +67,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -129,7 +129,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -169,7 +169,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -210,7 +210,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/task_graph.md index f7a4de54b..90cd4887b 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/task_graph.md index a3cf83e08..3cea5db77 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/task_graph.md @@ -30,7 +30,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -72,7 +72,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -113,7 +113,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -154,7 +154,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -195,7 +195,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -237,7 +237,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -277,7 +277,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/transitive_skip_intermediate/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/transitive_skip_intermediate/snapshots/task_graph.md index fdf507294..e8b514a98 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/transitive_skip_intermediate/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/transitive_skip_intermediate/snapshots/task_graph.md @@ -23,7 +23,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/bottom", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,7 +63,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/middle", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -103,7 +103,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/top", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/vpr_shorthand/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/vpr_shorthand/snapshots/task_graph.md index b09baa301..ee2e7efa8 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/vpr_shorthand/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/vpr_shorthand/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/task_graph.md index db410f30b..bfa4d9c63 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/task_graph.md @@ -21,7 +21,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/foo", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_cd_no_skip/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_cd_no_skip/snapshots/task_graph.md index 2225c45b6..8a7401ecf 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_cd_no_skip/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_cd_no_skip/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_depends_on_passthrough/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_depends_on_passthrough/snapshots/task_graph.md index feb67f2cb..9d04d7938 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_depends_on_passthrough/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_depends_on_passthrough/snapshots/task_graph.md @@ -25,7 +25,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,7 +105,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,7 +145,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_multi_command/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_multi_command/snapshots/task_graph.md index e4fe94379..bef663384 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_multi_command/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_multi_command/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_mutual_recursion/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_mutual_recursion/snapshots/task_graph.md index af5e1bc2f..9587811fc 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_mutual_recursion/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_mutual_recursion/snapshots/task_graph.md @@ -24,7 +24,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,7 +104,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -144,7 +144,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_no_package_json/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_no_package_json/snapshots/task_graph.md index f41c76b3d..04bbae8a2 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_no_package_json/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_no_package_json/snapshots/task_graph.md @@ -22,7 +22,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -62,7 +62,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/pkg-a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_self_reference/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_self_reference/snapshots/task_graph.md index e2cd85536..0ddad5eeb 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_self_reference/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_self_reference/snapshots/task_graph.md @@ -23,7 +23,7 @@ flowchart TD "resolved_options": { "cwd": "/", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,7 +63,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/a", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -103,7 +103,7 @@ flowchart TD "resolved_options": { "cwd": "/packages/b", "cache_config": { - "remote_cache": true, + "remote_cache_allowed": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/snapshot_fields.rs b/crates/vt_plan/tests/snapshot_fields.rs index 37654685d..a36998ff6 100644 --- a/crates/vt_plan/tests/snapshot_fields.rs +++ b/crates/vt_plan/tests/snapshot_fields.rs @@ -25,7 +25,7 @@ fn finds_fields_in_nested_plans_without_leaking_unrelated_fields() { "key": ["workspace", "inner"], "Spawn": {"cache_metadata": { "execution_cache_key": {"task": "inner", "extra_args": []}, - "remote_cache": {"mode": "off"} + "remote_cache": {"access": "read"} }}, "neighbors": [] }], "concurrency_limit": 4}}],