Skip to content

Commit fb46193

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

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
@@ -1072,9 +1072,13 @@ fn sync_error_is_retryable(err: &Report) -> bool {
10721072
"early eof",
10731073
"http2",
10741074
"h2 protocol",
1075+
"reset before headers",
1076+
"service is currently unavailable",
10751077
"transport error",
10761078
"unexpected eof",
10771079
"unavailable",
1080+
"upstream connect error",
1081+
"ssh probe exited with status exit status: 255",
10781082
"ssh tar create exited",
10791083
"ssh tar extract exited",
10801084
"failed to extract tar archive from sandbox",
@@ -1590,6 +1594,16 @@ mod tests {
15901594
assert!(sync_error_is_retryable(&err));
15911595
}
15921596

1597+
#[test]
1598+
fn sync_error_retry_filter_accepts_transient_ssh_probe_failures() {
1599+
let err = Err::<(), _>(miette::miette!(
1600+
"ssh probe exited with status exit status: 255"
1601+
))
1602+
.wrap_err("failed to resolve sandbox source path '/sandbox/ha-sync/ha-sync-upload'")
1603+
.unwrap_err();
1604+
assert!(sync_error_is_retryable(&err));
1605+
}
1606+
15931607
#[test]
15941608
fn sync_error_retry_filter_rejects_validation_failures() {
15951609
let err = miette::miette!("sandbox source path '/etc/passwd' resolves outside /sandbox");

0 commit comments

Comments
 (0)