Enhanced deployment with SSH timeout rules #15
Merged
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.
Summary
This PR implements configurable SSH connection timeouts and enhanced error classification to improve user experience when connecting to remote hosts. The changes address common pain points where the UI would hang on unreachable hosts and users recieved cryptic error messages that were difficult to diagnose.
Motivation
The current SSH implementation had several usability issues:
Changes Made
With this update a new
ConnectionConfigstruct was introduced with configurable timeouts. SSH errors are now Context-aware with descritptions that provide actionable suggestions. The enhancement leaves functions unchanged but added the*WithConfigvariant to not introduce breaking changes.Error Classification
Integration Points
ssh.Dialcalls now use configurable timeoutsDeployerstruct extended to store configuration for future useTesting
nilerrors, various error message formats and boundary conditionsTest results:
$ go test ./internal/deploy ok github.com/toeirei/keymaster/internal/deploy 0.476sAdditional notes
Love those QoL enhancements