Skip to content

Conversation

@maishivamhoo123
Copy link

Description

Fixes a regression where TTY progress output (colors/bars) was lost on Windows consoles.
The issue was caused by [explain why the console detection failed].

Related Issue

Fixes #13570

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Testing

  • Verified on PowerShell that progress bars appear with docker compose up --build

Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
@maishivamhoo123 maishivamhoo123 requested a review from a team as a code owner February 7, 2026 06:27
Copy link
Contributor

@ndeloof ndeloof left a comment

Choose a reason for hiding this comment

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

don't you think this _console wrapper was introduced for a reason?

@amyssnippet
Copy link
Contributor

you r right @ndeloof , i looked into history (commit bf50c99 by u) and looks like _console acts as an adapter to force BuildKit to treat the output as a containerd.Console, which enables the ANSI progress bars and colors. but here is the twist, as this works great on linux and mac, but on windows this wrapper seems to interfere with how the console handle is passed down, causing the TTY output to disappear/break. since we don't want to lose progress bars on linux and mac, I suggest to modify makeConsole to strictly return the original out on windows, while keeping the wrapper for everyone else. do you understand @maishivamhoo123

Copy link
Contributor

@amyssnippet amyssnippet left a comment

Choose a reason for hiding this comment

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

i think this should be the logic

@maishivamhoo123
Copy link
Author

maishivamhoo123 commented Feb 7, 2026

you r right @ndeloof , i looked into history (commit bf50c99 by u) and looks like _console acts as an adapter to force BuildKit to treat the output as a containerd.Console, which enables the ANSI progress bars and colors. but here is the twist, as this works great on linux and mac, but on windows this wrapper seems to interfere with how the console handle is passed down, causing the TTY output to disappear/break. since we don't want to lose progress bars on linux and mac, I suggest to modify makeConsole to strictly return the original out on windows, while keeping the wrapper for everyone else. do you understand @maishivamhoo123

Yes @amyssnippet Sir , understood. I have updated the code as suggested. Thank you sir.

@amyssnippet
Copy link
Contributor

look @maishivamhoo123 we are here to fix bugs which lie under the hood, what i suggested was just a workaround. rn as @ndeloof suggested, that this should work on every os, and we should consider on fixing it under the hood of buildkit tht why it fails. we should fix that.

we should look at how _console implements Fd(). On Windows, we might need to ensure the wrapper creates a bridge to the underlying file handle correctly so isTerminal checks pass.

Can you check how streams.Out implements FD() vs how our wrapper passes it through? We might need a Windows-specific implementation of the wrapper that exposes the handle correctly.

@amyssnippet
Copy link
Contributor

and also make sure to do a signoff commit

Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
@maishivamhoo123 maishivamhoo123 force-pushed the fix/13570-tty-progress-windows branch from bdc17e4 to 9d53f92 Compare February 9, 2026 08:15
Copy link
Contributor

@amyssnippet amyssnippet 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 still just a workaround, we have to dig deeper into buildkit and docker cli, they are different maintained projects in the docker and containerd ecosystem.

Comment on lines +466 to +467
// streams.Out wraps the actual file. We attempt to unwrap it.
return os.NewFile(c.Out.FD(), "compose")
Copy link
Contributor

Choose a reason for hiding this comment

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

this could lead to resource leaks or unexpected behavior if the file descriptor is closed prematurely. The comment acknowledges the wrapping, but this assumes streams.Out.FD() always points to a valid console file.

@amyssnippet
Copy link
Contributor

tl;dr: dont just on any possible feature request to prove your AI agent can deal with compose codebase, as this can never get implemented in the compose repo. Better confirm with maintainers like @ndeloof which one deserve some time for investigation and design discussions in issue which posted this #13570

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.

[BUG] TTY Progress No Longer Works

3 participants