-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Switch to bufio Reader for exec streams #4400
Switch to bufio Reader for exec streams #4400
Conversation
Neat. Does this solve our pipe issues? |
"solve" as in the unix pipe issue disappears. It still doesn't really work as expected, or work like run does ( |
I think the way |
There were many situations that made exec act funky with input. pipes didn't work as expected, as well as sending input before the shell opened. Thinking about it, it seemed as though the issues were because of how os.Stdin buffers (it doesn't). Dropping this input had some weird consequences. Instead, read from os.Stdin as bufio.Reader, allowing the input to buffer before passing it to the container. Signed-off-by: Peter Hunt <pehunt@redhat.com>
0c9d78f
to
1df4dba
Compare
@haircommander Seems to pass the tests. |
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, can we remove the WIP?
Sure, i think there's still work to be done but we're on the right track |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There were many situations that made exec act funky with input. pipes didn't work as expected, as well as sending input before the shell opened.
Thinking about it, it seemed as though the issues were because of how os.Stdin buffers (it doesn't). Dropping this input had some weird consequences.
Instead, read from os.Stdin as bufio.Reader, allowing the input to buffer before passing it to the container.
Note: I think there are some missed edge cases that need hammering out, so I would say this is WIP until I know everything works as expected
fixes: #4397
fixes: #4326
fixes the open part of: #3302
Signed-off-by: Peter Hunt pehunt@redhat.com