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

Filter by extension

Filter by extension


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

- **Fixed** Remote cache operations now cap concurrent uploads to 4 per endpoint, use pooled HTTP/1.1 connections instead of multiplexing all reads and uploads over one HTTP/2 connection, retry transient `5xx`/`429`/`408` and network failures with jittered backoff, and back off briefly during sustained endpoint outages, preventing `503` upload bursts and Windows connection-reset drops ([#1016](https://github.com/voidzero-dev/vite-task/pull/1016)).
- **Fixed** Tasks that list `node_modules`, the workspace root, or `node_modules/.vite` no longer miss the cache when pnpm's `node_modules/.pnpm-workspace-state-*.json`, Vite's `node_modules/.vite-temp`, the workspace root's `.git`, or the task cache directory appear or disappear. Direct accesses to `node_modules/.vite-temp` and `.DS_Store` are now skipped as well, so they are neither tracked as inputs nor archived as outputs ([#1014](https://github.com/voidzero-dev/vite-task/pull/1014)).
- **Fixed** When a command handler sets a working directory for a command it generates, `vp run` now runs that command in the selected directory and includes the directory in its cache fingerprint ([#1005](https://github.com/voidzero-dev/vite-task/pull/1005)).
- **Fixed** On Windows, tasks with automatic file-access tracking can now run Git Bash's `sh` and other MSYS2 or Cygwin programs, which aborted with `fatal error - MapViewOfFileEx 'shared.5'(…) Win32 error 487` ([#830](https://github.com/voidzero-dev/vite-task/issues/830), [#952](https://github.com/voidzero-dev/vite-task/pull/952)).
Expand Down
22 changes: 1 addition & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions crates/vt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ clap = { workspace = true, features = ["derive"] }
ctrlc = { workspace = true }
derive_more = { workspace = true, features = ["debug", "from"] }
futures-util = { workspace = true }
getrandom = { workspace = true }
once_cell = { workspace = true }
owo-colors = { workspace = true, features = ["supports-colors"] }
petgraph = { workspace = true }
Expand All @@ -41,6 +42,7 @@ tokio = { workspace = true, features = [
"macros",
"process",
"sync",
"time",
] }
tokio-util = { workspace = true, features = ["rt"] }
tracing = { workspace = true }
Expand Down
12 changes: 10 additions & 2 deletions crates/vt/src/session/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ use wincode::{
error::{ReadResult, WriteResult},
};

pub use self::remote::NO_BACKOFF_ENV as REMOTE_CACHE_NO_BACKOFF_ENV;
use self::remote::{ReadError, RemoteClients, RemoteUploads, Restore, UploadError};
use super::{
event::RunKind,
Expand Down Expand Up @@ -573,8 +574,15 @@ impl Validation {
}

impl ExecutionCache {
#[tracing::instrument(level = "debug", skip_all)]
pub fn load_from_path(path: &AbsolutePath) -> anyhow::Result<Self> {
Self::load_from_path_with_no_backoff(path, false)
}

#[tracing::instrument(level = "debug", skip_all)]
pub fn load_from_path_with_no_backoff(
path: &AbsolutePath,
no_backoff: bool,
) -> anyhow::Result<Self> {
tracing::info!("Creating task cache directory at {}", path.as_path().display());
std::fs::create_dir_all(path)?;

Expand All @@ -601,7 +609,7 @@ impl ExecutionCache {
Ok(Self {
conn: Mutex::new(conn),
dir: path.to_absolute_path_buf(),
remote_clients: RemoteClients::default(),
remote_clients: RemoteClients::from_no_backoff(no_backoff),
uploads: RemoteUploads::default(),
})
}
Expand Down
Loading
Loading