-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Shell interpreter test and doc #1087
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
Conversation
|
Could you please rebase this from current master? |
|
@jongyoul done and CI is ok. |
| result = shell.interpret("ls", context); | ||
| } | ||
| // System.out.println(result.message()); | ||
| assertEquals(InterpreterResult.Code.SUCCESS, result.code()); |
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.
It's better not to leave comments hanging and remove un-used ones.
|
Great clean up and improvement @fvaleri!
Sorry, I have overlooked ZEPPELIN-923 |
| .add(SHELL_COMMAND_TIMEOUT, DEFAULT_COMMAND_TIMEOUT, | ||
| "Shell command time out in millisecs. Default = " + DEFAULT_COMMAND_TIMEOUT).build() | ||
| ); | ||
| } |
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.
Is there a reason to use static interpreter registration mechanism here again, aftert ZEPPELIN-923 AKA #956 ?
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.
thanks @bzz for pointing out, I will take care of this ASAP
|
The failure is flaky and irrelevant but we need to ensure all other tests passed. Could you please re-trigger CI? |
|
Another CI job failed even this time on zeppelin-web module. Anyway, this one passed and it's the same code, except for a couple on unused imports that I removed. |
|
@fvaleri Got it. LGTM. |
### What is this PR for? After #1087 merged, a new docs `shell.md` was added. But in the docs website, still Shell interpreter link points to `pleasecontribute.html`. So I changed this link, applied TOC and added more descriptions. ### What type of PR is it? Documentation ### Todos * [x] - Change `pleasecontribute.html` -> `shell.html` * [x] - Apply TOC(table of contents) * [x] - Add more description to `shell.md` ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <[email protected]> Closes #1138 from AhyoungRyu/improve/shell-docs and squashes the following commits: 69d567d [AhyoungRyu] Address @felixcheung feedback fca76a6 [AhyoungRyu] Apply TOC to rest-credential.md c8e988b [AhyoungRyu] Change docs group manual -> interpreter a0bf1d5 [AhyoungRyu] Add shell.html to _navigation.html
### What is this PR for? After apache#1087 merged, a new docs `shell.md` was added. But in the docs website, still Shell interpreter link points to `pleasecontribute.html`. So I changed this link, applied TOC and added more descriptions. ### What type of PR is it? Documentation ### Todos * [x] - Change `pleasecontribute.html` -> `shell.html` * [x] - Apply TOC(table of contents) * [x] - Add more description to `shell.md` ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <[email protected]> Closes apache#1138 from AhyoungRyu/improve/shell-docs and squashes the following commits: 69d567d [AhyoungRyu] Address @felixcheung feedback fca76a6 [AhyoungRyu] Apply TOC to rest-credential.md c8e988b [AhyoungRyu] Change docs group manual -> interpreter a0bf1d5 [AhyoungRyu] Add shell.html to _navigation.html
### What is this PR for? Shell interpreter streaming output had been available by #683, but currently it's broken after #1087 merged. This patch is for putting it back. ### What type of PR is it? Bug Fix ### TODO - [x] Fix test ### What is the Jira issue? [ZEPPELIN-1880](https://issues.apache.org/jira/browse/ZEPPELIN-1880) ### How should this be tested? ``` %sh date && sleep 3 && date ``` the each timestamp must be printed as streaming output ### Screenshots (if appropriate) - before  - after  ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <[email protected]> Closes #1833 from AhyoungRyu/ZEPPELIN-1880 and squashes the following commits: 8fe33c4 [AhyoungRyu] Fix invalid test cases e2fd4bf [AhyoungRyu] Add test for shell inpt timeout property 34d3021 [AhyoungRyu] Fix shell intp streaming output result
### What is this PR for? Shell interpreter streaming output had been available by #683, but currently it's broken after #1087 merged. This patch is for putting it back. ### What type of PR is it? Bug Fix ### TODO - [x] Fix test ### What is the Jira issue? [ZEPPELIN-1880](https://issues.apache.org/jira/browse/ZEPPELIN-1880) ### How should this be tested? ``` %sh date && sleep 3 && date ``` the each timestamp must be printed as streaming output ### Screenshots (if appropriate) - before  - after  ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <[email protected]> Closes #1833 from AhyoungRyu/ZEPPELIN-1880 and squashes the following commits: 8fe33c4 [AhyoungRyu] Fix invalid test cases e2fd4bf [AhyoungRyu] Add test for shell inpt timeout property 34d3021 [AhyoungRyu] Fix shell intp streaming output result (cherry picked from commit 9b4a1bf) Signed-off-by: ahyoungryu <[email protected]>
What is this PR for?
Small refactoring to Shell interpreter.
Add missing unit test and initial doc.
What type of PR is it?
Improvement, Documentation, Refactoring
Todos
What is the Jira issue?
How should this be tested?
Outline the steps to test the PR here.
Screenshots (if appropriate)
Questions: