Repository navigation
fix(cli): retry dial timeouts in SSH connection setup - #24199
Merged
Merged
Conversation
EhabY
force-pushed
the
fix/retry-dial-timeout
branch
from
April 9, 2026 13:37
b8014ed to
70ada96
Compare
`net.Dialer.Timeout` expiry produces a `*net.OpError` that matches `context.DeadlineExceeded` via `errors.Is`. The `isRetryableError` check for `context.DeadlineExceeded` fired before `IsConnectionError`, causing dial timeouts to be classified as non-retryable. This meant Coder Connect dial failures (e.g. broken tunnel with valid DNS) were never retried. Fix by checking `IsConnectionError` before `context.DeadlineExceeded` so network errors are always retryable, even when they wrap a deadline exceeded error internally.
EhabY
force-pushed
the
fix/retry-dial-timeout
branch
from
April 9, 2026 13:56
70ada96 to
74ff7e6
Compare
EhabY
marked this pull request as ready for review
April 9, 2026 14:07
spikecurtis
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
net.Dialer.Timeoutexpiry produces*net.OpErrorwrappingcontext.DeadlineExceeded. InisRetryableError, theDeadlineExceededcheck fired beforeIsConnectionError, so dial timeouts were never retried.This caused Coder Connect dial failures (broken tunnel, valid DNS) to immediately fail despite the retry logic from #24010.
Fix: check
IsConnectionErrorbeforecontext.DeadlineExceeded. Network errors are now retried even when they wrap a deadline error.context.Canceledstays non-retryable.Fixes #24201. Depends on #24010.