feat: enhance SSH command execution with cancellation and wait delay#617
feat: enhance SSH command execution with cancellation and wait delay#617creativeprojects merged 3 commits intomasterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #617 +/- ##
==========================================
+ Coverage 80.34% 80.39% +0.05%
==========================================
Files 150 150
Lines 11755 11786 +31
==========================================
+ Hits 9444 9475 +31
- Misses 1826 1827 +1
+ Partials 485 484 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This PR improves shutdown/cancellation behavior for SSH-based remote command execution by propagating OS signal cancellation through contexts and tuning how ssh subprocesses are terminated.
Changes:
- Customize
os/exec.Cmdcancellation for OpenSSH runs by sendingos.Interruptand adding aWaitDelay. - Update
sendProfileCommandto use a signal-cancelled context forConnect/Run, while ensuringClosestill runs with a non-cancelled context.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ssh/openssh_client.go | Add custom exec cancellation behavior (SIGINT + wait delay) for OpenSSH command runs. |
| serve.go | Thread a signal-cancelled context into SSH Connect/Run and adjust Close to avoid cancellation interference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nditional timeout setting
No description provided.