Skip to content

feat(ssh): use ServerAliveInterval from sshconfig as keepalive interval#370

Merged
kke merged 1 commit into
mainfrom
ssh-config-server-alive
Jun 4, 2026
Merged

feat(ssh): use ServerAliveInterval from sshconfig as keepalive interval#370
kke merged 1 commit into
mainfrom
ssh-config-server-alive

Conversation

@kke

@kke kke commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ServerAliveInterval into Options.KeepAliveInterval when WithKeepAlive isn’t used.
  • Add hermetic tests that install a temporary sshconfig.Parser to 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.

Comment thread protocol/ssh/connection.go
Comment thread protocol/ssh/connection_test.go Outdated
Comment thread protocol/ssh/connection_test.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread protocol/ssh/connection.go
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
@kke kke force-pushed the ssh-config-server-alive branch from 84cf868 to 86849fa Compare June 4, 2026 08:58
@kke kke requested a review from Copilot June 4, 2026 08:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@kke kke marked this pull request as ready for review June 4, 2026 09:04
@kke kke merged commit ea87338 into main Jun 4, 2026
13 checks passed
@kke kke deleted the ssh-config-server-alive branch June 4, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants