Uh oh!
There was an error while loading. Please reload this page.
Rest Apis to export/import with common code base - #614
Rest Apis to export/import with common code base#614ramaswamydevarajan wants to merge 22 commits into
Conversation
ramaswamydevarajan
commented
Jan 9, 2016
ramaswamydevarajan
commented
Jan 9, 2016
Leemoonsoo
commented
Jan 9, 2016
Thanks @swakrish for the contribution! |
ramaswamydevarajan
commented
Jan 9, 2016
I added them |
bzz
commented
Jan 9, 2016
Thank you for improvement! Reconciling the exisiting GUI import/export features to use this API may be a good idea too, otherwise we'll have different code doing the same job. What do you think? Buy the way, could you also please check that your code formated accodring to the project styleguide? |
ramaswamydevarajan
commented
Jan 9, 2016
@bzz thanks for your comments. I did look at the UI functions, it doesnt have an import I guess and export is more or less similar. Let me know your thoughts I also formatted it for google style. |
felixcheung
commented
Jan 11, 2016
I think maybe import should be a POST? In REST, PUT should be modifying an existing object? |
ramaswamydevarajan
commented
Jan 11, 2016
@felixcheung Yes makes sense, I changed it to http POST. Please review and let me know your comments |
felixcheung
commented
Jan 11, 2016
ramaswamydevarajan
commented
Jan 11, 2016
@felixcheung , @bzz Does it make sense to have a separate PR for making UI import use REST API? |
corneadoug
commented
Jan 11, 2016
Right, it would make sense that both WebSocketAPI and REST API use the same function for Import. |
corneadoug
commented
Jan 11, 2016
Just to clarify, the UI should not use the REST API, the WebsocketAPI and the REST API should rely on the same code to do the import on the backend |
ramaswamydevarajan
commented
Jan 11, 2016
@corneadoug thanks for the comments, Just to clarify, I would be touchig the notebook.java to create a import/export method which can then be leveraged by Notebookserver.java for UI right? Please correct me if im wrong |
corneadoug
commented
Jan 11, 2016
@swakrish Right exactly, that method would be used in both Websocket and REST API case :) |
ramaswamydevarajan
commented
Jan 11, 2016
@corneadoug I moved the code to common notebook.java. Please review and let me know. Thanks |
corneadoug
commented
Jan 11, 2016
Shouldn't the REST API send back an error response when something goes bad? |
ramaswamydevarajan
commented
Jan 11, 2016
@corneadoug I added a id not found for export too now, so it should return HTTP 500 too |
ramaswamydevarajan
commented
Jan 11, 2016
@corneadoug i donno why travis is failing. it looks like its failing on lots of PRs. Let me know if something else is missing for my commit too |
bzz
commented
Jan 12, 2016
There are couple of interesting things in logs:
Each of them looks very strange to me, never seen any of them before and each worth further investigation. |
ramaswamydevarajan
commented
Jan 12, 2016
@bzz |
bzz
commented
Jan 12, 2016
@swakrish I assume that you, as an author, should know better. Usually the mindset we try to share here is - CI must be green for anything to be merged. If it's not - then dedicated effort worth putting is - try to fix it i.e by collaborating with more experienced members, asking for help, etc. If you have some spare cycles you could spend them creating a separate issues, investigating these failures and pinging the people who touched particular code before - that would be very appreciated and of the great help to the project. Otherwise best bet is to wait until somebody takes care of this one day, so you can rebase on top of that work, but this might take some time. |
ramaswamydevarajan
commented
Jan 12, 2016
@bzz thanks for your comments, i just wanted to confirm since when i run test suite it doesnt break any of my changes :) I will take a look at those failures you mentioned to see why those are happening. Again those doesnt seem to happen in local builds |
bzz
commented
Jan 15, 2016
Sorry for a delay. Will review this today. |
ramaswamydevarajan
commented
Jan 16, 2016
thanks @bzz |
bzz
commented
Jan 16, 2016
@swakrish sorry, may be I did not make it clear last time, overall your code looks good, except for having 2 code paths for same function (for importing\exporting notebooks) in different APIs (WS\REST) in the same project does not look as a good idea to me.
I did, and both of them are called exactly once, in the This brings us back to the question asked before:
As far as I can tell such place does not exist, right now. This makes concerns, expressed by me and @corneadoug in this PR not addressed. Please let me know if I'm missing something here. If you have a plan on how to converge these API's code paths (yours and one from the Websocket) - why not to do it in this PR? I think that way it would be even greater contribution, reducing number of possible bugs, etc. What do you think? |
ramaswamydevarajan
commented
Jan 16, 2016
@bzz Yes i was thinking of opening a different PR for that since this address just REST calls. I have a tested code base for modifying web socket too } |
ramaswamydevarajan
commented
Jan 16, 2016
@bzz I merged the websocket import to use the common code.So now both REST/UI import uses same code. |
ramaswamydevarajan
commented
Jan 18, 2016
@bzz can you review this? |
bzz
commented
Jan 19, 2016
@swakrish import code looks great. Just to double-check, I think it's good to ask original author of |
There was a problem hiding this comment.
sourceJSON -> sourceJson
prabhjyotsingh
commented
Jan 19, 2016
Tested this PR, both newer and existing functionality works fine. |
ramaswamydevarajan
commented
Jan 19, 2016
@prabhjyotsingh , thanks for checking this so quickly and your comments. |
ramaswamydevarajan
commented
Jan 20, 2016
@prabhjyotsingh@bzz , please review |
ramaswamydevarajan
commented
Jan 21, 2016
@prabhjyotsingh@bzz is there any other change needed on this PR? |
bzz
commented
Jan 21, 2016
@prabhjyotsingh thanks for prompt reply! Looks great to me, will merge if there is no more discussion. |
There was a problem hiding this comment.
suggest noteId + " not found" for extra space
ramaswamydevarajan
commented
Jan 21, 2016
@felixcheung pleasereview, i think travis is stuck :) |
felixcheung
commented
Jan 21, 2016
looks good |
add keyboard shortcut for toggling run paragraph
ramaswamydevarajan
commented
Jan 22, 2016
@felixcheung thanks for reviewing, looks like travis finally passed |
bzz
commented
Jan 22, 2016
@swakrish could you assign a JIRA issues to yourself please? Or let me know your JIRA id and I can do that for you. |


https://issues.apache.org/jira/browse/ZEPPELIN-590