This is an automated email from the ASF dual-hosted git repository.

pdallig pushed a commit to branch branch-0.12
in repository https://gitbox.apache.org/repos/asf/zeppelin.git


The following commit(s) were added to refs/heads/branch-0.12 by this push:
     new 0234fb3163 [ZEPPELIN-6179] Switch to ubuntu 24.04 for GitHub-CI 
workflows
0234fb3163 is described below

commit 0234fb3163e5cdb9107f95874334d9183ef1b56a
Author: Philipp Dallig <philipp.dal...@gmail.com>
AuthorDate: Thu Apr 17 08:38:48 2025 +0200

    [ZEPPELIN-6179] Switch to ubuntu 24.04 for GitHub-CI workflows
    
    ### What is this PR for?
    Update CI Runner to ubuntu 24.04
    
    ### What type of PR is it?
    Hot Fix
    
    ### What is the Jira issue?
    * https://issues.apache.org/jira/browse/ZEPPELIN-6179
    
    ### How should this be tested?
    * CI
    
    ### Questions:
    * Does the license files need to update? No
    * Is there breaking changes for older versions? No
    * Does this needs documentation? No
    
    
    Closes #4916 from Reamer/ubuntu_24_04.
    
    Signed-off-by: Philipp Dallig <philipp.dal...@gmail.com>
---
 .github/workflows/core.yml                         | 18 ++++++------
 .github/workflows/frontend.yml                     |  6 ++--
 .github/workflows/quick.yml                        |  4 +--
 zeppelin-plugins/notebookrepo/mongo/pom.xml        |  2 +-
 .../notebook/repo/MongoNotebookRepoTest.java       | 34 +++++++---------------
 5 files changed, 26 insertions(+), 38 deletions(-)

diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml
index 89c3a4e174..7a4ca6ddf3 100644
--- a/.github/workflows/core.yml
+++ b/.github/workflows/core.yml
@@ -36,7 +36,7 @@ jobs:
   # test on core-modules 
(zeppelin-interpreter,zeppelin-zengine,zeppelin-server),
   # some interpreters are included, because zeppelin-server test depends on 
them: spark, shell & markdown
   core-modules:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
       matrix:
@@ -87,7 +87,7 @@ jobs:
 
   # test interpreter modules except spark, flink, python, rlang, jupyter
   interpreter-test-non-core:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
       matrix:
@@ -132,7 +132,7 @@ jobs:
 
   # test interpreter modules for jupyter, python, rlang
   interpreter-test-jupyter-python-rlang:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
       matrix:
@@ -181,7 +181,7 @@ jobs:
 
   # zeppelin integration test except Spark & Flink
   zeppelin-integration-test:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
       matrix:
