Skip to content

Commit 2f31f8c

Browse files
authored
[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 <[email protected]>
1 parent 53be157 commit 2f31f8c

File tree

5 files changed

+26
-38
lines changed

5 files changed

+26
-38
lines changed

.github/workflows/core.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
# test on core-modules (zeppelin-interpreter,zeppelin-zengine,zeppelin-server),
3737
# some interpreters are included, because zeppelin-server test depends on them: spark, shell & markdown
3838
core-modules:
39-
runs-on: ubuntu-20.04
39+
runs-on: ubuntu-24.04
4040
strategy:
4141
fail-fast: false
4242
matrix:
@@ -87,7 +87,7 @@ jobs:
8787

8888
# test interpreter modules except spark, flink, python, rlang, jupyter
8989
interpreter-test-non-core:
90-
runs-on: ubuntu-20.04
90+
runs-on: ubuntu-24.04
9191
strategy:
9292
fail-fast: false
9393
matrix:
@@ -132,7 +132,7 @@ jobs:
132132

133133
# test interpreter modules for jupyter, python, rlang
134134
interpreter-test-jupyter-python-rlang:
135-
runs-on: ubuntu-20.04
135+
runs-on: ubuntu-24.04
136136
strategy:
137137
fail-fast: false
138138
matrix:
@@ -181,7 +181,7 @@ jobs:
181181
182182
# zeppelin integration test except Spark & Flink
183183
zeppelin-integration-test:
184-
runs-on: ubuntu-20.04
184+
runs-on: ubuntu-24.04
185185
strategy:
186186
fail-fast: false
187187
matrix:
@@ -234,7 +234,7 @@ jobs:
234234
run: if [ -d "logs" ]; then cat logs/*; fi
235235

236236
flink-test-and-flink-integration-test:
237-
runs-on: ubuntu-20.04
237+
runs-on: ubuntu-24.04
238238
strategy:
239239
fail-fast: false
240240
matrix:
@@ -288,7 +288,7 @@ jobs:
288288

289289

290290
spark-integration-test:
291-
runs-on: ubuntu-20.04
291+
runs-on: ubuntu-24.04
292292
strategy:
293293
fail-fast: false
294294
matrix:
@@ -336,7 +336,7 @@ jobs:
336336

337337
# test on spark for each spark version & scala version
338338
spark-test:
339-
runs-on: ubuntu-20.04
339+
runs-on: ubuntu-24.04
340340
strategy:
341341
fail-fast: false
342342
matrix:
@@ -398,7 +398,7 @@ jobs:
398398
# Livy 0.8.0 tested with Spark 3.2
399399
# https://github.com/apache/incubator-livy/blob/v0.8.0-incubating/dev/docker/livy-dev-spark/Dockerfile#L20
400400
livy-0-8-with-spark-3-2-under-python39:
401-
runs-on: ubuntu-20.04
401+
runs-on: ubuntu-24.04
402402
steps:
403403
- name: Checkout
404404
uses: actions/checkout@v4
@@ -445,7 +445,7 @@ jobs:
445445
./mvnw verify -pl livy ${MAVEN_ARGS}
446446
447447
default-build:
448-
runs-on: ubuntu-20.04
448+
runs-on: ubuntu-24.04
449449
strategy:
450450
fail-fast: false
451451
matrix:

.github/workflows/frontend.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ permissions:
3030

3131
jobs:
3232
run-e2e-tests-in-zeppelin-web:
33-
runs-on: ubuntu-20.04
33+
runs-on: ubuntu-24.04
3434
steps:
3535
- name: Checkout
3636
uses: actions/checkout@v4
@@ -61,7 +61,7 @@ jobs:
6161
run: if [ -d "logs" ]; then cat logs/*; fi
6262

6363
run-tests-in-zeppelin-web-angular:
64-
runs-on: ubuntu-20.04
64+
runs-on: ubuntu-24.04
6565
steps:
6666
- name: Checkout
6767
uses: actions/checkout@v4
@@ -87,7 +87,7 @@ jobs:
8787
run: xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" ./mvnw package -pl zeppelin-web-angular ${MAVEN_ARGS}
8888

8989
test-selenium-with-spark-module-for-spark-3-4:
90-
runs-on: ubuntu-20.04
90+
runs-on: ubuntu-24.04
9191
defaults:
9292
run:
9393
shell: bash -l {0}

.github/workflows/quick.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525
2626
jobs:
2727
license-check:
28-
runs-on: ubuntu-20.04
28+
runs-on: ubuntu-24.04
2929
steps:
3030
- name: Checkout
3131
uses: actions/checkout@v4
@@ -37,7 +37,7 @@ jobs:
3737
- name: Check Rat
3838
run: ./mvnw apache-rat:check -Prat ${MAVEN_ARGS}
3939
maven-validate:
40-
runs-on: ubuntu-20.04
40+
runs-on: ubuntu-24.04
4141
strategy:
4242
fail-fast: false
4343
steps:

zeppelin-plugins/notebookrepo/mongo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<dependency>
4949
<groupId>de.flapdoodle.embed</groupId>
5050
<artifactId>de.flapdoodle.embed.mongo</artifactId>
51-
<version>3.2.4</version>
51+
<version>4.20.0</version>
5252
<scope>test</scope>
5353
<exclusions>
5454
<exclusion>

zeppelin-plugins/notebookrepo/mongo/src/test/java/org/apache/zeppelin/notebook/repo/MongoNotebookRepoTest.java

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@
2121
import static org.junit.jupiter.api.Assertions.assertEquals;
2222

2323
import java.io.IOException;
24-
import java.net.ServerSocket;
2524
import java.util.Map;
26-
import de.flapdoodle.embed.mongo.MongodExecutable;
27-
import de.flapdoodle.embed.mongo.MongodStarter;
28-
import de.flapdoodle.embed.mongo.config.MongodConfig;
29-
import de.flapdoodle.embed.mongo.config.Net;
3025
import de.flapdoodle.embed.mongo.distribution.Version;
31-
import de.flapdoodle.embed.process.runtime.Network;
26+
import de.flapdoodle.embed.mongo.transitions.Mongod;
27+
import de.flapdoodle.embed.mongo.transitions.RunningMongodProcess;
28+
import de.flapdoodle.reverse.TransitionWalker.ReachedState;
29+
3230
import org.apache.zeppelin.conf.ZeppelinConfiguration;
3331
import org.apache.zeppelin.notebook.GsonNoteParser;
3432
import org.apache.zeppelin.notebook.Note;
@@ -42,7 +40,7 @@
4240

4341
class MongoNotebookRepoTest {
4442

45-
private MongodExecutable mongodExecutable;
43+
private ReachedState<RunningMongodProcess> mongodProcess;
4644

4745
private ZeppelinConfiguration zConf;
4846
private NoteParser noteParser;
@@ -53,30 +51,20 @@ class MongoNotebookRepoTest {
5351
void setUp() throws IOException {
5452
zConf = ZeppelinConfiguration.load();
5553
noteParser = new GsonNoteParser(zConf);
56-
String bindIp = "localhost";
57-
ServerSocket socket = new ServerSocket(0);
58-
int port = socket.getLocalPort();
59-
socket.close();
60-
61-
MongodConfig mongodConfig = MongodConfig.builder()
62-
.version(Version.Main.PRODUCTION)
63-
.net(new Net(bindIp, port, Network.localhostIsIPv6()))
64-
.build();
65-
66-
mongodExecutable = MongodStarter.getDefaultInstance()
67-
.prepare(mongodConfig);
68-
mongodExecutable.start();
6954

70-
zConf.setProperty(ZEPPELIN_NOTEBOOK_MONGO_URI.getVarName(), "mongodb://" + bindIp + ":" + port);
55+
ReachedState<RunningMongodProcess> mongodProcess = Mongod.instance().start(Version.Main.V8_0);
56+
String host = mongodProcess.current().getServerAddress().getHost();
57+
int port = mongodProcess.current().getServerAddress().getPort();
58+
zConf.setProperty(ZEPPELIN_NOTEBOOK_MONGO_URI.getVarName(), "mongodb://" + host + ":" + port);
7159

7260
notebookRepo = new MongoNotebookRepo();
7361
notebookRepo.init(zConf, noteParser);
7462
}
7563

7664
@AfterEach
7765
void tearDown() throws IOException {
78-
if (mongodExecutable != null) {
79-
mongodExecutable.stop();
66+
if (mongodProcess != null) {
67+
mongodProcess.close();
8068
}
8169
}
8270

0 commit comments

Comments
 (0)