Skip to content

Commit 7fd7fd4

Browse files
christophstroblmp911de
authored andcommitted
Update MongoDB Server compatibility matrix.
Closes #4785 Original pull request: #4796
1 parent a84b3c2 commit 7fd7fd4

File tree

5 files changed

+99
-19
lines changed

5 files changed

+99
-19
lines changed

Jenkinsfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,25 @@ pipeline {
134134
}
135135
}
136136
}
137+
stage('Publish JDK (Java 17) + MongoDB 8.0') {
138+
when {
139+
anyOf {
140+
changeset "ci/openjdk17-mongodb-8.0/**"
141+
changeset "ci/pipeline.properties"
142+
}
143+
}
144+
agent { label 'data' }
145+
options { timeout(time: 30, unit: 'MINUTES') }
146+
147+
steps {
148+
script {
149+
def image = docker.build("springci/spring-data-with-mongodb-8.0:${p['java.main.tag']}", "--build-arg BASE=${p['docker.java.main.image']} --build-arg MONGODB=${p['docker.mongodb.8.0.version']} ci/openjdk17-mongodb-8.0/")
150+
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
151+
image.push()
152+
}
153+
}
154+
}
155+
}
137156
}
138157
}
139158

@@ -308,6 +327,32 @@ pipeline {
308327
}
309328
}
310329
}
330+
331+
stage("test: MongoDB 8.0 (main)") {
332+
agent {
333+
label 'data'
334+
}
335+
options { timeout(time: 30, unit: 'MINUTES') }
336+
environment {
337+
ARTIFACTORY = credentials("${p['artifactory.credentials']}")
338+
DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
339+
}
340+
steps {
341+
script {
342+
docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
343+
docker.image("springci/spring-data-with-mongodb-8.0:${p['java.main.tag']}").inside(p['docker.java.inside.basic']) {
344+
sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
345+
sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
346+
sh 'sleep 10'
347+
sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
348+
sh 'sleep 15'
349+
sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
350+
"./mvnw -s settings.xml clean dependency:list test -Dsort -U -B"
351+
}
352+
}
353+
}
354+
}
355+
}
311356
}
312357
}
313358

