-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert
tsh play
to a streaming API (#34547)
* Convert tsh play to use the new streaming API Instead of downloading the entire session before starting playback, tsh now streams the recording directly to the terminal. This results in a significant reduction in "time to first byte" when playing back large session recordings. This has the side effect of making playback of SSH consistent with that of desktop sessions (we no longer "skip" dead time for SSH sessions and instead play them back at true speed). Additionally, a new CLI flag was added to support configurable playback speeds. Fixes #10579 Closes #11385 Updates gravitational/teleport-private#1024 * Start to phase out the GetSessionEvents API - Mark the old HTTP client implementations as not implemented. Nothing is calling these, but they remain for now until we can fully remove them from the ClientI interface. - Move `tsh play --format=json` over to a streaming approach. This ensures that we don't load the entire session into memory before converting it to JSON/YAML format. * Clean up terminal escape codes - Move more utilities into lib/client.Terminal - Stop timestamping the frame by moving the cursor and writing to the terminal - this is racy. Write the timestamp to the terminal title instead. * Update changelog * Move terminal functions from Unix to common build This is valid because we initialize terminals on Windows with ENABLE_VIRTUAL_TERMINAL_PROCESSING, so the same escape sequences that work on Unix will also work on Windows. This matches Microsoft's recommendation to use virtual terminal sequences over the Windows Console API [1]. For more info, see: https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences [1] https://learn.microsoft.com/en-us/windows/console/classic-vs-vt
- Loading branch information
Showing
13 changed files
with
451 additions
and
823 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.