Repository navigation
Upgrade gohawk to v0.5.0 and close pipes when setPipes fails - #159
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
gohawk v0.5.0 tracks both ends of os.Pipe and reports that setPipes leaks the pipes it already opened when a later os.Pipe call fails. Close them before returning the error. v0.5.0 also removed the exitpolicy analyzer and rejects its name, so drop it from the disabled list. Signed-off-by: James Ko <[email protected]>
connectScheme released the remote and its six pipe fds only when the remote exited before serving. A failed preflight, NewSession, StartCommand or grpc.Dial returned without closing them, so every maintainConnection retry leaked an SSH connection, and a failed dial left the stderr reader blocked. Release both from one deferred cleanup until the monitor goroutine takes ownership. gohawk v0.5.0 retires seven analyzers: borrowedstorage, channelsafety, evalorder, exitpolicy, inlineerror, oncepolicy and syncmapatomicity, so -enable-all now runs five instead of up to eleven. Pin the pre-commit hook to the v0.5.0 commit because tags can move. Signed-off-by: ernestrc <[email protected]> Co-Authored-By: Rune Agent (claude/claude-opus-5-5) <[email protected]>
ernestrc
force-pushed
the
upgrade-gohawk-v0.5.0
branch
from
September 30, 2026 11:43
eabcc2a to
cc68ac4
Compare
ernestrc
enabled auto-merge (rebase)
September 30, 2026 12:03
ernestrc
approved these changes
Sep 30, 2026
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.
Follow-up to #122. Upgrades gohawk to v0.5.0 (from v0.3.5) in the pre-commit hook and lint workflow, and fixes a pipe leak in
setPipesthat the upgrade would report.Changes:
os.Pipefails insetPipes. When the second or third call fails, earlier pipes are now closed before returning the error.exitpolicyfrom the disabled analyzers (removed in gohawk v0.5.0, which rejects unknown analyzer names).Testing:
go test -race ./internal/workspace/workspacessh/