buildkit icon indicating copy to clipboard operation
buildkit copied to clipboard

Add bounds to termHeight when BUILDKIT_TTY_LOG_LINES is set

Open holzman opened this issue 2 years ago • 8 comments

In order to print tty output, the termHeight for the vt100 module needs to be between 6 and (current window size - 7).

Fixes #4766.

holzman avatar Mar 15 '24 22:03 holzman

Can test the dropped output with export BUILDKIT_TTY_LOG_LINES=$(tput lines)

holzman avatar Mar 15 '24 22:03 holzman

Needs go mod tidy/go mod vendor - looks like the vendoring is messed up somehow :cry:

jedevc avatar Mar 18 '24 13:03 jedevc

Thanks @jedevc - I'll do that and push a new commit.

holzman avatar Mar 18 '24 14:03 holzman

Thanks for the review @tonistiigi! I'll make the changes and resubmit.

holzman avatar Mar 19 '24 14:03 holzman

@holzman - Do we still want to advance this? If so, there appear to be some open items ;)

thompson-shaun avatar May 09 '24 16:05 thompson-shaun

We should. But I had a question: any objection to adding an additional package-level variable instead of scoping it to the method (since termHeight is used in other methods)? I was thinking termHeightInitial.

holzman avatar May 09 '24 17:05 holzman

Sending this back to the drawing board for a bit: I'm managing to crash the display by aggressively resizing the window.

holzman avatar May 10 '24 20:05 holzman

FWIW, I think the crashes were actually due to a bug in the underlying vt100 module. Once https://github.com/tonistiigi/vt100/pull/3 gets merged, I'll test and ask again for review.

holzman avatar May 14 '24 18:05 holzman