Update MongoDB Server compatibility matrix.

Closes #4785
Original pull request: #4796
This commit is contained in:
Christoph Strobl
2024-09-26 14:02:29 +02:00
committed by Mark Paluch
parent a84b3c2d4b
commit 7fd7fd4147
5 changed files with 101 additions and 21 deletions

45
Jenkinsfile vendored
View File

@@ -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"
}
}
}
}
}
}
}

View File

@@ -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/*

View File

@@ -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

View File

@@ -108,7 +108,7 @@ public class ReactiveTransactionIntegrationTests {
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 class ReactiveTransactionIntegrationTests {
personService.savePerson(new Person(null, "Walter", "White")) //
.as(StepVerifier::create) //
.thenAwait(Duration.ofMillis(100))
.expectNextCount(1) //
.verifyComplete();

View File

@@ -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.2.x
|4.9.x
|4.4.x, 5.x, 6.x, 7.x
|2023.0 (*)
|4.1.x
|4.9.x
|7.0.x
|4.4.x, 5.x, 6.x
|2023.0
|4.1.x
|4.9.x
|6.0.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]]