Uh oh!
There was an error while loading. Please reload this page.
[ZEPPELIN-1190] [WIP] Visit Notebook Revision - #1304
Conversation
khalidhuseynov
commented
Aug 9, 2016
@corneadoug thanks for taking care of this! #1308 is merged and instead of |
corneadoug
commented
Aug 9, 2016
@khalidhuseynov that doesn't solve anything, I can't work with Revision, it needs to be RevisionId. All you have is the revisitionId and not the other informations, which means I can't make a call to get the Notebook content unless I get the list of Revisions first. |
khalidhuseynov
commented
Aug 10, 2016
@corneadoug thanks for clarification. in this case, how do you think it would look like if I believe @bzz had this point in the comments here
and here
So let's nail down this question here, and maybe together in the same thread, we can come up with much better solution :) |
Great point @khalidhuseynov ! Let's do exactly as you say, as this may be a good overriding argument in our previous design discussions that you mention. To avoid the confusion, could you guys please quickly bring me up to speed with, what As far as I understood, we are talking in this PR about adding a new page on the frontend under URL |
corneadoug
commented
Aug 10, 2016
The front-end needs to be able to get the Notebook's revision and show it. To do that, there is a websocket event that originally looked like that: After using it, it seemed that this websocket event was not well defined on front-end side and that instead of Which look like that: Now, unless there is a whole object to save, there should not be any reason for the front-end to send a full object to the back-end so that it can understand which revision I want. That's precisely what revisionId should be for, especially if I want to have a custom URL that allows loading that revision. Furthermore, in order for me to send a full revision description object, it would mean that I need to get the list of Revisions before I'm able to make any call to load the Notebook revision. |
@khalidhuseynov are we really sure about sending IMO it is not a good idea, if you ask for a resource, you need to call it by his Unique Identifier (A unique identifier (ID) is a numeric or alphanumeric string that is associated with a single entity within a given system. IDs make it possible to address that entity, so that it can be accessed and interacted with). I never saw in my hole life a complex object as ID, but i can be wrong (i dont use hipster api) but to me it looks like it is not the way to go. I would rather have a simple String/Int as a ID than a weird object, like we have for notebook, you call it with is Id eg: |
bzz
commented
Aug 11, 2016
@corneadoug thank you for explaining! So we are talking about WS API to fetch full notebook state from the history by it's revision? Wich on client-side looks like websocketMsgSrv.getNoteRevision($routeParams.noteId, $routeParams.revisionId); And on the back-end is a NOTE_REVISION event in @khalidhuseynov I think first of all, there is a bit of confusion here: this event is handled by Then, it makes perfect sense to change the Notebook.getNoteRevision() API, both, function name AND a signature, as that is the place where actual work of retrieving the Note is done, to something like: getNoteByRevisionId(StringnoteId, StringrevisionId, AuthenticationInfosubject)And this necessity, that comes from API client, at least for me, is an overriding argument in our discussion: you were right and we should adjust NotebookRepo.get interface and follow your design from #1254 (and close #1277). What do you think? |
khalidhuseynov
commented
Aug 11, 2016
@bzz exactly, that's the point i was trying to make in #1254. |
bzz
commented
Aug 16, 2016
@corneadoug please let us know if there still are any troubles, after #1254 got merged! |
8512381 to
e5f28e9Comparekhalidhuseynov
commented
Aug 26, 2016
any ETA on this one, so that can plan accordingly? |
8d5deee to
340f0f1Comparecorneadoug
commented
Aug 30, 2016
@khalidhuseynov However there is some errors on Zeppelin server: To reproduce, you can visit a revision form the dropdown. Then try running a paragraph (for example), this happen for all the Notebook websocket event (Run, Save etc...) The backend seems to be using a NotebookSocket param that isn't initiated in our case (which is good). However since the function are not checking the parameter, it generates a NPE |
khalidhuseynov
commented
Aug 30, 2016
@corneadoug thanks for letting me know, i'll look into that and get back to you. |
| $scope.visitRevision = function(revision) { | ||
| if (revision.id) { | ||
| if (revision.id === "Head") { |
There was a problem hiding this comment.
could you change it here to single quotes,jscs complaining
| console.log('We got the revisions %o', data); | ||
| $scope.noteRevisions = data.revisionList; | ||
| $scope.noteRevisions.splice(0, 0, { | ||
| id: "Head", |
khalidhuseynov
commented
Sep 29, 2016
@corneadoug I've just tried the scenario you have, and it was running correctly (without np) when you switch to different revisions. the only thing is that it was running the |
2e9e4a3 to
34c8a64Comparekhalidhuseynov
commented
Nov 21, 2016
this have been stale for quite a while, so I'll start looking into it |
khalidhuseynov
commented
Jan 3, 2017
I think this can be closed |
close#83close#86close#125close#133close#139close#146close#193close#203close#246close#262close#264close#273close#291close#299close#320close#347close#389close#413close#423close#543close#560close#658close#670close#728close#765close#777close#782close#783close#812close#822close#841close#843close#878close#884close#918close#989close#1076close#1135close#1187close#1231close#1304close#1316close#1361close#1385close#1390close#1414close#1422close#1425close#1447close#1458close#1466close#1485close#1492close#1495close#1497close#1536close#1545close#1561close#1577close#1600close#1603close#1678close#1695close#1739close#1748close#1765close#1767close#1776close#1783close#1799

What is this PR for?
A few sentences describing the overall goals of the pull request's commits.
First time? Check out the contributing guide - https://github.com/apache/zeppelin/blob/master/CONTRIBUTING.md
What type of PR is it?
To visit the Notebook Revision after selecting it from the dropdown
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1190
How should this be tested?
You need to add this config in
conf/zeppelin-env.shexport ZEPPELIN_NOTEBOOK_STORAGE="org.apache.zeppelin.notebook.repo.GitNotebookRepo"Questions: