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

Send empty/null response to Callback for exec commands that have no textual feedback. #1173

Closed
emilojkovic opened this issue Aug 7, 2018 · 1 comment · Fixed by #1176
Closed
Labels

Comments

@emilojkovic
Copy link
Contributor

The ExecPipesExample uses an ExecWatch object and InputStreamPumper to execute a command in a pod.

When a command with textual feedback (ie. ls, pwd, echo "Hello World", etc.) is executed, the Callback object provided to the InputStreamPumper is correctly called with the response text. However, when a command with no feedback is executed (ie. cd, touch hello.txt, etc.) is executed, the callback function is not called at all.

Because of this, there is no signal that the command has finished executing. I would like to request for a null/empty string/some other default representing null to be sent back through the websocket & InputStreamPumper/Callback for commands that do not have textual feedback. This will standardize the way all commands are executed into a pod (it will always return something -- either the response text or a null) and will allow users to recognize when any command has finished executing.

@rohanKanojia
Copy link
Member

@emilojkovic : Yeah, it makes sense to provide response in use cases where we don't get any textual feedback. This issue doesn't seem that complicated. Would be really awesome if you could submit a quick PR for this :)

emilojkovic added a commit to emilojkovic/kubernetes-client that referenced this issue Aug 9, 2018
emilojkovic added a commit to emilojkovic/kubernetes-client that referenced this issue Aug 10, 2018
…ather than error stream; updated changelog
emilojkovic added a commit to emilojkovic/kubernetes-client that referenced this issue Aug 10, 2018
…ather than error stream; updated changelog
rohanKanojia pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Aug 28, 2018
…ather than error stream; updated changelog
rohanKanojia pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Aug 28, 2018
…ather than error stream; updated changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants