Skip to content

fix(cluster): cross-platform process detach for the local port-forward - #61

Merged
atbagan merged 1 commit into
mainfrom
fix/windows-cross-compile
Jun 12, 2026
Merged

atbagan merged 1 commit into
mainfrom
fix/windows-cross-compile

Conversation

@atbagan

@atbagan atbagan commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes the v0.18.0 release failure: the local kubeconfig port-forward used syscall.SysProcAttr{Setsid: true} (Unix-only), which broke the Windows cross-compile in goreleaser. The host-only CI test job didn't catch it.

  • Move the detach attribute behind build tags (detach_unix.go Setsid; detach_windows.go CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS).
  • Add a cross-compile-all-targets step to CI (linux/windows/darwin x amd64/arm64) so this class of break fails CI, not the release.

Verified locally: all 6 GOOS/GOARCH combos build clean.

The local kubeconfig port-forward detached the child with
syscall.SysProcAttr{Setsid: true}, a Unix-only field, which broke the Windows
cross-compile in the release build (the host-only CI test did not catch it).
Move the detach attribute behind build tags (Setsid on Unix, CREATE_NEW_PROCESS_GROUP
| DETACHED_PROCESS on Windows), and add a cross-compile-all-targets step to CI so a
release-breaking compile error fails CI before the release does.
@atbagan
atbagan merged commit 80cd908 into main Jun 12, 2026
2 checks passed
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.

1 participant