Skip to content

Conversation

@fvaleri
Copy link
Contributor

@fvaleri fvaleri commented Jun 25, 2016

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

  • - Task

What is the Jira issue?

How should this be tested?

Outline the steps to test the PR here.

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update? no
  • Is there breaking changes for older versions? no
  • Does this needs documentation? no

@fvaleri fvaleri changed the title Shell intepreter test and doc Shell interpreter test and doc Jun 25, 2016
@jongyoul
Copy link
Member

Could you please rebase this from current master?

@fvaleri
Copy link
Contributor Author

fvaleri commented Jun 30, 2016

@jongyoul done and CI is ok.

result = shell.interpret("ls", context);
}
// System.out.println(result.message());
assertEquals(InterpreterResult.Code.SUCCESS, result.code());
Copy link
Member

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.

@bzz
Copy link
Member

bzz commented Jun 30, 2016

Great clean up and improvement @fvaleri!

While you and @jongyoul are both here - how do you think guys, would it make sense to take care of Shell part of the ZEPPELIN-804 as prart of this PR as well?

Sorry, I have overlooked ZEPPELIN-923

.add(SHELL_COMMAND_TIMEOUT, DEFAULT_COMMAND_TIMEOUT,
"Shell command time out in millisecs. Default = " + DEFAULT_COMMAND_TIMEOUT).build()
);
}
Copy link
Member

@bzz bzz Jun 30, 2016

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 ?

Copy link
Contributor Author

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

@fvaleri
Copy link
Contributor Author

fvaleri commented Jun 30, 2016

@bzz @jongyoul Now should be ok.

@jongyoul
Copy link
Member

The failure is flaky and irrelevant but we need to ensure all other tests passed. Could you please re-trigger CI?

@fvaleri
Copy link
Contributor Author

fvaleri commented Jun 30, 2016

Another CI job failed even this time on zeppelin-web module.
One is still running but it is very slow (32 min now).

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.25:bower (bower install) on project zeppelin-web: Failed to run task: 'bower --allow-root install' failed. (error code 1) -> [Help 1]

Anyway, this one passed and it's the same code, except for a couple on unused imports that I removed.

@jongyoul
Copy link
Member

@fvaleri Got it. LGTM.

@asfgit asfgit closed this in e575e81 Jul 1, 2016
asfgit pushed a commit that referenced this pull request Jul 12, 2016
### 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
PhilippGrulich pushed a commit to SWC-SENSE/zeppelin that referenced this pull request Aug 8, 2016
### 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
asfgit pushed a commit that referenced this pull request Jan 24, 2017
### 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
![shellintpresultbefore](https://cloud.githubusercontent.com/assets/10060731/21585515/60c35a04-d105-11e6-8e68-853ee784e89d.gif)

 - after
![shellintpresult](https://cloud.githubusercontent.com/assets/10060731/21585516/62142ac8-d105-11e6-8628-1d6eec35daae.gif)

### 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
asfgit pushed a commit that referenced this pull request Jan 24, 2017
### 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
![shellintpresultbefore](https://cloud.githubusercontent.com/assets/10060731/21585515/60c35a04-d105-11e6-8e68-853ee784e89d.gif)

 - after
![shellintpresult](https://cloud.githubusercontent.com/assets/10060731/21585516/62142ac8-d105-11e6-8628-1d6eec35daae.gif)

### 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants