-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Support terminal resizing for exec/attach/run #9878
Conversation
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions inherit the environment from the primary process, so if the container was created with tty=false, that means the exec session's TERM variable will default to "dumb". Users can override this by setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
@deads2k please review the revert commit and the 2 carry commits that replace it. @openshift/ui-review please review the "Support Windows terminal resizing" commit to make sure that I got every place we potentially run the CLI and pass in stdin/stdout/stderr - we have to use @bparees please review the last commit that affects binary build streaming. |
@csrwng can you try this on Windows? |
SupportedProtocols: kubeletremotecommand.SupportedStreamingProtocols, | ||
Stdin: r, | ||
} | ||
if err := exec.Stream(streamOptions); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
reverts and carrys lgtm. Since they exist to allow the latest client perform exec against 3.0.0 server that hasn't had any updates for almost a year, I don't see reason to fix these again. Next time they need to be reverted, we can just drop them. |
@ncdc, I get the following with exec:
(Same with powershell) With |
The linux client works ok |
Investigating how to fix Windows |
For some reason using stdin from |
So it turns out that what you get back in Windows from I'm wondering now if maybe what @sttts had originally in his Windows work is what we should do - use |
I would prefer to keep term.StdStreams isolated to only where it has to be. On Fri, Jul 15, 2016 at 6:48 PM, Andy Goldstein [email protected]
|
Yeah, that's my plan (and I'm going to do this in Kube so origin will get On Monday, July 18, 2016, Clayton Coleman [email protected] wrote:
|
cb12adb
to
49a14d5
Compare
@bparees @smarterclayton @csrwng updated to pull in my fixes from upstream for term.StdStreams. Please review the last commit. |
[test] |
Evaluated for origin test up to 49a14d5 |
Last commit LGTM |
Looks ok to me to. Anything else anyone wants to say? |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6721/) |
Just that I am anxiously waiting to hit the green button on this On Fri, Jul 22, 2016 at 11:58 AM, Clayton Coleman [email protected]
|
LGTM [merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/6789/) (Image: devenv-rhel7_4654) |
Evaluated for origin merge up to 49a14d5 |
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
Fixes #2284