fix(ssh-transport): ensure consistent timeouts for streamlocal probe … - #703
Open
AbdullahM07 wants to merge 1 commit into
Open
fix(ssh-transport): ensure consistent timeouts for streamlocal probe …#703AbdullahM07 wants to merge 1 commit into
AbdullahM07 wants to merge 1 commit into
Conversation
…and actual requests The SSH transport had inconsistent timeout values: - Connection probe used 8-second timeout (STREAMLOCAL_PROBE_TIMEOUT_MS) - Actual requests used 3-second timeout (STREAMLOCAL_DATA_VERIFY_TIMEOUT_MS) This inconsistency could cause: 1. Probe to succeed (waiting up to 8 seconds for streamlocal) 2. Actual requests to fail (timing out after 3 seconds) 3. Result: Deployments fail with 'can't reach remote Docker daemon' despite probe indicating connection was usable Fix: Removed unused 8-second probe timeout and updated the decideMode function to use the same 3-second timeout for both probe and actual requests, ensuring consistency between connection validation and real usage. This resolves GitHub issue oblien#698: 'Desktop app: self-hosted SSH deploy can't reach remote Docker daemon'.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes GitHub issue #698: 'Desktop app: self-hosted SSH deploy can't reach remote Docker daemon'
Summary
This PR fixes an inconsistency in SSH transport timeout values that caused intermittent 'can't reach remote Docker daemon' errors in self-hosted deployments. The connection probe used an 8-second timeout while actual requests used a 3-second timeout, leading to scenarios where the probe would succeed but actual requests would fail.
Motivation
The SSH transport had mismatched timeout values between connection validation and actual usage:
This inconsistency could cause:
This was particularly problematic in environments where streamlocal channel establishment took between 3-8 seconds.
Changes
Verification
npx vitest run packages/adapters/src/runtime/docker-ssh-agent.test.ts(11/11 tests passed)Related issue
Fixes #698