diff --git a/src/agent/onefuzz-agent/Cargo.toml b/src/agent/onefuzz-agent/Cargo.toml index 9cfbfb7892..cbbaa04312 100644 --- a/src/agent/onefuzz-agent/Cargo.toml +++ b/src/agent/onefuzz-agent/Cargo.toml @@ -14,7 +14,7 @@ anyhow = "1.0" arraydeque = "0.4" async-trait = "0.1" atexit = { path = "../atexit" } -backoff = { version = "0.3", features = ["tokio"] } +backoff = { version = "0.4", features = ["tokio"] } clap = "2.34" coverage = { path = "../coverage" } crossterm = "0.22" diff --git a/src/agent/onefuzz-agent/src/local/common.rs b/src/agent/onefuzz-agent/src/local/common.rs index 2bcd85ca20..b1a25ad63d 100644 --- a/src/agent/onefuzz-agent/src/local/common.rs +++ b/src/agent/onefuzz-agent/src/local/common.rs @@ -299,9 +299,9 @@ pub async fn wait_for_dir(path: impl AsRef) -> Result<()> { if path.as_ref().exists() { Ok(()) } else { - Err(BackoffError::Transient(anyhow::anyhow!( - "path '{:?}' does not exist", - path.as_ref() + Err(BackoffError::transient(anyhow::anyhow!( + "path '{}' does not exist", + path.as_ref().display() ))) } }; diff --git a/src/agent/onefuzz/Cargo.toml b/src/agent/onefuzz/Cargo.toml index dd87ac50e6..6ae1bfd132 100644 --- a/src/agent/onefuzz/Cargo.toml +++ b/src/agent/onefuzz/Cargo.toml @@ -41,7 +41,7 @@ process_control = "3.0" reqwest-retry = { path = "../reqwest-retry"} onefuzz-telemetry = { path = "../onefuzz-telemetry"} stacktrace-parser = { path = "../stacktrace-parser" } -backoff = { version = "0.3", features = ["tokio"] } +backoff = { version = "0.4", features = ["tokio"] } [target.'cfg(target_family = "windows")'.dependencies] winreg = "0.10" diff --git a/src/agent/onefuzz/src/az_copy.rs b/src/agent/onefuzz/src/az_copy.rs index e9099399d4..b4b337dbf4 100644 --- a/src/agent/onefuzz/src/az_copy.rs +++ b/src/agent/onefuzz/src/az_copy.rs @@ -154,7 +154,7 @@ async fn retry_az_impl(mode: Mode, src: &OsStr, dst: &OsStr, args: &[&str]) -> R if failure_count >= RETRY_COUNT { Err(backoff::Error::Permanent(err)) } else { - Err(backoff::Error::Transient(err)) + Err(backoff::Error::transient(err)) } } } diff --git a/src/agent/reqwest-retry/Cargo.toml b/src/agent/reqwest-retry/Cargo.toml index 35c6805a10..f9c314e0d0 100644 --- a/src/agent/reqwest-retry/Cargo.toml +++ b/src/agent/reqwest-retry/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" [dependencies] anyhow = "1.0" async-trait = "0.1" -backoff = { version = "0.3", features = ["tokio"] } +backoff = { version = "0.4", features = ["tokio"] } log = "0.4" onefuzz-telemetry = { path = "../onefuzz-telemetry" } reqwest = { version = "0.11", features = ["json", "stream", "rustls-tls"], default-features=false } diff --git a/src/agent/reqwest-retry/src/lib.rs b/src/agent/reqwest-retry/src/lib.rs index bed5f77980..216681b3b6 100644 --- a/src/agent/reqwest-retry/src/lib.rs +++ b/src/agent/reqwest-retry/src/lib.rs @@ -56,13 +56,12 @@ where .send() .await .with_context(|| format!("request attempt {} failed", attempt_count + 1)); - match result { Err(x) => { if attempt_count >= max_retry { Err(backoff::Error::Permanent(Err(x))) } else { - Err(backoff::Error::Transient(Err(x))) + Err(backoff::Error::transient(Err(x))) } } Ok(x) => { @@ -93,7 +92,7 @@ where if attempt_count >= max_retry { Err(backoff::Error::Permanent(Err(as_err))) } else { - Err(backoff::Error::Transient(Err(as_err))) + Err(backoff::Error::transient(Err(as_err))) } } } diff --git a/src/agent/storage-queue/Cargo.toml b/src/agent/storage-queue/Cargo.toml index 6d9e2273e2..cb6ba076dd 100644 --- a/src/agent/storage-queue/Cargo.toml +++ b/src/agent/storage-queue/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" [dependencies] anyhow = "1.0" async-trait = "0.1" -backoff = { version = "0.3", features = ["tokio"] } +backoff = { version = "0.4", features = ["tokio"] } base64 = "0.13" bytes = { version = "1.1", features = ["serde"] } derivative = "2.2"