Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Bump backoff from 0.3.0 to 0.4.0 in /src/agent, resolve dependabot block #1589

Merged
merged 12 commits into from
Mar 9, 2022
Merged
2 changes: 1 addition & 1 deletion src/agent/onefuzz-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/agent/onefuzz-agent/src/local/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ pub async fn wait_for_dir(path: impl AsRef<Path>) -> 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()
)))
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/agent/onefuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/agent/onefuzz/src/az_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/agent/reqwest-retry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
5 changes: 2 additions & 3 deletions src/agent/reqwest-retry/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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)))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/agent/storage-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down