Skip to content

ZEPPELIN-346 Fix NotebookTest not passing non-default group to NoteIn… - #347

Closed
RPCMoritz wants to merge 1 commit into
apache:masterfrom
RPCMoritz:patch-2
Closed

ZEPPELIN-346 Fix NotebookTest not passing non-default group to NoteIn…#347
RPCMoritz wants to merge 1 commit into
apache:masterfrom
RPCMoritz:patch-2

Conversation

@RPCMoritz

Copy link
Copy Markdown
Contributor

…terpreterLoader

This implements the actually required logic for this test to pass and should mostly showcase that the NoteIntepreterLoader logic is flawed/broken. Nonetheless this would fix the test in the short term and be a step towards actually documenting the weird behaviour.

I will try to amend this PR (or create a separate one) to actually approach the underlying issue

…terpreterLoader
This implements the actually required logic for this test to pass and should mostly showcase that the NoteIntepreterLoader logic is flawed/broken. Nonetheless this would fix the test in the short term and be a step towards actually documenting the weird behaviour.
I will try to amend this PR (or create a separate one) to actually approach the underlying issue
@RPCMoritz

Copy link
Copy Markdown
ContributorAuthor

@Leemoonsoo if you plan to release a new version, then you should probably merge this as-is.
A fix of the underlying logic is going to be more involved and won't happen too soon - I'll still attempt it though.

@Leemoonsoo

Copy link
Copy Markdown
Member

@RPCMoritz Thanks for making the patch and interest to Zeppelin.

Selecting interpreter using %[group].[name] notation introduced by https://issues.apache.org/jira/browse/ZEPPELIN-74. Main reason the logic working in this way is to keep compatibility with previous behavior, ie. to keep selecting interpreter simple.
Guessing interpreter from partial string (%[group] or %[name]) is intended behavior.
Only confusion zeppelin does not handle right now is when there're '.' (dot) in [group] or [name] string.

So, I'd like to understand more about why do you think there're bad test and ambiguous logic, and what are you trying to fix in the end. Could you explain more?

@RPCMoritz

Copy link
Copy Markdown
ContributorAuthor

I believe the test currently only passes CI, because of the broken implementation of using System properties. Without setting group.name explicetely, the guessing code does not correctly guess the second interpreter by name only, because the structure used does not match how it's written into system properties (in this test). The actual issue may be in the module writing system properties, but I assert that using System properties in this way is not ideal, and using API calls or a dedicated configuration object instead is more useful (but still not generally independent across multiple notebooks and therefore influenced by tests being run in parallel)

So the current fix to the test makes tests pass in linear execution.
My proposed fix of the actual logic is to either
a) fix writing/parsing System properties
or
b) move to an object oriented design and remove the use of System properties for internal variables, if possible.

I looked at this issue together with @FRosner , who gave his commentary in the JIRA issue, which may be helpful in making my point.

@Leemoonsoo

Copy link
Copy Markdown
Member

Could you help me to reproduce the test error? Because of the test also passes in my machines, both using mvn test command and run inside of IDE.

@RPCMoritz

Copy link
Copy Markdown
ContributorAuthor

On any machine I attempted to build, I got the test failure (interpreter not found). I'll try again with the current master on yet another machine to see if I can still reproduce.

@FRosner

Copy link
Copy Markdown
Contributor

@Leemoonsoo the test also failed on my machine at the time the patch was proposed.

I still think, however, that passing two parameters as one by splitting a String is a very bad idea. See https://issues.apache.org/jira/browse/ZEPPELIN-346?focusedCommentId=14960634&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14960634

@bzz

bzz commented Jan 5, 2016

Copy link
Copy Markdown
Member

@RPCMoritz@FRosner does the issue still exist on the latest master?

@RPCMoritz

Copy link
Copy Markdown
ContributorAuthor

I will re-test on my systems ASAP.

@RPCMoritz

Copy link
Copy Markdown
ContributorAuthor

testSelectingReplImplementation(org.apache.zeppelin.notebook.NotebookTest) Time elapsed: 0.032 sec <<< ERROR!
org.apache.zeppelin.interpreter.InterpreterException: mock2 interpreter not found
at org.apache.zeppelin.notebook.NoteInterpreterLoader.get(NoteInterpreterLoader.java:148)
at org.apache.zeppelin.notebook.Note.run(Note.java:365)
at org.apache.zeppelin.notebook.NotebookTest.testSelectingReplImplementation(NotebookTest.java:119)

with

Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T18:29:23+01:00)
Maven home: /usr/share/maven-bin-3.2
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /opt/oracle-jdk-bin-1.7.0.80/jre
Default locale: en_US, platform encoding: ISO-8859-15
OS name: "linux", version: "3.16.5-gentoo", arch: "amd64", family: "unix"

So, still broken.

lelou6666 pushed a commit to lelou6666/incubator-zeppelin that referenced this pull request Mar 25, 2016
@asfgitasfgit closed this in c38a0a0May 9, 2018
asfgit pushed a commit that referenced this pull request May 9, 2018
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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@RPCMoritz@Leemoonsoo@FRosner@bzz