This is an automated email from the ASF dual-hosted git repository. zjffdu pushed a commit to branch branch-0.9 in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/branch-0.9 by this push: new 2da9aa1 [HOTFIX] CI failed due to dns reverse lookup issue 2da9aa1 is described below commit 2da9aa128ae5fe65c337faf85b3285682f2aebe0 Author: Jeff Zhang <zjf...@apache.org> AuthorDate: Mon Apr 19 10:39:28 2021 +0800 [HOTFIX] CI failed due to dns reverse lookup issue ### What is this PR for? This is a hotfix to fix the ci failure due to dns reverse lookup issue. Some of the code is copied from pulsar project. https://github.com/lhotari/pulsar/commit/b4300db307f542d2ece7ad9f487f078d00210a27 ### What type of PR is it? [ Hot Fix ] ### Todos * [ ] - Task ### What is the Jira issue? * ### How should this be tested? * CI pass ### 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: Jeff Zhang <zjf...@apache.org> Closes #4096 from zjffdu/ci_test and squashes the following commits: ed91ba328 [Jeff Zhang] fix comment 6a0d9fd1c [Jeff Zhang] save (cherry picked from commit 4cb0a02ed0bfb643ce4bd6faa45e362ff1dc5c18) Signed-off-by: Jeff Zhang <zjf...@apache.org> --- .github/actions/tune-runner-vm/action.yml | 31 ++++++++++++++++++++++ .github/workflows/core.yml | 23 ++++++++++++++++ .github/workflows/frontend.yml | 8 ++++++ .../apache/zeppelin/flink/SqlInterpreterTest.java | 2 ++ .../python/PythonInterpreterMatplotlibTest.java | 1 + .../python/PythonInterpreterPandasSqlTest.java | 1 + .../apache/zeppelin/r/ShinyInterpreterTest.java | 4 +-- .../zeppelin/spark/SparkShinyInterpreterTest.java | 2 +- .../zeppelin/integration/JdbcIntegrationTest.java | 3 +++ .../zeppelin/integration/SparkIntegrationTest.java | 2 ++ .../integration/ZSessionIntegrationTest.java | 2 ++ 11 files changed, 76 insertions(+), 3 deletions(-) diff --git a/.github/actions/tune-runner-vm/action.yml b/.github/actions/tune-runner-vm/action.yml new file mode 100644 index 0000000..59f977c --- /dev/null +++ b/.github/actions/tune-runner-vm/action.yml @@ -0,0 +1,31 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +name: Tune Runner VM performance +description: tunes the GitHub Runner VM operation system +runs: + using: composite + steps: + - run: | + if [[ "$OSTYPE" == "linux-gnu"* ]]; then + # Ensure that reverse lookups for current hostname are handled properly + # Add the current IP address, long hostname and short hostname record to /etc/hosts file + echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + fi + shell: bash \ No newline at end of file diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index f4f1f51..f7b6562 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -17,6 +17,9 @@ env: -Dmaven.wagon.http.retryHandler.count=3 ZEPPELIN_HELIUM_REGISTRY: helium SPARK_PRINT_LAUNCH_COMMAND: "true" + SPARK_LOCAL_IP: 127.0.0.1 + ZEPPELIN_LOCAL_IP: 127.0.0.1 + # Use the bash login, because we are using miniconda defaults: run: @@ -32,6 +35,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -71,6 +76,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -101,6 +108,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -139,6 +148,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -170,6 +181,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -207,6 +220,8 @@ jobs: run: sudo systemctl start mysql.service - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -242,6 +257,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -276,6 +293,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -310,6 +329,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -342,6 +363,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 2f12456..8520396 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -17,6 +17,8 @@ env: -Dmaven.wagon.http.retryHandler.count=3 ZEPPELIN_HELIUM_REGISTRY: helium SPARK_PRINT_LAUNCH_COMMAND: "true" + SPARK_LOCAL_IP: 127.0.0.1 + ZEPPELIN_LOCAL_IP: 127.0.0.1 INTERPRETERS: '!beam,!hbase,!pig,!jdbc,!file,!flink,!ignite,!kylin,!lens,!cassandra,!elasticsearch,!bigquery,!alluxio,!scio,!livy,!groovy,!sap,!java,!geode,!neo4j,!hazelcastjet,!submarine,!sparql,!mongodb' jobs: @@ -25,6 +27,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -47,6 +51,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: @@ -71,6 +77,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Tune Runner VM + uses: ./.github/actions/tune-runner-vm - name: Set up JDK 8 uses: actions/setup-java@v1 with: diff --git a/flink/interpreter/src/test/java/org/apache/zeppelin/flink/SqlInterpreterTest.java b/flink/interpreter/src/test/java/org/apache/zeppelin/flink/SqlInterpreterTest.java index 267a363..5fd7e52 100644 --- a/flink/interpreter/src/test/java/org/apache/zeppelin/flink/SqlInterpreterTest.java +++ b/flink/interpreter/src/test/java/org/apache/zeppelin/flink/SqlInterpreterTest.java @@ -98,6 +98,8 @@ public abstract class SqlInterpreterTest { p.setProperty("zeppelin.flink.hive.version", "2.3.4"); p.setProperty("zeppelin.pyflink.useIPython", "false"); p.setProperty("local.number-taskmanager", "4"); + p.setProperty("zeppelin.python.gatewayserver_address", "127.0.0.1"); + File hiveConfDir = Files.createTempDir(); hiveShell.getHiveConf().writeXml(new FileWriter(new File(hiveConfDir, "hive-site.xml"))); p.setProperty("HIVE_CONF_DIR", hiveConfDir.getAbsolutePath()); diff --git a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterMatplotlibTest.java b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterMatplotlibTest.java index 8326612..8092759 100644 --- a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterMatplotlibTest.java +++ b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterMatplotlibTest.java @@ -52,6 +52,7 @@ public class PythonInterpreterMatplotlibTest implements InterpreterOutputListene p.setProperty("zeppelin.python", "python"); p.setProperty("zeppelin.python.maxResult", "100"); p.setProperty("zeppelin.python.useIPython", "false"); + p.setProperty("zeppelin.python.gatewayserver_address", "127.0.0.1"); intpGroup = new InterpreterGroup(); diff --git a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java index 8f6cab2..beae44a 100644 --- a/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java +++ b/python/src/test/java/org/apache/zeppelin/python/PythonInterpreterPandasSqlTest.java @@ -66,6 +66,7 @@ public class PythonInterpreterPandasSqlTest implements InterpreterOutputListener p.setProperty("zeppelin.python", "python"); p.setProperty("zeppelin.python.maxResult", "100"); p.setProperty("zeppelin.python.useIPython", "false"); + p.setProperty("zeppelin.python.gatewayserver_address", "127.0.0.1"); intpGroup = new InterpreterGroup(); diff --git a/rlang/src/test/java/org/apache/zeppelin/r/ShinyInterpreterTest.java b/rlang/src/test/java/org/apache/zeppelin/r/ShinyInterpreterTest.java index 91d026e..0e2e7e6 100644 --- a/rlang/src/test/java/org/apache/zeppelin/r/ShinyInterpreterTest.java +++ b/rlang/src/test/java/org/apache/zeppelin/r/ShinyInterpreterTest.java @@ -101,7 +101,7 @@ public class ShinyInterpreterTest { Thread.sleep(5 * 1000); // extract shiny url List<InterpreterResultMessage> resultMessages = context2.out.toInterpreterResultMessage(); - assertEquals(1, resultMessages.size()); + assertEquals(resultMessages.toString(), 1, resultMessages.size()); assertEquals(InterpreterResult.Type.HTML, resultMessages.get(0).getType()); String resultMessageData = resultMessages.get(0).getData(); assertTrue(resultMessageData, resultMessageData.contains("<iframe")); @@ -205,7 +205,7 @@ public class ShinyInterpreterTest { // wait for the shiny app start Thread.sleep(5 * 1000); List<InterpreterResultMessage> resultMessages = context2.out.toInterpreterResultMessage(); - assertEquals(1, resultMessages.size()); + assertEquals(resultMessages.toString(), 1, resultMessages.size()); assertEquals(InterpreterResult.Type.HTML, resultMessages.get(0).getType()); String resultMessageData = resultMessages.get(0).getData(); assertTrue(resultMessageData, resultMessageData.contains("<iframe")); diff --git a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkShinyInterpreterTest.java b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkShinyInterpreterTest.java index 14f572b..77cd54b 100644 --- a/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkShinyInterpreterTest.java +++ b/spark/interpreter/src/test/java/org/apache/zeppelin/spark/SparkShinyInterpreterTest.java @@ -102,7 +102,7 @@ public class SparkShinyInterpreterTest extends ShinyInterpreterTest { Thread.sleep(5 * 1000); // extract shiny url List<InterpreterResultMessage> resultMessages = context2.out.toInterpreterResultMessage(); - assertEquals(1, resultMessages.size()); + assertEquals(resultMessages.toString(), 1, resultMessages.size()); assertEquals(InterpreterResult.Type.HTML, resultMessages.get(0).getType()); String resultMessageData = resultMessages.get(0).getData(); assertTrue(resultMessageData, resultMessageData.contains("<iframe")); diff --git a/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/JdbcIntegrationTest.java b/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/JdbcIntegrationTest.java index a86b916..c6fbaeb 100644 --- a/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/JdbcIntegrationTest.java +++ b/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/JdbcIntegrationTest.java @@ -90,6 +90,9 @@ public class JdbcIntegrationTest { assertEquals("c1\tc2\n1\t2\n", interpreterResult.message().get(0).getData()); // read table_1 from python interpreter + InterpreterSetting pythonInterpreterSetting = interpreterSettingManager.getInterpreterSettingByName("python"); + pythonInterpreterSetting.setProperty("zeppelin.python.gatewayserver_address", "127.0.0.1"); + Interpreter pythonInterpreter = interpreterFactory.getInterpreter("python", new ExecutionContext("user1", "note1", "test")); assertNotNull("PythonInterpreter is null", pythonInterpreter); diff --git a/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/SparkIntegrationTest.java b/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/SparkIntegrationTest.java index 6775cac..890d5a3 100644 --- a/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/SparkIntegrationTest.java +++ b/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/SparkIntegrationTest.java @@ -98,6 +98,8 @@ public abstract class SparkIntegrationTest { InterpreterSetting sparkInterpreterSetting = interpreterSettingManager.getInterpreterSettingByName("spark"); sparkInterpreterSetting.setProperty("spark.jars.packages", "com.maxmind.geoip2:geoip2:2.5.0"); sparkInterpreterSetting.setProperty("SPARK_PRINT_LAUNCH_COMMAND", "true"); + sparkInterpreterSetting.setProperty("zeppelin.python.gatewayserver_address", "127.0.0.1"); + MavenXpp3Reader reader = new MavenXpp3Reader(); Model model = reader.read(new FileReader("pom.xml")); sparkInterpreterSetting.setProperty("spark.jars", new File("target/zeppelin-interpreter-integration-" + model.getVersion() + ".jar").getAbsolutePath()); diff --git a/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/ZSessionIntegrationTest.java b/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/ZSessionIntegrationTest.java index 98a833d..0e9fd90 100644 --- a/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/ZSessionIntegrationTest.java +++ b/zeppelin-interpreter-integration/src/test/java/org/apache/zeppelin/integration/ZSessionIntegrationTest.java @@ -392,6 +392,7 @@ public class ZSessionIntegrationTest extends AbstractTestRestApi { @Test public void testZSession_Python() throws Exception { Map<String, String> intpProperties = new HashMap<>(); + intpProperties.put("zeppelin.python.gatewayserver_address", "127.0.0.1"); ZSession session = ZSession.builder() .setClientConfig(clientConfig) @@ -434,6 +435,7 @@ public class ZSessionIntegrationTest extends AbstractTestRestApi { @Test public void testZSessionCleanup() throws Exception { Map<String, String> intpProperties = new HashMap<>(); + intpProperties.put("zeppelin.python.gatewayserver_address", "127.0.0.1"); ZSession session = ZSession.builder() .setClientConfig(clientConfig)