Add bounds to termHeight when BUILDKIT_TTY_LOG_LINES is set
In order to print tty output, the termHeight for the vt100 module needs to be between 6 and (current window size - 7).
Fixes #4766.
Can test the dropped output with export BUILDKIT_TTY_LOG_LINES=$(tput lines)
Needs go mod tidy/go mod vendor - looks like the vendoring is messed up somehow :cry:
Thanks @jedevc - I'll do that and push a new commit.
Thanks for the review @tonistiigi! I'll make the changes and resubmit.
@holzman - Do we still want to advance this? If so, there appear to be some open items ;)
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.
Sending this back to the drawing board for a bit: I'm managing to crash the display by aggressively resizing the window.
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.