diff --git a/Jenkinsfile b/Jenkinsfile
index 3d1f276a55..edcafb9fd7 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -134,6 +134,25 @@ pipeline {
}
}
}
+ stage('Publish JDK (Java 17) + MongoDB 8.0') {
+ when {
+ anyOf {
+ changeset "ci/openjdk17-mongodb-8.0/**"
+ changeset "ci/pipeline.properties"
+ }
+ }
+ agent { label 'data' }
+ options { timeout(time: 30, unit: 'MINUTES') }
+
+ steps {
+ script {
+ 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/")
+ docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
+ image.push()
+ }
+ }
+ }
+ }
}
}
@@ -308,6 +327,32 @@ pipeline {
}
}
}
+
+ stage("test: MongoDB 8.0 (main)") {
+ agent {
+ label 'data'
+ }
+ options { timeout(time: 30, unit: 'MINUTES') }
+ environment {
+ ARTIFACTORY = credentials("${p['artifactory.credentials']}")
+ DEVELOCITY_ACCESS_KEY = credentials("${p['develocity.access-key']}")
+ }
+ steps {
+ script {
+ docker.withRegistry(p['docker.proxy.registry'], p['docker.proxy.credentials']) {
+ docker.image("springci/spring-data-with-mongodb-8.0:${p['java.main.tag']}").inside(p['docker.java.inside.basic']) {
+ sh 'mkdir -p /tmp/mongodb/db /tmp/mongodb/log'
+ sh 'mongod --setParameter transactionLifetimeLimitSeconds=90 --setParameter maxTransactionLockRequestTimeoutMillis=10000 --dbpath /tmp/mongodb/db --replSet rs0 --fork --logpath /tmp/mongodb/log/mongod.log &'
+ sh 'sleep 10'
+ sh 'mongosh --eval "rs.initiate({_id: \'rs0\', members:[{_id: 0, host: \'127.0.0.1:27017\'}]});"'
+ sh 'sleep 15'
+ sh 'MAVEN_OPTS="-Duser.name=' + "${p['jenkins.user.name']}" + ' -Duser.home=/tmp/jenkins-home" ' +
+ "./mvnw -s settings.xml clean dependency:list test -Dsort -U -B"
+ }
+ }
+ }
+ }
+ }
}
}
diff --git a/ci/openjdk17-mongodb-8.0/Dockerfile b/ci/openjdk17-mongodb-8.0/Dockerfile
new file mode 100644
index 0000000000..81b9c23a5b
--- /dev/null
+++ b/ci/openjdk17-mongodb-8.0/Dockerfile
@@ -0,0 +1,25 @@
+ARG BASE
+FROM ${BASE}
+# Any ARG statements before FROM are cleared.
+ARG MONGODB
+
+ENV TZ=Etc/UTC
+ENV DEBIAN_FRONTEND=noninteractive
+ENV MONGO_VERSION=${MONGODB}
+
+RUN set -eux; \
+ sed -i -e 's/archive.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
+ sed -i -e 's/security.ubuntu.com/mirror.one.com/g' /etc/apt/sources.list && \
+ sed -i -e 's/ports.ubuntu.com/mirrors.ocf.berkeley.edu/g' /etc/apt/sources.list && \
+ sed -i -e 's/http/https/g' /etc/apt/sources.list && \
+ apt-get update && apt-get install -y apt-transport-https apt-utils gnupg2 wget && \
+ # MongoDB 8.0 release signing key
+ wget -qO - https://www.mongodb.org/static/pgp/server-8.0.asc | apt-key add - && \
+ # Needed when MongoDB creates a 8.0 folder.
+ 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 && \
+ echo ${TZ} > /etc/timezone
+
+RUN apt-get update && \
+ apt-get install -y mongodb-org=${MONGODB} mongodb-org-server=${MONGODB} mongodb-org-shell=${MONGODB} mongodb-org-mongos=${MONGODB} mongodb-org-tools=${MONGODB} && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
diff --git a/ci/pipeline.properties b/ci/pipeline.properties
index 40bb349196..c342f49a24 100644
--- a/ci/pipeline.properties
+++ b/ci/pipeline.properties
@@ -11,6 +11,7 @@ docker.mongodb.4.4.version=4.4.25
docker.mongodb.5.0.version=5.0.21
docker.mongodb.6.0.version=6.0.10
docker.mongodb.7.0.version=7.0.2
+docker.mongodb.8.0.version=8.0.0
# Supported versions of Redis
docker.redis.6.version=6.2.13
diff --git a/pom.xml b/pom.xml
index 3fa54424af..0ac7ed44eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-mongodb-parent
- 4.4.0-SNAPSHOT
+ 4.4.x-4785-SNAPSHOT
pom
Spring Data MongoDB
diff --git a/spring-data-mongodb-benchmarks/pom.xml b/spring-data-mongodb-benchmarks/pom.xml
index a3dc49f892..a4eb76d5ae 100644
--- a/spring-data-mongodb-benchmarks/pom.xml
+++ b/spring-data-mongodb-benchmarks/pom.xml
@@ -7,7 +7,7 @@
org.springframework.data
spring-data-mongodb-parent
- 4.4.0-SNAPSHOT
+ 4.4.x-4785-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb-distribution/pom.xml b/spring-data-mongodb-distribution/pom.xml
index acdc13437d..7075d8eb4a 100644
--- a/spring-data-mongodb-distribution/pom.xml
+++ b/spring-data-mongodb-distribution/pom.xml
@@ -15,7 +15,7 @@
org.springframework.data
spring-data-mongodb-parent
- 4.4.0-SNAPSHOT
+ 4.4.x-4785-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb/pom.xml b/spring-data-mongodb/pom.xml
index fafe9c8793..2f9dcb40c2 100644
--- a/spring-data-mongodb/pom.xml
+++ b/spring-data-mongodb/pom.xml
@@ -13,7 +13,7 @@
org.springframework.data
spring-data-mongodb-parent
- 4.4.0-SNAPSHOT
+ 4.4.x-4785-SNAPSHOT
../pom.xml
diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/ReactiveTransactionIntegrationTests.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/ReactiveTransactionIntegrationTests.java
index 545def16c4..f4d918f31e 100644
--- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/ReactiveTransactionIntegrationTests.java
+++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/ReactiveTransactionIntegrationTests.java
@@ -108,7 +108,7 @@ public void setUp() {
Flux.merge( //
MongoTestUtils.createOrReplaceCollection(DATABASE, operations.getCollectionName(Person.class), client),
MongoTestUtils.createOrReplaceCollection(DATABASE, operations.getCollectionName(EventLog.class), client) //
- ).then().as(StepVerifier::create).verifyComplete();
+ ).then().as(StepVerifier::create).thenAwait(Duration.ofMillis(100)).verifyComplete();
}
}
@@ -143,6 +143,7 @@ public void commitShouldPersistTxEntries() {
personService.savePerson(new Person(null, "Walter", "White")) //
.as(StepVerifier::create) //
+ .thenAwait(Duration.ofMillis(100))
.expectNextCount(1) //
.verifyComplete();
diff --git a/src/main/antora/modules/ROOT/pages/preface.adoc b/src/main/antora/modules/ROOT/pages/preface.adoc
index a597ef1569..fc4cf89111 100644
--- a/src/main/antora/modules/ROOT/pages/preface.adoc
+++ b/src/main/antora/modules/ROOT/pages/preface.adoc
@@ -9,74 +9,82 @@ In terms of database and driver, you need at least version 4.x of https://www.mo
== Compatibility Matrix
The following compatibility matrix summarizes Spring Data versions to MongoDB driver/database versions.
-Database versions show the highest supported server version that pass the Spring Data test suite.
+Database versions show server generations that pass the Spring Data test suite.
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].
See also the https://www.mongodb.com/docs/drivers/java/sync/current/compatibility/[official MongoDB driver compatibility matrix] for driver- and server version compatibility.
+====
[cols="h,m,m,m", options="header"]
|===
|Spring Data Release Train
|Spring Data MongoDB
|Driver Version
-|Server Version
+|Database Versions
+
+|2024.1
+|4.4.x
+|5.x
+|4.4.x, 5.x, 6.x, 7.x, 8.x
|2024.0
|4.3.x
|4.11.x & 5.x
-|6.x
+|4.4.x, 5.x, 6.x, 7.x
|2023.1
-|4.1.x
+|4.2.x
|4.9.x
-|7.0.x
+|4.4.x, 5.x, 6.x, 7.x
-|2023.0
+|2023.0 (*)
|4.1.x
|4.9.x
-|6.0.x
+|4.4.x, 5.x, 6.x
-|2022.0
+|2022.0 (*)
|4.0.x
|4.7.x
-|6.0.x
+|4.4.x, 5.x, 6.x
-|2021.2
+|2021.2 (*)
|3.4.x
|4.6.x
-|5.0.x
+|4.4.x, 5.0.x
-|2021.1
+|2021.1 (*)
|3.3.x
|4.4.x
-|5.0.x
+|4.4.x, 5.0.x
-|2021.0
+|2021.0 (*)
|3.2.x
|4.1.x
|4.4.x
-|2020.0
+|2020.0 (*)
|3.1.x
|4.1.x
|4.4.x
-|Neumann
+|Neumann (*)
|3.0.x
|4.0.x
|4.4.x
-|Moore
+|Moore (*)
|2.2.x
|3.11.x/Reactive Streams 1.12.x
|4.2.x
-|Lovelace
+|Lovelace (*)
|2.1.x
|3.8.x/Reactive Streams 1.9.x
|4.0.x
|===
+(*) End of OSS Support
+====
[[compatibility.changes]]
[[compatibility.changes-4.4]]