Skip to content

Commit 2fd12c9

Browse files
committed
fix(cli): retry transient sync probe failures
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
1 parent 9ac25ce commit 2fd12c9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

  • crates/openshell-cli/src

crates/openshell-cli/src/ssh.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,9 +1198,13 @@ fn sync_error_is_retryable(err: &Report) -> bool {
11981198
"early eof",
11991199
"http2",
12001200
"h2 protocol",
1201+
"reset before headers",
1202+
"service is currently unavailable",
12011203
"transport error",
12021204
"unexpected eof",
12031205
"unavailable",
1206+
"upstream connect error",
1207+
"ssh probe exited with status exit status: 255",
12041208
"ssh tar create exited",
12051209
"ssh tar extract exited",
12061210
"failed to extract tar archive from sandbox",
@@ -1716,6 +1720,16 @@ mod tests {
17161720
assert!(sync_error_is_retryable(&err));
17171721
}
17181722

1723+
#[test]
1724+
fn sync_error_retry_filter_accepts_transient_ssh_probe_failures() {
1725+
let err = Err::<(), _>(miette::miette!(
1726+
"ssh probe exited with status exit status: 255"
1727+
))
1728+
.wrap_err("failed to resolve sandbox source path '/sandbox/ha-sync/ha-sync-upload'")
1729+
.unwrap_err();
1730+
assert!(sync_error_is_retryable(&err));
1731+
}
1732+
17191733
#[test]
17201734
fn sync_error_retry_filter_rejects_validation_failures() {
17211735
let err = miette::miette!("sandbox source path '/etc/passwd' resolves outside /sandbox");

0 commit comments

Comments
 (0)