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

Consolidate local and remote terminal implementations #118252

Merged
merged 57 commits into from
Mar 9, 2021
Merged

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Mar 5, 2021

High level changes:

  • Leverage pty host in remote terminals
  • Share most code between local and remote, this included correcting the create/start flow of a process in remote to match local
  • Simplify remote channel and have it more closely match local equivalent
  • Support attach to session in local
  • Hopefully fix flakiness in terminal and remote integration tests
    • For async process launches (ie. remote before, local now), shutdown the process if the terminal is disposed before the process is fully launched. I think this was the main cause of the flakiness
    • Relaunch is no longer performed in tests via the new terminal.integrated.environmentChangesRelaunch setting
    • Set terminal test config up when only tasks tests are run
  • Support process title/shell type detection in remote Windows servers

Here is the final layout for both local and remote:

pty_service
Image source: pty_service.zip

Fixes #116467
Fixes #118241
Fixes #106354
Fixes #118454
Fixes #118543

Integration test flakiness issues:

Fixes #96057
Fixes #101911
Fixes #117370

It's possible web tests are improved as well but I'll defer that to another PR when remote flakiness is confirmed to be fixed.

@Tyriar Tyriar added this to the March 2021 milestone Mar 5, 2021
@Tyriar Tyriar self-assigned this Mar 5, 2021
This is likely the cause of several terminal test issues we've been seeing,
especially on remote. When process creation becomes async, the process
seems to hang around if the terminal was disposed during the process
creation.

Another thing to consider if env var relaunches messing with tests.
@Tyriar
Copy link
Member Author

Tyriar commented Mar 6, 2021

Pushed a change to cancel createProcess if the terminal is disposed mid way through, I think this is why the test was failing. If there are still problems disabling env var relaunch seems like a good idea to reduce flakiness.

@Tyriar Tyriar merged commit 2c11daf into main Mar 9, 2021
@Tyriar Tyriar deleted the tyriar/116467_2 branch March 9, 2021 15:45
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.