feat: add support for agentsock on Windows by spikecurtis · Pull Request #22171 · coder/coder
Conversation
relates to #21335
Adds support for the agentsock and thus coder exp sync commands on Windows. This support was initially missing.
| logger := slog.Make().Leveled(slog.LevelDebug) | ||
| server, err := agentsocket.NewServer(logger, agentsocket.WithPath(socketPath)) | ||
| require.NoError(t, err) | ||
| require.NoError(t, server.Close()) |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This just dupes StartStop so I removed.
Documentation Check
Updates Needed
-
docs/admin/templates/startup-coordination/troubleshooting.md- The troubleshooting steps use Linux-specific commands (/proc/$(pidof -s coder)/environ, Unix socket paths likedial unix /tmp/coder-agent.sock) that won't work on Windows. Now that Windows is supported via named pipes, the doc should note Windows-equivalent steps or add platform-specific callouts for the verification command.
Automated review via Coder Tasks
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've spent an hour or so looking into go-winio and named pipes to gather context for this Code review. Given what I've been able to read, this looks good!
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