ci/openjdk17-mongodb-8.0/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ARG BASE
2+
FROM ${BASE}
3+
# Any ARG statements before FROM are cleared.
4+
ARG MONGODB
5+
6+
ENV TZ=Etc/UTC
7+
ENV DEBIAN_FRONTEND=noninteractive
8+
ENV MONGO_VERSION=${MONGODB}
9+
10+
RUN set -eux; \
11+
sed -i -e 's/archive.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
12+
sed -i -e 's/security.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
13+
sed -i -e 's/ports.ubuntu.com/mirrors.ocf.berkeley.edu/g' /etc/apt/sources.list && \
14+
sed -i -e 's/http/https/g' /etc/apt/sources.list && \
15+
apt-get update && apt-get install -y apt-transport-https apt-utils gnupg2 wget && \
16+
# MongoDB 8.0 release signing key
17+
wget -qO - https://www.mongodb.org/static/pgp/server-8.0.asc | apt-key add - && \
18+
# Needed when MongoDB creates a 8.0 folder.
19+
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/8.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-8.0.list && \
20+
echo ${TZ} > /etc/timezone
21+
22+
RUN apt-get update && \
23+
apt-get install -y mongodb-org=${MONGODB} mongodb-org-server=${MONGODB} mongodb-org-shell=${MONGODB} mongodb-org-mongos=${MONGODB} mongodb-org-tools=${MONGODB} && \
24+
apt-get clean && \
25+
rm -rf /var/lib/apt/lists/*

ci/pipeline.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ docker.mongodb.4.4.version=4.4.25
1111
docker.mongodb.5.0.version=5.0.21
1212
docker.mongodb.6.0.version=6.0.10
1313
docker.mongodb.7.0.version=7.0.2
14+
docker.mongodb.8.0.version=8.0.0
1415

1516
# Supported versions of Redis
1617
docker.redis.6.version=6.2.13

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/ReactiveTransactionIntegrationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void setUp() {
108108
Flux.merge( //
109109
MongoTestUtils.createOrReplaceCollection(DATABASE, operations.getCollectionName(Person.class), client),
110110
MongoTestUtils.createOrReplaceCollection(DATABASE, operations.getCollectionName(EventLog.class), client) //
111-
).then().as(StepVerifier::create).verifyComplete();
111+
).then().as(StepVerifier::create).thenAwait(Duration.ofMillis(100)).verifyComplete();
112112
}
113113
}
114114

@@ -143,6 +143,7 @@ public void commitShouldPersistTxEntries() {
143143

144144
personService.savePerson(new Person(null, "Walter", "White")) //
145145
.as(StepVerifier::create) //
146+
.thenAwait(Duration.ofMillis(100))
146147
.expectNextCount(1) //
147148
.verifyComplete();
148149

src/main/antora/modules/ROOT/pages/preface.adoc

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,74 +9,82 @@ In terms of database and driver, you need at least version 4.x of https://www.mo
99
== Compatibility Matrix
1010

1111
The following compatibility matrix summarizes Spring Data versions to MongoDB driver/database versions.
12-
Database versions show the highest supported server version that pass the Spring Data test suite.
12+
Database versions show server generations that pass the Spring Data test suite.
1313
You can use newer server versions unless your application uses functionality that is affected by xref:preface.adoc#compatibility.changes[changes in the MongoDB server].
1414
See also the https://www.mongodb.com/docs/drivers/java/sync/current/compatibility/[official MongoDB driver compatibility matrix] for driver- and server version compatibility.
1515

16+
====
1617
[cols="h,m,m,m", options="header"]
1718
|===
1819
1920
|Spring Data Release Train
2021
|Spring Data MongoDB
2122
|Driver Version
22-
|Server Version
23+
|Database Versions
24+
25+
|2024.1
26+
|4.4.x
27+
|5.x
28+
|4.4.x, 5.x, 6.x, 7.x, 8.x
2329
2430
|2024.0
2531
|4.3.x
2632
|4.11.x & 5.x
27-
|6.x
33+
|4.4.x, 5.x, 6.x, 7.x
2834
2935
|2023.1
30-
|4.1.x
36+
|4.2.x
3137
|4.9.x
32-
|7.0.x
38+
|4.4.x, 5.x, 6.x, 7.x
3339
34-
|2023.0
40+
|2023.0 (*)
3541
|4.1.x
3642
|4.9.x
37-
|6.0.x
43+
|4.4.x, 5.x, 6.x
3844
39-
|2022.0
45+
|2022.0 (*)
4046
|4.0.x
4147
|4.7.x
42-
|6.0.x
48+
|4.4.x, 5.x, 6.x
4349
44-
|2021.2
50+
|2021.2 (*)
4551
|3.4.x
4652
|4.6.x
47-
|5.0.x
53+
|4.4.x, 5.0.x
4854
49-
|2021.1
55+
|2021.1 (*)
5056
|3.3.x
5157
|4.4.x
52-
|5.0.x
58+
|4.4.x, 5.0.x
5359
54-
|2021.0
60+
|2021.0 (*)
5561
|3.2.x
5662
|4.1.x
5763
|4.4.x
5864
59-
|2020.0
65+
|2020.0 (*)
6066
|3.1.x
6167
|4.1.x
6268
|4.4.x
6369
64-
|Neumann
70+
|Neumann (*)
6571
|3.0.x
6672
|4.0.x
6773
|4.4.x
6874
69-
|Moore
75+
|Moore (*)
7076
|2.2.x
7177
|3.11.x/Reactive Streams 1.12.x
7278
|4.2.x
7379
74-
|Lovelace
80+
|Lovelace (*)
7581
|2.1.x
7682
|3.8.x/Reactive Streams 1.9.x
7783
|4.0.x
7884
7985
|===
86+
(*) End of OSS Support
87+
====
8088

8189
[[compatibility.changes]]
8290
[[compatibility.changes-4.4]]

0 commit comments

Comments
 (0)