Skip to content

Commit

Permalink
[ZEPPELIN-5861] Correct shading Prefix (apache#4545)
Browse files Browse the repository at this point in the history
* Add Process ErrorMessage

* change shade prefix

* Run with pre modules to fill the maven reactor

* spark-interpreter has no scala test so we can remove the maven plugin

* Fix flaky python test

* Use shaded version of io.grpc:grpc-netty (io.grrpc:grpc-netty-shaded)

* Adjust interpreter tests

* Remove maven-dependency-plugin, because downloaded artefacts are attached to classpath
  • Loading branch information
Reamer authored Jan 23, 2023
1 parent 0209d0d commit 45b15fe
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 42 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
interpreter-test-non-core:
runs-on: ubuntu-20.04
env:
INTERPRETERS: 'hbase,jdbc,file,flink-cmd,cassandra,elasticsearch,bigquery,alluxio,livy,groovy,java,neo4j,submarine,sparql,mongodb,influxdb'
INTERPRETERS: 'hbase,jdbc,file,flink-cmd,cassandra,elasticsearch,bigquery,alluxio,livy,groovy,java,neo4j,submarine,sparql,mongodb,influxdb,shell'
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -113,7 +113,7 @@ jobs:
restore-keys: |
${{ runner.os }}-zeppelin-
- name: install environment
run: ./mvnw install -DskipTests -am -pl .,zeppelin-interpreter,zeppelin-interpreter-shaded,${INTERPRETERS} -Pscala-2.11 ${MAVEN_ARGS}
run: ./mvnw install -DskipTests -am -pl ${INTERPRETERS} -Pscala-2.11 ${MAVEN_ARGS}
- name: Setup conda environment with python 3.7 and R
uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -126,7 +126,7 @@ jobs:
auto-activate-base: false
use-mamba: true
- name: verify interpreter
run: ./mvnw verify -pl ${INTERPRETERS} -Pscala-2.11 ${MAVEN_ARGS}
run: ./mvnw verify -am -pl ${INTERPRETERS} -Pscala-2.11 ${MAVEN_ARGS}

# test interpreter modules for jupyter, python, rlang
interpreter-test-jupyter-python-rlang:
Expand Down Expand Up @@ -278,10 +278,10 @@ jobs:
use-mamba: true
- name: run tests for flink before 1.15 (exclusive)
if: matrix.flink != '115'
run: ./mvnw test -pl flink/flink-scala-2.11,flink/flink-scala-2.12,flink-cmd,zeppelin-interpreter-integration -Pflink-${{ matrix.flink }} -Phadoop2 -Pintegration -DfailIfNoTests=false -Dtest=org.apache.zeppelin.flink.*Test,FlinkIntegrationTest${{ matrix.flink }} ${MAVEN_ARGS}
run: ./mvnw verify -pl flink/flink-scala-2.11,flink/flink-scala-2.12,flink-cmd,zeppelin-interpreter-integration -am -Pflink-${{ matrix.flink }} -Phadoop2 -Pintegration -DfailIfNoTests=false -Dtest=org.apache.zeppelin.flink.*Test,FlinkIntegrationTest${{ matrix.flink }} ${MAVEN_ARGS}
- name: run tests for flink before 1.15 (inclusive)
if: matrix.flink == '115'
run: ./mvnw test -pl flink/flink-scala-2.12,flink-cmd,zeppelin-interpreter-integration -Pflink-${{ matrix.flink }} -Phadoop2 -Pintegration -DfailIfNoTests=false -Dtest=org.apache.zeppelin.flink.*Test,FlinkIntegrationTest${{ matrix.flink }} ${MAVEN_ARGS}
run: ./mvnw verify -pl flink/flink-scala-2.12,flink-cmd,zeppelin-interpreter-integration -Pflink-${{ matrix.flink }} -am -Phadoop2 -Pintegration -DfailIfNoTests=false -Dtest=org.apache.zeppelin.flink.*Test,FlinkIntegrationTest${{ matrix.flink }} ${MAVEN_ARGS}
- name: Print zeppelin logs
if: always()
run: if [ -d "logs" ]; then cat logs/*; fi
Expand Down Expand Up @@ -381,36 +381,38 @@ jobs:
R -e "IRkernel::installspec()"
- name: run spark-2.4 tests with scala-2.11 and python-${{ matrix.python }}
if: matrix.python == '3.7' # Spark 2.4 doesn't support python 3.8
run: ./mvnw test -pl spark-submit,spark/interpreter -Pspark-2.4 -Pspark-scala-2.11 -DfailIfNoTests=false ${MAVEN_ARGS}
run: |
rm -rf spark/interpreter/metastore_db
./mvnw verify -pl spark-submit,spark/interpreter -am -Dtest=org/apache/zeppelin/spark/* -Pspark-2.4 -Pspark-scala-2.11 -DfailIfNoTests=false ${MAVEN_ARGS}
- name: run spark-2.4 tests with scala-2.12 and python-${{ matrix.python }}
if: matrix.python == '3.7' # Spark 2.4 doesn't support python 3.8
run: |
rm -rf spark/interpreter/metastore_db
./mvnw test -pl spark-submit,spark/interpreter -Pspark-2.4 -Pspark-scala-2.12 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
./mvnw verify -pl spark-submit,spark/interpreter -am -Dtest=org/apache/zeppelin/spark/* -Pspark-2.4 -Pspark-scala-2.12 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
- name: run spark-3.0 tests with scala-2.12 and python-${{ matrix.python }}
run: |
rm -rf spark/interpreter/metastore_db
./mvnw test -pl spark-submit,spark/interpreter -Pspark-3.0 -Pspark-scala-2.12 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
./mvnw verify -pl spark-submit,spark/interpreter -am -Dtest=org/apache/zeppelin/spark/* -Pspark-3.0 -Pspark-scala-2.12 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
- name: run spark-3.1 tests with scala-2.12 and python-${{ matrix.python }}
run: |
rm -rf spark/interpreter/metastore_db
./mvnw test -pl spark-submit,spark/interpreter -Pspark-3.1 -Pspark-scala-2.12 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
./mvnw verify -pl spark-submit,spark/interpreter -am -Dtest=org/apache/zeppelin/spark/* -Pspark-3.1 -Pspark-scala-2.12 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
- name: run spark-3.2 tests with scala-2.12 and python-${{ matrix.python }}
run: |
rm -rf spark/interpreter/metastore_db
./mvnw test -pl spark-submit,spark/interpreter -Pspark-3.2 -Pspark-scala-2.12 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
./mvnw verify -pl spark-submit,spark/interpreter -am -Dtest=org/apache/zeppelin/spark/* -Pspark-3.2 -Pspark-scala-2.12 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
- name: run spark-3.2 tests with scala-2.13 and python-${{ matrix.python }}
run: |
rm -rf spark/interpreter/metastore_db
./mvnw test -pl spark-submit,spark/interpreter -Pspark-3.2 -Pspark-scala-2.13 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
./mvnw verify -pl spark-submit,spark/interpreter -am -Dtest=org/apache/zeppelin/spark/* -Pspark-3.2 -Pspark-scala-2.13 -Phadoop2 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
- name: run spark-3.3 tests with scala-2.12 and python-${{ matrix.python }}
run: |
rm -rf spark/interpreter/metastore_db
./mvnw test -pl spark-submit,spark/interpreter -Pspark-3.3 -Pspark-scala-2.12 -Phadoop3 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
./mvnw verify -pl spark-submit,spark/interpreter -am -Dtest=org/apache/zeppelin/spark/* -Pspark-3.3 -Pspark-scala-2.12 -Phadoop3 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
- name: run spark-3.3 tests with scala-2.13 and python-${{ matrix.python }}
run: |
rm -rf spark/interpreter/metastore_db
./mvnw test -pl spark-submit,spark/interpreter -Pspark-3.3 -Pspark-scala-2.13 -Phadoop3 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
./mvnw verify -pl spark-submit,spark/interpreter -am -Dtest=org/apache/zeppelin/spark/* -Pspark-3.3 -Pspark-scala-2.13 -Phadoop3 -Pintegration -DfailIfNoTests=false ${MAVEN_ARGS}
livy-0-7-with-spark-2-2-0-under-python3:
runs-on: ubuntu-20.04
Expand Down
4 changes: 0 additions & 4 deletions flink/flink-scala-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,6 @@ public void run() {
InterpreterResult result = interpreter.interpret("import time\ntime.sleep(1000)",
getInterpreterContext());
waiter.assertEquals(InterpreterResult.Code.ERROR, result.code());
waiter.assertEquals(
"IPython kernel is abnormally exited, please check your code and log.",
result.message().get(0).getData());
} catch (InterpreterException e) {
waiter.fail("Should not throw exception\n" + ExceptionUtils.getStackTrace(e));
}
Expand Down
13 changes: 0 additions & 13 deletions spark/interpreter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@
<groupId>net.sf.py4j</groupId>
<artifactId>py4j</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -161,10 +157,6 @@
<groupId>net.sf.py4j</groupId>
<artifactId>py4j</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -433,11 +425,6 @@
</executions>
</plugin>

<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions submarine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-python</artifactId>
<version>0.11.0-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.zeppelin</groupId>
Expand All @@ -69,7 +69,7 @@
<dependency>
<groupId>org.apache.zeppelin</groupId>
<artifactId>zeppelin-shell</artifactId>
<version>0.11.0-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
Expand Down
2 changes: 1 addition & 1 deletion zeppelin-interpreter-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<description>Zeppelin Interpreter Shaded</description>

<properties>
<shaded.dependency.prefix>org.apache.zeppelin.shaded</shaded.dependency.prefix>
<shaded.dependency.prefix>shaded.org.apache.zeppelin</shaded.dependency.prefix>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void onProcessComplete(int exitValue) {
@Override
public void onProcessFailed(ExecuteException e) {
LOGGER.warn("Process with cmd {} is failed due to", commandLine, e);

LOGGER.warn("Process ErrorMessage: \n{}", getErrorMessage());
errorMessage = ExceptionUtils.getStackTrace(e);
transition(State.TERMINATED);
}
Expand Down
3 changes: 2 additions & 1 deletion zeppelin-jupyter-interpreter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@

<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
<artifactId>grpc-netty-shaded</artifactId>
<version>${grpc.version}</version>
<scope>runtime</scope>
</dependency>

<dependency>
Expand Down
4 changes: 0 additions & 4 deletions zeppelin-zengine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,6 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 45b15fe

Please sign in to comment.