-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-808] Changed Permissions on Notebooks do not provide helpful error to user #1408
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
[ZEPPELIN-808] Changed Permissions on Notebooks do not provide helpful error to user #1408
Conversation
|
Could someone please review this? Thanks, |
|
@kavinkumarks thanks for contribution. the idea of propagating error to the user is a good one and definitely improves users experience. However, in your implementation you basically propagate all kinds of errors (on top level catch |
|
@khalidhuseynov thanks for sharing the inputs on this.Basically I like your idea of propagating the specific error to the user instead of the generic error message so the user would be more specific about the issue.If we need to handle other errors we can think about them in the future if there is need. Here is my thought to the approach.I will change org.apache.zeppelin.notebook.repo.VFSNotebookRepo.save(Note, AuthenticationInfo) to throw the specific exception with the error message and handle the exception in org.apache.zeppelin.socket.NotebookServer.runParagraph(NotebookSocket, HashSet, Notebook, Message) and then broadcast the error message to the user. Thanks, |
daa6242 to
044b9b0
Compare
|
@khalidhuseynov I have made the changes and committed them.I have handled the exception in runParagraph() instead of throwing custom exception from VFSNotebookRepo class since the exception need to be handled i.e FileSystemException (subclass of IOException) is already handled in different ways for other scenarios and in different implementations of NotebookRepo. Thanks, |
|
@kavinkumarks this looks better and tested locally, works as expected. few things:
|
044b9b0 to
308345e
Compare
|
@khalidhuseynov thanks for checking the changes.I have updated the screenshot and triggered the CI build again. Thanks, |
|
Reopening to trigger the CI build. |
|
The CI build is green. |
|
LGTM |
|
Could someone else review and merge this? Thanks, |
|
@kavinkumarks I've tested this branch, but don't get the expected result when I follow the which is shown after receiving: |
|
@corneadoug Sorry, I wasn't clear about the steps given in the PR.This was about the permission issue with the actual notebook file system and not with the permissions feature in the zeppelin UI.I have updated the PR description. Please let me know if you have any questions. Thanks, |
308345e to
b797a3c
Compare
|
@corneadoug Made changes to exit the paragraph execution when there are errors with the notebook file system. Thanks, |
|
Reopening to trigger the CI build. |
|
The CI build is green. |
|
@kavinkumarks This look like a good start, but is it the only case we wan't to handle here? Maybe it's because of the way we test this PR, but if I change the system notebook permission to read only (chmod 444), I can't run it, but everything I do is still there after page refresh. If I restart zeppelin-server, the notebook isn't there anymore. |
permission on running paragraphs.
error message to the user.
c3885a1 to
21fd49a
Compare
|
@corneadoug I checked the various combinations of file permissions for the notebook folder eg. permissions 444,400. The issue that you reported above that the notebook is not listed on restarting the zeppelin server is due to the below error in the logs on restarting the server,
The notebook folder should have both read and execute permission to list it and this is being already caught in the logs.I think that we aren't missing anything here.Please let me know your thoughts. Thanks, |
|
Reopening to trigger the CI build. |
|
LGTM |
|
The CI build is green. @corneadoug thanks for the update! Could you please take care of merging this? Thanks, |
|
Merging if there is no more discussions |
…l error to user ### What is this PR for? This is about showing information to the user when there are errors on running paragraphs eg. there could be permission related issue with notebook. ### What type of PR is it? Improvement ### Todos NA ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-808 ### How should this be tested? * Create a notebook and change the file system permission for the notebook folder to have system level write permission to a different user.For eg. if you are running your local zeppelin server with id [USERNAME], then change the file system permission for one of your notebooks created with the former username to different one eg. ROOT user who will only have the write permission * Try to run all the paragraphs or any individual paragraph for the notebook * The information as shown in the screenshot should be displayed and the dialog could be closed by the 'Close' button. ### Screenshots (if appropriate)  ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Kavin <[email protected]> Closes apache#1408 from kavinkumarks/zeppelin-808-handle-notebook-permission-error and squashes the following commits: 21fd49a [Kavin] Exit the run paragraph execution when there are errors with the notebook file system. 950ebda [Kavin] Handle FileSystemException on running paragraph and show the relevant error message to the user. 9f7cf67 [Kavin] Show information to the user when there are errors with related to permission on running paragraphs.


What is this PR for?
This is about showing information to the user when there are errors on running paragraphs eg. there could be permission related issue with notebook.
What type of PR is it?
Improvement
Todos
NA
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-808
How should this be tested?
Screenshots (if appropriate)
Questions: