Skip to content

Commit

Permalink
[HOTFIX] Fix CI failure
Browse files Browse the repository at this point in the history
  • Loading branch information
zjffdu committed Feb 21, 2022
1 parent 88bf9b1 commit c99e75c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 26 deletions.
65 changes: 44 additions & 21 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@ jobs:
activate-environment: python_3_with_R
environment-file: testing/env_python_${{ matrix.python }}_with_R.yml
python-version: ${{ matrix.python }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
channel-priority: strict
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
R -e "devtools::install_github('IRkernel/IRkernel')"
R -e "IRkernel::installspec()"
conda list
conda info
- name: install application with some interpreter
run: mvn install -Pbuild-distr -DskipRat -DskipTests -pl zeppelin-server,zeppelin-web,spark-submit,spark/spark-dependencies,markdown,angular,shell -am -Phelium-dev -Pexamples -P${{ matrix.hadoop }} -B
- name: install and test plugins
Expand Down Expand Up @@ -102,11 +101,13 @@ jobs:
activate-environment: python_3_with_R_and_tensorflow
environment-file: testing/env_python_3_with_R_and_tensorflow.yml
python-version: 3.7
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
R -e "devtools::install_github('IRkernel/IRkernel')"
R -e "IRkernel::installspec()"
- name: verify interpreter
run: mvn verify -DskipRat -am -pl .,zeppelin-interpreter,zeppelin-interpreter-shaded,${INTERPRETERS} -Pscala-2.10 -B
Expand Down Expand Up @@ -137,11 +138,13 @@ jobs:
activate-environment: python_3_with_R
environment-file: testing/env_python_3_with_R.yml
python-version: 3.7
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
R -e "devtools::install_github('IRkernel/IRkernel')"
R -e "IRkernel::installspec()"
- name: install environment
run: |
Expand Down Expand Up @@ -180,7 +183,11 @@ jobs:
activate-environment: python_3_with_flink
environment-file: testing/env_python_3_with_flink_${{ matrix.flink }}.yml
python-version: 3.7
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: install environment
run: |
mvn install -DskipTests -DskipRat -am -pl flink/flink-scala-2.11,flink/flink-scala-2.12,flink-cmd,zeppelin-interpreter-integration -Pflink-${{ matrix.flink }} -Pintegration -B
Expand Down Expand Up @@ -214,11 +221,13 @@ jobs:
activate-environment: python_3_with_R
environment-file: testing/env_python_3_with_R.yml
python-version: 3.7
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
R -e "devtools::install_github('IRkernel/IRkernel')"
R -e "IRkernel::installspec()"
- name: install environment
run: |
Expand Down Expand Up @@ -257,11 +266,13 @@ jobs:
activate-environment: python_3_with_R
environment-file: testing/env_python_3_with_R.yml
python-version: 3.7
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
R -e "devtools::install_github('IRkernel/IRkernel')"
R -e "IRkernel::installspec()"
- name: install environment
run: |
Expand Down Expand Up @@ -297,11 +308,13 @@ jobs:
activate-environment: python_3_with_R
environment-file: testing/env_python_3_with_R.yml
python-version: 3.7
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
R -e "devtools::install_github('IRkernel/IRkernel')"
R -e "IRkernel::installspec()"
- name: install environment
run: |
Expand Down Expand Up @@ -340,11 +353,13 @@ jobs:
activate-environment: python_3_with_R
environment-file: testing/env_python_${{ matrix.python }}_with_R.yml
python-version: ${{ matrix.python }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
R -e "devtools::install_github('IRkernel/IRkernel')"
R -e "IRkernel::installspec()"
- name: install environment
run: |
Expand Down Expand Up @@ -383,11 +398,13 @@ jobs:
activate-environment: python_3_with_R
environment-file: testing/env_python_${{ matrix.python }}_with_R.yml
python-version: ${{ matrix.python }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
R -e "devtools::install_github('IRkernel/IRkernel')"
R -e "IRkernel::installspec()"
- name: install environment
run: mvn install -DskipTests -DskipRat -pl spark-submit,spark/spark-dependencies -am -Pspark-3.1 -Pspark-scala-2.12 -Phadoop2 -B
Expand Down Expand Up @@ -425,11 +442,13 @@ jobs:
activate-environment: python_3_with_R
environment-file: testing/env_python_${{ matrix.python }}_with_R.yml
python-version: ${{ matrix.python }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: Make IRkernel available to Jupyter
run: |
R -e "install.packages('devtools', repos = 'http://cran.us.r-project.org')"
R -e "devtools::install_github('IRkernel/IRkernel')"
R -e "IRkernel::installspec()"
- name: install environment
run: mvn install -DskipTests -DskipRat -pl spark-submit,spark/spark-dependencies -am -Pspark-3.2 -Pspark-scala-2.12 -Phadoop2 -B
Expand Down Expand Up @@ -463,7 +482,11 @@ jobs:
activate-environment: python_3_with_R
environment-file: testing/env_python_3_with_R.yml
python-version: 3.7
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
use-mamba: true
- name: install environment
run: |
mvn install -DskipTests -DskipRat -pl livy -am -B
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,17 @@ private String extractScalaVersion(SparkConf conf) throws InterpreterException {
if (conf.contains("zeppelin.spark.scala.version")) {
scalaVersionString = conf.get("zeppelin.spark.scala.version");
} else {
scalaVersionString = scala.util.Properties.versionString();
scalaVersionString = scala.util.Properties.versionNumberString();
}
LOGGER.info("Using Scala: " + scalaVersionString);

if (StringUtils.isEmpty(scalaVersionString)) {
throw new InterpreterException("Scala Version is empty");
} else if (scalaVersionString.contains("2.10")) {
} else if (scalaVersionString.startsWith("2.10")) {
return "2.10";
} else if (scalaVersionString.contains("2.11")) {
} else if (scalaVersionString.startsWith("2.11")) {
return "2.11";
} else if (scalaVersionString.contains("2.12")) {
} else if (scalaVersionString.startsWith("2.12")) {
return "2.12";
} else {
throw new InterpreterException("Unsupported scala version: " + scalaVersionString);
Expand All @@ -286,7 +286,7 @@ public boolean isScala212() throws InterpreterException {
}

public boolean isScala210() throws InterpreterException {
return extractScalaVersion().equals("2.10");
return scalaVersion.equals("2.10");
}

private List<String> getDependencyFiles() throws InterpreterException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public Map<String, String> buildEnvFromProperties(InterpreterLaunchContext conte
String scalaVersion = null;
try {
scalaVersion = detectSparkScalaVersion(getEnv("SPARK_HOME"), env);
LOGGER.info("Scala version: {}", scalaVersion);
context.getProperties().put("zeppelin.spark.scala.version", scalaVersion);
} catch (Exception e) {
throw new IOException("Fail to detect scala version, the reason is:"+ e.getMessage());
Expand Down

0 comments on commit c99e75c

Please sign in to comment.