Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod Logs unusable with autoscroll #365

Open
pinkfloydx33 opened this issue Jul 2, 2022 · 5 comments
Open

Pod Logs unusable with autoscroll #365

pinkfloydx33 opened this issue Jul 2, 2022 · 5 comments

Comments

@pinkfloydx33
Copy link

Deployment/pod Logs used to have an option to disable "scroll to bottom". This has been removed and makes viewing pod logs impossible as you cannot scroll up to earlier lines if the pod is currently logging any new data.

Please bring back the option to disable auto scroll

@dkapanidis
Copy link
Member

dkapanidis commented Jul 4, 2022

Scroll-to-bottom is now automatically enabled when you're viewing the last line and disabled when scrolling upwards.

You can see here how it stops scrolling to bottom when you go up:
2022-07-04 10 56 07

I think what you're experiencing is the limit of the terminal buffer (the maximum amount of lines the terminal keeps in its buffer). This may happen at the beginning of displaying the logs if you have a more logs than the buffer size.

The effect is probably something like this:

2022-07-04 11 02 45

You cannot see it on the record but I'm continuously scrolling upwards and it seemingly scrolls to the bottom, but actually what happens is the buffer limit is reached and lines from the top are removed.

Probably you need to adjust since when you want to see the logs (default is since 8h), on the first example the value is 1h while on the second is All.

I could increase the default scrollback and that fixes the issue, but it will provide instability to low-memory users.

2022-07-04 11 09 04

Instead I will be adding a preference to configure the scrollback for Logs and Terminal (I will use the same preference as I can't see a reason to use different values), same as VS Code:

Screenshot 2022-07-04 at 11 12 02

@pinkfloydx33
Copy link
Author

pinkfloydx33 commented Jul 4, 2022

I'm wondering if there is different behavior on a Mac (which you appear to be on?) than on Windows. The scroll-up behavior did not limit the scrolling when running Kubernetic on Windows (10 if that matters). In my cases these weren't logs with thousands of lines, only enough to fill 1-2 screens and I was constantly dropping to the bottom with new messages. I also had it set to 1h, which shouldn't have mattered since I was trying to view on newly created Pod.

@dkapanidis
Copy link
Member

dkapanidis commented Jul 4, 2022

(Yes I'm on Mac)

I can't find a way to disable the autoscroll feature (see xtermjs/xterm.js#1824).

When I test on Windows I will check this in more detail.

@dkapanidis
Copy link
Member

Hi @pinkfloydx33, I can't seem to reproduce your case.

Here is the same feature (autoscroll stopping when scrolling up) on Win 10:

2022-07-11 14 37 07

For what is worth, my test is doing the following:

  • Create deployment with image jpetazzo/clock
  • Scale up to 3 pods
  • See logs

Can you do the same and see if that is working ok for you?

@Carmezim
Copy link

Carmezim commented Feb 9, 2023

+1 for Mac

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

No branches or pull requests

3 participants