@@ -234,7 +234,7 @@ jobs:
         run: if [ -d "logs" ]; then cat logs/*; fi
 
   flink-test-and-flink-integration-test:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
       matrix:
@@ -288,7 +288,7 @@ jobs:
 
 
   spark-integration-test:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
       matrix:
@@ -336,7 +336,7 @@ jobs:
 
   # test on spark for each spark version & scala version
   spark-test:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
       matrix:
@@ -398,7 +398,7 @@ jobs:
   # Livy 0.8.0 tested with Spark 3.2
   # 
https://github.com/apache/incubator-livy/blob/v0.8.0-incubating/dev/docker/livy-dev-spark/Dockerfile#L20
   livy-0-8-with-spark-3-2-under-python39:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     steps:
       - name: Checkout
         uses: actions/checkout@v4
@@ -445,7 +445,7 @@ jobs:
           ./mvnw verify -pl livy ${MAVEN_ARGS}
 
   default-build:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
       matrix:
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml
index 1be63e5a26..43108bbb38 100644
--- a/.github/workflows/frontend.yml
+++ b/.github/workflows/frontend.yml
@@ -30,7 +30,7 @@ permissions:
 
 jobs:
   run-e2e-tests-in-zeppelin-web:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     steps:
       - name: Checkout
         uses: actions/checkout@v4
@@ -61,7 +61,7 @@ jobs:
         run: if [ -d "logs" ]; then cat logs/*; fi
 
   run-tests-in-zeppelin-web-angular:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     steps:
       - name: Checkout
         uses: actions/checkout@v4
@@ -87,7 +87,7 @@ jobs:
         run: xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" 
./mvnw package -pl zeppelin-web-angular ${MAVEN_ARGS}
 
   test-selenium-with-spark-module-for-spark-3-4:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     defaults:
       run:
         shell: bash -l {0}
diff --git a/.github/workflows/quick.yml b/.github/workflows/quick.yml
index d32c9f7838..27c9493daf 100644
--- a/.github/workflows/quick.yml
+++ b/.github/workflows/quick.yml
@@ -25,7 +25,7 @@ env:
 
 jobs:
   license-check:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     steps:
       - name: Checkout
         uses: actions/checkout@v4
@@ -37,7 +37,7 @@ jobs:
       - name: Check Rat
         run: ./mvnw apache-rat:check -Prat ${MAVEN_ARGS}
   maven-validate:
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
     strategy:
       fail-fast: false
     steps:
diff --git a/zeppelin-plugins/notebookrepo/mongo/pom.xml 
b/zeppelin-plugins/notebookrepo/mongo/pom.xml
index 542897af55..3cb3d933f7 100644
--- a/zeppelin-plugins/notebookrepo/mongo/pom.xml
+++ b/zeppelin-plugins/notebookrepo/mongo/pom.xml
@@ -48,7 +48,7 @@
         <dependency>
             <groupId>de.flapdoodle.embed</groupId>
             <artifactId>de.flapdoodle.embed.mongo</artifactId>
-            <version>3.2.4</version>
+            <version>4.20.0</version>
             <scope>test</scope>
             <exclusions>
                 <exclusion>
diff --git 
a/zeppelin-plugins/notebookrepo/mongo/src/test/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepoTest.java
 
b/zeppelin-plugins/notebookrepo/mongo/src/test/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepoTest.java
index 0b49e668a5..11d14f16bc 100644
--- 
a/zeppelin-plugins/notebookrepo/mongo/src/test/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepoTest.java
+++ 
b/zeppelin-plugins/notebookrepo/mongo/src/test/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepoTest.java
@@ -21,14 +21,12 @@ import static 
org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars.ZEPPELIN_N
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 import java.io.IOException;
-import java.net.ServerSocket;
 import java.util.Map;
-import de.flapdoodle.embed.mongo.MongodExecutable;
-import de.flapdoodle.embed.mongo.MongodStarter;
-import de.flapdoodle.embed.mongo.config.MongodConfig;
-import de.flapdoodle.embed.mongo.config.Net;
 import de.flapdoodle.embed.mongo.distribution.Version;
-import de.flapdoodle.embed.process.runtime.Network;
+import de.flapdoodle.embed.mongo.transitions.Mongod;
+import de.flapdoodle.embed.mongo.transitions.RunningMongodProcess;
+import de.flapdoodle.reverse.TransitionWalker.ReachedState;
+
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.notebook.GsonNoteParser;
 import org.apache.zeppelin.notebook.Note;
@@ -42,7 +40,7 @@ import org.junit.jupiter.api.Test;
 
 class MongoNotebookRepoTest {
 
-  private MongodExecutable mongodExecutable;
+  private ReachedState<RunningMongodProcess> mongodProcess;
 
   private ZeppelinConfiguration zConf;
   private NoteParser noteParser;
@@ -53,21 +51,11 @@ class MongoNotebookRepoTest {
   void setUp() throws IOException {
     zConf = ZeppelinConfiguration.load();
     noteParser = new GsonNoteParser(zConf);
-    String bindIp = "localhost";
-    ServerSocket socket = new ServerSocket(0);
-    int port = socket.getLocalPort();
-    socket.close();
-
-    MongodConfig mongodConfig = MongodConfig.builder()
-        .version(Version.Main.PRODUCTION)
-        .net(new Net(bindIp, port, Network.localhostIsIPv6()))
-        .build();
-
-    mongodExecutable = MongodStarter.getDefaultInstance()
-        .prepare(mongodConfig);
-    mongodExecutable.start();
 
-    zConf.setProperty(ZEPPELIN_NOTEBOOK_MONGO_URI.getVarName(), "mongodb://" + 
bindIp + ":" + port);
+    ReachedState<RunningMongodProcess> mongodProcess = 
Mongod.instance().start(Version.Main.V8_0);
+    String host = mongodProcess.current().getServerAddress().getHost();
+    int port = mongodProcess.current().getServerAddress().getPort();
+    zConf.setProperty(ZEPPELIN_NOTEBOOK_MONGO_URI.getVarName(), "mongodb://" + 
host + ":" + port);
 
     notebookRepo = new MongoNotebookRepo();
     notebookRepo.init(zConf, noteParser);
@@ -75,8 +63,8 @@ class MongoNotebookRepoTest {
 
   @AfterEach
   void tearDown() throws IOException {
-    if (mongodExecutable != null) {
-      mongodExecutable.stop();
+    if (mongodProcess != null) {
+      mongodProcess.close();
     }
   }
 

Reply via email to