Skip to content
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-1069]Ignore implicit interpreter when user enter wrong interpreter name #1248

Closed
wants to merge 10 commits into from

Conversation

mwkang
Copy link
Contributor

@mwkang mwkang commented Jul 30, 2016

What is this PR for?

Ignore implicit interpreter when user enter wrong interpreter name
linked to #806 (comment)

This PR is related to #1113
ZEPPELIN-1069 branch was force push, so couldn't reopen that PR.

What type of PR is it?

Improvement

What is the Jira issue?

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

How should this be tested?

Unit test
Run-time checking

Screenshots (if appropriate)

zeppelin-1069-gif

Questions:

  • Does the licenses files need update? no
  • Is there breaking changes for older versions? no
  • Does this needs documentation? no

@mwkang
Copy link
Contributor Author

mwkang commented Aug 2, 2016

@jongyoul Can you review this PR?

@@ -1088,7 +1088,10 @@ private InterpreterSetting getDefaultInterpreterSetting(List<InterpreterSetting>
public InterpreterSetting getDefaultInterpreterSetting(String noteId) {
return getDefaultInterpreterSetting(getInterpreterSettings(noteId));
}


public boolean isBinding(String noteId, String replName) {
Copy link
Member

@bzz bzz Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would isBinded() make more sense as a name for a method that checks weather a particular note is binded (bound) to a particular interpreter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree with you. Thanks for comments.
I will change method name.

Copy link
Contributor Author

@mwkang mwkang Aug 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bzz I want to ask your opinion. If I make Note#isBinding method, I remove InterpreterFactory#isBinded method. Do you agree with me?
Um.. Sorry I thinks that Keeping both methods is better.

@bzz
Copy link
Member

bzz commented Aug 2, 2016

👍 for having a test!

Looks good to me, modulo the issue raised above. @mwkang can you take a look please?

@astroshim
Copy link
Contributor

tested. LGTM

@mwkang
Copy link
Contributor Author

mwkang commented Aug 3, 2016

I refactor method name.

@bzz
Copy link
Member

bzz commented Aug 3, 2016

@bzz Thanks for comment, But could you explain more why it doesn't make sense?
Ah.. Your meaning is that org.apache.zeppelin.interpreter.InterpreterFactory#isBinded move to Note.java. Is it right?

Yes, that is exactly what I meant @mwkang !
And while doing so, readability of the piece of the code you are changing could also be improved with static import.

What do you think?

@mwkang
Copy link
Contributor Author

mwkang commented Aug 3, 2016

@bzz I'm worried about that static import confused.

@mwkang
Copy link
Contributor Author

mwkang commented Aug 5, 2016

@bzz I changed StringUtils is static import. Can you check the code?

@@ -17,6 +17,8 @@

package org.apache.zeppelin.notebook;

import static org.apache.commons.lang.StringUtils.*;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static import statement is located at the end of all imports statements. Could you please move it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jongyoul Oh sorry, I move static import position.
Thanks for review.

@jongyoul
Copy link
Member

jongyoul commented Aug 8, 2016

Do you check the error of CI?

Failed tests: 
  NoteTest.insertParagraphWithLastReplName:159 expected:<%spark > but was:<null>
  NoteTest.addParagraphWithLastReplName:144 expected:<%spark > but was:<null>

I think it's meaningful error and it needs to be fixed.

@mwkang
Copy link
Contributor Author

mwkang commented Aug 8, 2016

@jongyoul Sorry, I missed it. I will check. I appreciate your review.

@mwkang
Copy link
Contributor Author

mwkang commented Aug 9, 2016

re-trigger CI

@mwkang mwkang closed this Aug 9, 2016
@mwkang mwkang reopened this Aug 9, 2016
@mwkang
Copy link
Contributor Author

mwkang commented Aug 9, 2016

I am not sure this error is related with this issue.

Failed tests: 
  ZeppelinSparkClusterTest.zRunTest:204 expected:<FINISHED> but was:<ERROR>

@bzz
Copy link
Member

bzz commented Aug 9, 2016

@mwkang thank you for prompt addressing reviews!

If you re-trigger CI more (close&re-open this PR) - does the same issue persists every time?

@@ -1088,7 +1088,10 @@ private InterpreterSetting getDefaultInterpreterSetting(List<InterpreterSetting>
public InterpreterSetting getDefaultInterpreterSetting(String noteId) {
return getDefaultInterpreterSetting(getInterpreterSettings(noteId));
}


public boolean isBinded(String noteId, String replName) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be removed now, in favor of Note.isBinded(), no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will remove it.

@mwkang
Copy link
Contributor Author

mwkang commented Aug 9, 2016

If you re-trigger CI more (close&re-open this PR) - does the same issue persists every time?

I'm not sure if it persists. I will re-tigger after fix the issue.

@mwkang
Copy link
Contributor Author

mwkang commented Aug 11, 2016

@bzz No, It does not persists every time.

@bzz
Copy link
Member

bzz commented Aug 11, 2016

Ok, good to know, let me look into that

@bzz
Copy link
Member

bzz commented Aug 11, 2016

This looks like an issue fixed in master 10h ago:

�[31m- should provide onclick method *** FAILED ***�[0m
�[31m  The code passed to eventually never returned normally. Attempted 1 times over 231.694296 milliseconds. Last failure message: 0 was not equal to 1. (AbstractAngularElemTest.scala:72)�[0m

Could you please try rebasing on latest master git pull ; git rebase master; git push -f ?

@mwkang
Copy link
Contributor Author

mwkang commented Aug 11, 2016

@bzz Thanks for your review. I rebase on to master and force push.

@bzz
Copy link
Member

bzz commented Aug 12, 2016

Thank you! BTW in my experience, if in case of CI failure PR author posts the failure result from logs - that speeds us review a lot!

CI fails now on Spark 1.6 Scala 2.10 and Scala 2.11 profiles with

[INFO] Zeppelin: web Application .......................... FAILURE [01:31 min]
[INFO] make: Leaving directory `/home/travis/build/apache/zeppelin/zeppelin-web/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
[ERROR] npm ERR! Linux 3.13.0-40-generic
[ERROR] npm ERR! argv "/home/travis/build/apache/zeppelin/zeppelin-web/node/node" "/home/travis/build/apache/zeppelin/zeppelin-web/node/node_modules/npm/bin/npm-cli.js" "install" "--color=false"
[ERROR] npm ERR! node v0.12.13
[ERROR] npm ERR! npm  v2.15.0
[ERROR] npm ERR! code ECONNRESET
[ERROR] npm ERR! errno ECONNRESET
[ERROR] npm ERR! syscall read
[ERROR] 
[ERROR] npm ERR! network read ECONNRESET
[ERROR] npm ERR! network This is most likely not a problem with npm itself
[ERROR] npm ERR! network and is related to network connectivity.
[ERROR] npm ERR! network In most cases you are behind a proxy or have bad network settings.
[ERROR] npm ERR! network 
[ERROR] npm ERR! network If you are behind a proxy, please make sure that the
[ERROR] npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

Which seems to be networking issue on Travis side 😒

Thank you @mwkang for contribution, looks great to me, merging to master if there is no further discussion.

@mwkang
Copy link
Contributor Author

mwkang commented Aug 13, 2016

@bzz I think This PR have some trouble merging to master.
Because When bzz leave comment, I also leave comment immediately.
So bot did not recognize this PR.
Could you mind if you check again? (I'm worried about this PR open forever.)

@bzz
Copy link
Member

bzz commented Aug 16, 2016

@mwkang thank you for friendly ping!

@@ -56,6 +55,8 @@
import org.apache.zeppelin.user.AuthenticationInfo;
import org.apache.zeppelin.user.Credentials;

import static org.apache.commons.lang.StringUtils.*;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per project styleguide#s3.3.1-wildcard-imports - could you please replace whiledcard imports?

Copy link
Contributor Author

@mwkang mwkang Aug 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bzz I'm sorry. I removed wild card import.

@bzz
Copy link
Member

bzz commented Aug 16, 2016

Thank you for your patience @mwkang !
Sorry for the late notice, but could you please take a look and make sure that code conforms the project styleguilde?

Will merge to master asap, right after that, if there is no further discussion!

@mwkang
Copy link
Contributor Author

mwkang commented Aug 20, 2016

ping @bzz

@bzz
Copy link
Member

bzz commented Sep 2, 2016

I'm sorry for delay, @mwkang - my plate was full last week.
Thank you for contributing and addressing feedback promptly, merging it in, as there is no further discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants