Skip to content

fix: feature-flag CREATE_NO_WINDOW to not break stderr inheritance#1971

Merged
clux merged 1 commit into
kube-rs:mainfrom
cristeigabriela:create-no-window-envvar-workaround
Apr 13, 2026
Merged

fix: feature-flag CREATE_NO_WINDOW to not break stderr inheritance#1971
clux merged 1 commit into
kube-rs:mainfrom
cristeigabriela:create-no-window-envvar-workaround

Conversation

@cristeigabriela
Copy link
Copy Markdown
Contributor

Motivation

Please refer to #1901 for a thorough description of the issue.

To summarize, setting the CREATE_NO_WINDOW flag in process creation for Windows makes it so that the stderr inheritance breaks (writes ~only happen when the process ends).

In a scenario with interactive login, device code verification messages would get passed to stderr, but with the current code, they would not be shown until the process would end, making 2FA impossible to fulfill.

Solution

I merely introduced the consensus we came to in the issue (inline envvar check). If there are changes required, I'll do them.

I chose to omit tests, etc, because the Windows tests situation already seems to be rather messy, and testing this is kind of annoying (though doable.)

Signed-off-by: gabriela <gabrielac@metalbear.co>
@cristeigabriela cristeigabriela force-pushed the create-no-window-envvar-workaround branch from bb20073 to 4d7d229 Compare April 13, 2026 14:49
@clux clux added the changelog-fix changelog fix category for prs label Apr 13, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.5%. Comparing base (4a4b5b9) to head (4d7d229).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1971   +/-   ##
=====================================
  Coverage   76.5%   76.5%           
=====================================
  Files         89      89           
  Lines       8587    8587           
=====================================
  Hits        6563    6563           
  Misses      2024    2024           
Files with missing lines Coverage Δ
kube-client/src/client/auth/mod.rs 57.4% <ø> (ø)

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@clux clux linked an issue Apr 13, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Member

@clux clux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all good to me. Thank you!

@clux clux added this to the 4.0.0 milestone Apr 13, 2026
@clux clux merged commit 796b90d into kube-rs:main Apr 13, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-fix changelog fix category for prs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auth_exec stderr inheritnace does nothing on Windows

2 participants