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-2375]: Avoid modification of CLASSPATH variable. #2235
Conversation
The script previously modified the CLASSPATH variable. This may lead to an undesired side effect, where the zeppelin server classpath is exported to the zeppelin interpreter classpath, see JIRA issue ZEPPELIN-2375 for details. Instead of modifying classpath we now work the other way around and set ZEPPELIN_CLASSPATH or ZEPPELIN_INT_CLASSPATH to include CLASSPATH and then use ZEPPELIN_CLASSPATH or ZEPPELIN_INT_CLASSPATH in the corresponding exec (runner), respectively. See also https://issues.apache.org/jira/browse/ZEPPELIN-2375
hmm, I can see your approach though I can also see changing CLASS_PATH makes sense in some cases (for example, a custom library to be loaded). Do you think there is way to accommodate that? also, is there a way this could be configurable to be backward compatible? |
Hi Felix. I am not sure if I got your point. The user can change CLASSPATH and zeppelin.sh will use that. Also, the user can change ${ZEPPELIN_CLASSPATH_OVERRIDES} and ${ZEPPELIN_INTP_CLASSPATH_OVERRIDES} to add additional files to the class path without changing CLASSPATH. I assume my change is backward compatible. It is just that the script does not change the CLASSPATH variable. But since the script is not supposed to call another script, this should be OK. |
Also: on OS X the zeppelin does not run if you export CLASSPATH. So I assume no body could rely on this issue. |
LGTM |
great, I review again after rereading what you are saying and I think they make sense and starting ZEPPELIN_CLASSPATH with CLASSPATH should make in compatible |
@cfries looks like this PR is now including other changes? Could you rebase? |
@felixcheung Ups. Sorry for that. Will fix asap... |
ba94f22
to
3635ed8
Compare
CI build passed. Merge to master and branch-0.7 if no further comments. |
The script previously modified the CLASSPATH variable. This may lead to an undesired side effect, where the zeppelin server classpath is exported to the zeppelin interpreter classpath, see JIRA issue ZEPPELIN-2375 for details. Instead of modifying classpath we now work the other way around and set ZEPPELIN_CLASSPATH or ZEPPELIN_INT_CLASSPATH to include CLASSPATH and then use ZEPPELIN_CLASSPATH or ZEPPELIN_INT_CLASSPATH in the corresponding exec (runner), respectively. See also https://issues.apache.org/jira/browse/ZEPPELIN-2375 ### What is this PR for? Fixing issue https://issues.apache.org/jira/browse/ZEPPELIN-2375 ### What type of PR is it? Bug Fix ### Todos ### What is the Jira issue? * https://issues.apache.org/jira/browse/ZEPPELIN-2375 ### How should this be tested? Without this fix, the following fails on macOS Sierra (OS X): 1. Open bash, set CLASSPATH to empty string and export it using `export CLASSPATH=`, then start zeppelin via `./bin/zepplin.sh` 2. Create and run a notebook with the md interpreter. 3. Results in an exception. 4. Stop zeppelin. Repeat the test with this fix. See https://issues.apache.org/jira/browse/ZEPPELIN-2375 ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Christian Fries <email@christian-fries.de> Closes #2235 from cfries/master and squashes the following commits: 3635ed8 [Christian Fries] [ZEPPELIN-2375]: Avoid modification of CLASSPATH variable. (cherry picked from commit a3c78a4) Signed-off-by: Lee moon soo <moon@apache.org>
The script previously modified the CLASSPATH variable. This may lead to
an undesired side effect, where the zeppelin server classpath is
exported to the zeppelin interpreter classpath, see JIRA issue
ZEPPELIN-2375 for details. Instead of modifying classpath we now work
the other way around and set ZEPPELIN_CLASSPATH or
ZEPPELIN_INT_CLASSPATH to include CLASSPATH and then use
ZEPPELIN_CLASSPATH or ZEPPELIN_INT_CLASSPATH in the corresponding exec
(runner), respectively.
See also https://issues.apache.org/jira/browse/ZEPPELIN-2375
What is this PR for?
Fixing issue https://issues.apache.org/jira/browse/ZEPPELIN-2375
What type of PR is it?
Bug Fix
Todos
What is the Jira issue?
How should this be tested?
Without this fix, the following fails on macOS Sierra (OS X):
Open bash, set CLASSPATH to empty string and export it using
export CLASSPATH=
, then start zeppelin via./bin/zepplin.sh
Create and run a notebook with the md interpreter.
Results in an exception.
Stop zeppelin. Repeat the test with this fix.
See https://issues.apache.org/jira/browse/ZEPPELIN-2375
Screenshots (if appropriate)
Questions:
Does the licenses files need update?
No
Is there breaking changes for older versions?
No
Does this needs documentation?
No