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

Fix handling of PTYs when renderer is reloaded #4346

Merged
merged 4 commits into from
Nov 17, 2021
Merged

Conversation

Nokel81
Copy link
Collaborator

@Nokel81 Nokel81 commented Nov 15, 2021

  • Persist processes if error code is "GoingAway"

  • Switch the shell websocket handling to use v8's serialization
    functions and full objects instead of Base64 and single character
    channel names. This should help readability of the code.

  • Add documentation for WebSocketApiParams

Signed-off-by: Jari Kolehmainen jari.kolehmainen@gmail.com
Signed-off-by: Sebastian Malton sebastian@malton.name

fixes #4318

- Persist processes if error code is "GoingAway"

- Switch the shell websocket handling to use v8's serialization
  functions and full objects instead of Base64 and single character
  channel names. This should help readability of the code.

- Add documentation for WebSocketApiParams

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
@Nokel81 Nokel81 added the bug Something isn't working label Nov 15, 2021
@Nokel81 Nokel81 requested a review from a team as a code owner November 15, 2021 23:11
@Nokel81 Nokel81 requested review from nevalla and jim-docker and removed request for a team November 15, 2021 23:11
@jim-docker
Copy link
Contributor

jim-docker commented Nov 16, 2021

My terminal doesn't open at all now:

Screen Shot 2021-11-16 at 4 17 10 PM

No "Connecting...", nothing in the logs, just flashing cursor. Works fine on master

tried on mac and linux, same problem

Signed-off-by: Sebastian Malton <sebastian@malton.name>
@Nokel81
Copy link
Collaborator Author

Nokel81 commented Nov 16, 2021

@jim-docker Fixed.

@jim-docker
Copy link
Contributor

I'm still seeing unresponsive terminals. I open 3 terminals, disconnect/reconnect the cluster and one or two of them just have a blinking cursor (no prompt, don't take input). I can see "Connecting.." flash briefly and then just the cursor.

@jim-docker
Copy link
Contributor

jim-docker commented Nov 16, 2021

logs indicate that the session is resumed (always see this for each terminal)
And no processes leaked

@Nokel81
Copy link
Collaborator Author

Nokel81 commented Nov 17, 2021

Will investigate

@jim-docker
Copy link
Contributor

Why not just kill all the terminal processes upon cluster disconnect?

@Nokel81
Copy link
Collaborator Author

Nokel81 commented Nov 17, 2021

Why not just kill all the terminal processes upon cluster disconnect?

That should already be happening, but that isn't what the problem is.

- Shell sessions are now not persisted if the cluster is disconnected

- On reconnect, fake the last data message being sent so that the
  terminal is not empty

Signed-off-by: Sebastian Malton <sebastian@malton.name>
… killed

Signed-off-by: Sebastian Malton <sebastian@malton.name>
Copy link
Contributor

@jim-docker jim-docker left a comment

Choose a reason for hiding this comment

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

All issues I found are fixed

@Nokel81 Nokel81 merged commit 0f28015 into master Nov 17, 2021
@Nokel81 Nokel81 deleted the shell-session-fixes branch November 17, 2021 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terminal leaks processes on reload (or network disconnect/connect)
3 participants