You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by prabhjyotsingh <gi...@git.apache.org> on 2018/02/01 09:41:33 UTC
[GitHub] zeppelin pull request #2757: [ZEPPELIN-3198] UI should not show Version/GIT ...
GitHub user prabhjyotsingh opened a pull request:
https://github.com/apache/zeppelin/pull/2757
[ZEPPELIN-3198] UI should not show Version/GIT Control if the same if not supported
### What is this PR for?
Currently, UI shows an option for version/GIT Control even when it is not supported by the underlying implementing storage configuration.
It is only after users try to save a commit and get an error "Couldn't checkpoint note revision: possibly storage doesn't support versioning. Please check the logs for more details.".
So, if implementing storage configuration doesn't support git storage, UI should not show those options.
### What type of PR is it?
[Improvement]
### What is the Jira issue?
* [ZEPPELIN-3198](https://issues.apache.org/jira/projects/ZEPPELIN/issues/ZEPPELIN-3198)
### How should this be tested?
On using "org.apache.zeppelin.notebook.repo.GitNotebookRepo" for `zeppelin.notebook.storage` user should see revision/version control option, for rest of the others e.g. "FileSystemNotebookRepo" user should not see that option
### Questions:
* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? N/A
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/prabhjyotsingh/zeppelin ZEPPELIN-3198
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/2757.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2757
----
commit cd7fde105c5017ac5ef8fab956c79987529fc10d
Author: Prabhjyot Singh <pr...@...>
Date: 2018-02-01T09:38:50Z
ZEPPELIN-3198: add isRevisionSupported for NotebookRepo
Change-Id: I67af210fb003e007129db4b24e5f8f53fb034c6f
----
---
[GitHub] zeppelin issue #2757: [ZEPPELIN-3198] UI should not show Version/GIT Control...
Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on the issue:
https://github.com/apache/zeppelin/pull/2757
LGTM
---
[GitHub] zeppelin issue #2757: [ZEPPELIN-3198] UI should not show Version/GIT Control...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2757
Shall I merge this, if no more discussion?
---
[GitHub] zeppelin issue #2757: [ZEPPELIN-3198] UI should not show Version/GIT Control...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2757
Thanks for the review will merge this if no more discussion.
---
[GitHub] zeppelin issue #2757: [ZEPPELIN-3198] UI should not show Version/GIT Control...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2757
@felixcheung @zjffdu can you please help review this?
---
[GitHub] zeppelin issue #2757: [ZEPPELIN-3198] UI should not show Version/GIT Control...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2757
Yes, I believe that is exactly what I'm trying to do over here, for example in S3NotebookRepo, since none of checkpoint, get, revisionHistory, or setNoteRevision is implemented (https://github.com/apache/zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/S3NotebookRepo.java#L292) hence for the same the method isRevisionSupported returns false. Let me know if I'm missing out on a case.
---
[GitHub] zeppelin pull request #2757: [ZEPPELIN-3198] UI should not show Version/GIT ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/zeppelin/pull/2757
---
[GitHub] zeppelin issue #2757: [ZEPPELIN-3198] UI should not show Version/GIT Control...
Posted by jhonderson <gi...@git.apache.org>.
Github user jhonderson commented on the issue:
https://github.com/apache/zeppelin/pull/2757
The methods for the versioning of the notes are defined at interface level in NotebookRepo.java:
- Revision checkpoint(String noteId, String checkpointMsg, AuthenticationInfo)
- Note get(String noteId, String revId, AuthenticationInfo)
- List<Revision> revisionHistory(String noteId, AuthenticationInfo)
- Note setNoteRevision(String noteId, String revId, AuthenticationInfo)
They could be implemented by a non-git repository, for example a repository that saves the notes in S3 and its versioning information in a database or something like that. So i guess a better solution would be a method in NotebookRepo.java that indicates if the implementation supports versioning (maybe doesSupportVersioning()); and use that method to show or hide the versioning feature.
What do you think?.
---
[GitHub] zeppelin issue #2757: [ZEPPELIN-3198] UI should not show Version/GIT Control...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2757
@zjffdu have made the suggested changes, waiting for CI, does this looks good?
---
[GitHub] zeppelin issue #2757: [ZEPPELIN-3198] UI should not show Version/GIT Control...
Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on the issue:
https://github.com/apache/zeppelin/pull/2757
It sounds a little redundant to ask user to both implement these version related method and `isRevisionSupported`. How about creating a sub-interface of `NotebookRepo` which support version control ? And if NotebookRepo using is the implementation of this sub-interface, we show version control on UI
---