-
Notifications
You must be signed in to change notification settings - Fork 2.8k
ZEPPLIN-976 ] HotFix - zeppelin server does not restart when incorrect credentials data. #976
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
ZEPPLIN-976 ] HotFix - zeppelin server does not restart when incorrect credentials data. #976
Conversation
|
retry ci |
| String password = messageMap.get("password"); | ||
|
|
||
| if (entity == null || username == null || password == null) { | ||
| return new JsonResponse(Status.INTERNAL_SERVER_ERROR, "", "").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.
Status.BAD_REQUEST would be more adequate here.
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.
@echarles
Thank you for your feedback.
You're right. i've changed.
| String username = messageMap.get("username"); | ||
| String password = messageMap.get("password"); | ||
|
|
||
| if (entity == null || username == null || password == null) { |
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.
And they could not be "", or is that case is ok?
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.
An empty string does not have a problem in Zeppelin server.
I only solve a serious trouble in this pr.
|
@cloverhearts thank you for hotfixing! How do you think, is there a chance we could have a test that reproduces this issue under this PR or do you think it would be to hard add? |
|
@bzz Problem situation, please refer to the screenshot. Reproduce the problem, please note the following:
|
|
The fix looks good to me. But like @bzz mentioned, it will be even better if there're unittest for this problem. |
|
@bzz @Leemoonsoo |
|
@cloverhearts yes, if that is not very hard to do |
|
@bzz Okay, i would be make it. |
|
add test code about invalid request for credentials api |
|
retry ci |
|
@cloverhearts Seems like integration test fails, can you fix it please? |
|
@minahlee it's not my issue. |
|
LGTM. |
|
ci pass. |
|
@cloverhearts thank you for adding tests! |
…t credentials data. ### What is this PR zeppelin server does not restart when incorrect credentials data. reproduce. 1. Click to zeppelin home for web ui. 2. Click to zeppelin Credentials. 3. 'Entity' information without writing, username and password only written to storage. 4. Click to zeppelin home for web ui. 5. Click to zeppelin Credentials. and zeppelin restart. ##### but, Zeppelin does not work. It creates the wrong json file. 'conf / credentials.json' according to the null. ### What type of PR is it? Hot Fix ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-976 ### How should this be tested? 1. Click to zeppelin home for web ui. 2. Click to zeppelin Credentials. 3. 'Entity' information without writing, username and password only written to storage. 4. Click to zeppelin home for web ui. 5. Click to zeppelin Credentials. and zeppelin restart. zeppelin does work! ### Reproduced Screenshots  ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: CloverHearts <cloverheartsdev@gmail.com> Closes #976 from cloverhearts/hotfix/CredentialsJsonBug and squashes the following commits: 293ab08 [CloverHearts] Merge branch 'master' into hotfix/CredentialsJsonBug ef256c2 [CloverHearts] Merge branch 'master' into hotfix/CredentialsJsonBug 5079495 [CloverHearts] add test code for credentials backends about invalid request. e9a1e93 [CloverHearts] Merge branch 'master' into hotfix/CredentialsJsonBug 4b9aba3 [CloverHearts] changed status code for CredentialsRestapi 1e5cd72 [CloverHearts] Credentials Json serialize backend bug.
…t credentials data. ### What is this PR zeppelin server does not restart when incorrect credentials data. reproduce. 1. Click to zeppelin home for web ui. 2. Click to zeppelin Credentials. 3. 'Entity' information without writing, username and password only written to storage. 4. Click to zeppelin home for web ui. 5. Click to zeppelin Credentials. and zeppelin restart. ##### but, Zeppelin does not work. It creates the wrong json file. 'conf / credentials.json' according to the null. ### What type of PR is it? Hot Fix ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-976 ### How should this be tested? 1. Click to zeppelin home for web ui. 2. Click to zeppelin Credentials. 3. 'Entity' information without writing, username and password only written to storage. 4. Click to zeppelin home for web ui. 5. Click to zeppelin Credentials. and zeppelin restart. zeppelin does work! ### Reproduced Screenshots  ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: CloverHearts <cloverheartsdev@gmail.com> Closes apache#976 from cloverhearts/hotfix/CredentialsJsonBug and squashes the following commits: 293ab08 [CloverHearts] Merge branch 'master' into hotfix/CredentialsJsonBug ef256c2 [CloverHearts] Merge branch 'master' into hotfix/CredentialsJsonBug 5079495 [CloverHearts] add test code for credentials backends about invalid request. e9a1e93 [CloverHearts] Merge branch 'master' into hotfix/CredentialsJsonBug 4b9aba3 [CloverHearts] changed status code for CredentialsRestapi 1e5cd72 [CloverHearts] Credentials Json serialize backend bug.
What is this PR
zeppelin server does not restart when incorrect credentials data.
reproduce.
and zeppelin restart.
but, Zeppelin does not work.
It creates the wrong json file. 'conf / credentials.json' according to the null.
What type of PR is it?
Hot Fix
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-976
How should this be tested?
and zeppelin restart.
zeppelin does work!
Reproduced Screenshots
Questions: