feat(ssh): use ServerAliveInterval from sshconfig as keepalive interval#370
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the SSH protocol connection initialization to derive rig’s keepalive ticker interval from the user’s SSH configuration (ServerAliveInterval) when no explicit keepalive option is provided, and adds unit tests to validate the precedence behavior.
Changes:
- Wire
sshconfig.Config.ServerAliveIntervalintoOptions.KeepAliveIntervalwhenWithKeepAliveisn’t used. - Add hermetic tests that install a temporary
sshconfig.Parserto validate keepalive wiring and override precedence. - Add a test ensuring keepalive remains unset when no parser is present.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
protocol/ssh/connection.go |
Sets KeepAliveInterval from SSH config ServerAliveInterval when not explicitly provided. |
protocol/ssh/connection_test.go |
Adds tests covering keepalive wiring, explicit override behavior, and the “no parser” case. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
84cf868 to
86849fa
Compare
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.
No description provided.