-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Disable path validation, add warning #10045
Merged
Merged
Conversation
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 is promarily being done to unblock #9223. Prior to this, we'd validate that the user's `startingDirectory` existed here. If it was invalid, we'd gracefully fall back to `%USERPROFILE%`. However, that could cause hangs when combined with WSL. When the WSL filesystem is slow to respond, we'll end up waiting indefinitely for their filesystem driver to respond. This can result in the whole terminal becoming unresponsive. Similarly, with #9223 we want users to be able to specify WSL paths in a profile, but this bit of validation logic totally prevents that from working, because it'll just replace the path with `%USERPROFILE%`. If the path is eventually invalid, we'll display warning in the `ConptyConnection`, when the process fails to launch. Closes #9541 Closes #9114
ghost
added
Area-TerminalConnection
Issues pertaining to the terminal<->backend connection interface
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Issue-Task
It's a feature request, but it doesn't really need a major design.
Priority-2
A description (P2)
Product-Terminal
The new Windows Terminal.
labels
May 6, 2021
DHowett
reviewed
May 11, 2021
DHowett
approved these changes
May 11, 2021
ghost
requested review from
miniksa,
carlos-zamora,
leonMSFT,
PankajBhojwani and
lhecker
May 12, 2021 13:03
carlos-zamora
approved these changes
May 12, 2021
carlos-zamora
added
the
AutoMerge
Marked for automatic merge by the bot when requirements are met
label
May 12, 2021
Hello @carlos-zamora! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
ghost
deleted the
dev/migrie/b/9541-dont-validate-paths
branch
May 12, 2021 17:36
DHowett
pushed a commit
that referenced
this pull request
May 24, 2021
This is primarily being done to unblock #9223. Prior to this, we'd validate that the user's `startingDirectory` existed here. If it was invalid, we'd gracefully fall back to `%USERPROFILE%`. However, that could cause hangs when combined with WSL. When the WSL filesystem is slow to respond, we'll end up waiting indefinitely for their filesystem driver to respond. This can result in the whole terminal becoming unresponsive. Similarly, with #9223 we want users to be able to specify WSL paths in a profile, but this bit of validation logic totally prevents that from working, because it'll just replace the path with `%USERPROFILE%`. If the path is eventually invalid, we'll display warning in the `ConptyConnection`, when the process fails to launch. Closes #9541 Closes #9114 ![image](https://user-images.githubusercontent.com/18356694/117318675-426d2d00-ae50-11eb-9cc0-0b23c397472c.png) (cherry picked from commit bfc4838)
🎉 Handy links: |
This was referenced May 25, 2021
🎉 Handy links: |
DHowett
added a commit
that referenced
this pull request
May 28, 2021
ConptyConnection has two different failure modes: 1. We failed to initialize the pseudoconsole or create the process 2. The process exited with an error code. Until this commit, they were treated the same way: closeOnExit=always would force the pane/tab to be destroyed. This was very bad in case 1, where we would display a (possibly useful) error message and then immediately close the window. This was made even worse by the change in #10045. We removed startingDirectory validation and promoted it to an error message (so that we could eventually let the connection handle startingDirectory in its own way.) This of course revealed that a number of users had set invalid starting directories… and those users included some who set closeOnExit to always. Boom: instant "terminal opens and crashes"¹ ¹ It only looks like a crash; it's actually _technically_ functioning properly. Closes #10225.
DHowett
added a commit
that referenced
this pull request
May 28, 2021
ConptyConnection has two different failure modes: 1. We failed to initialize the pseudoconsole or create the process 2. The process exited with an error code. Until this commit, they were treated the same way: closeOnExit=always would force the pane/tab to be destroyed. This was very bad in case 1, where we would display a (possibly useful) error message and then immediately close the window. This was made even worse by the change in #10045. We removed startingDirectory validation and promoted it to an error message (so that we could eventually let the connection handle startingDirectory in its own way.) This of course revealed that a number of users had set invalid starting directories… and those users included some who set closeOnExit to always. Boom: instant "terminal opens and crashes"¹ In this commit, we introduce detection for a connection that fails before it's been established. When that happens, we will ignore the user's closeOnExit mode. ¹ It only looks like a crash; it's actually _technically_ functioning properly. Closes #10225.
This was referenced Jun 1, 2021
Closed
DHowett
added a commit
that referenced
this pull request
Jun 1, 2021
ConptyConnection has two different failure modes: 1. We failed to initialize the pseudoconsole or create the process 2. The process exited with an error code. Until this commit, they were treated the same way: closeOnExit=always would force the pane/tab to be destroyed. This was very bad in case 1, where we would display a (possibly useful) error message and then immediately close the window. This was made even worse by the change in #10045. We removed startingDirectory validation and promoted it to an error message (so that we could eventually let the connection handle startingDirectory in its own way.) This of course revealed that a number of users had set invalid starting directories… and those users included some who set closeOnExit to always. Boom: instant "terminal opens and crashes"¹ In this commit, we introduce detection for a connection that fails before it's been established. When that happens, we will ignore the user's closeOnExit mode. ¹ It only looks like a crash; it's actually _technically_ functioning properly. Closes #10225. (cherry picked from commit 31d78dc)
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-TerminalConnection
Issues pertaining to the terminal<->backend connection interface
AutoMerge
Marked for automatic merge by the bot when requirements are met
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Issue-Task
It's a feature request, but it doesn't really need a major design.
Needs-Second
It's a PR that needs another sign-off
Priority-2
A description (P2)
Product-Terminal
The new Windows Terminal.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is primarily being done to unblock #9223.
Prior to this, we'd validate that the user's
startingDirectory
existedhere. If it was invalid, we'd gracefully fall back to
%USERPROFILE%
.However, that could cause hangs when combined with WSL. When the WSL
filesystem is slow to respond, we'll end up waiting indefinitely for
their filesystem driver to respond. This can result in the whole terminal
becoming unresponsive.
Similarly, with #9223 we want users to be able to specify WSL paths in a
profile, but this bit of validation logic totally prevents that from working,
because it'll just replace the path with
%USERPROFILE%
.If the path is eventually invalid, we'll display warning in the
ConptyConnection
, when the process fails to launch.Closes #9541
Closes #9114