Menu

1 / 2

When stdout is nil: stopping a WinRM panic in GitLab Fleeting

DEV Community: go·Priyanshu Jha·2 days ago
#bQzm5DOM
#devtogo#devto#dev#stdout#winrm
Reading 0:00
15s threshold

A nil writer is one of those values that looks like "I don't care about this output" and behaves like "please crash." In GitLab Fleeting's WinRM connector, that's exactly what happened. The library always copied command output to stdout. When stdout was nil, the process panicked.

This is the story of gitlab-org/fleeting/fleeting!151 , my fix for that panic, opened during the October 2026 Hackathon. I'll cover the issue, the test that reproduced it before the fix existed, the one-guard change, and the fake WinRM transport that made the tests possible.

The issue: a panic on a path that meant "no stdout"

The issue was gitlab-org/fleeting/fleeting#66 , opened by Brandon Bruce. It came from GitLab Runner's instance_ready_command path for Windows autoscaling (support case 759678).

Fleeting is the library GitLab Runner uses to provision and connect to autoscaled instances. The WinRM connector is how it talks to Windows. winRMClient.Run took opts.Stdout and handed it to the winrm library.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.