Skip to content

Commit 662c519

Browse files
authored
Merge branch 'mongodb:main' into main
2 parents 4e9b7db + 69a3c1d commit 662c519

File tree

2,061 files changed

+30305
-351279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,061 files changed

+30305
-351279
lines changed

.evergreen/.evg.yml

Lines changed: 1840 additions & 1752 deletions
Large diffs are not rendered by default.

.evergreen/gradle-cache.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
set -o xtrace # Write all commands first to stderr
4+
set -o errexit # Exit the script with error if any of the commands fail
5+
6+
############################################
7+
# Main Program #
8+
############################################
9+
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE[0]:-$0}")"
10+
. "${RELATIVE_DIR_PATH}/setup-env.bash"
11+
12+
echo "Enable caching"
13+
echo "org.gradle.caching=true" >> gradle.properties
14+
echo "kotlin.caching.enabled=true" >> gradle.properties
15+
16+
echo "Compiling JVM drivers"
17+
./gradlew -version
18+
./gradlew classes --parallel
19+
20+
# Copy the Gradle dependency cache to the gradle read only dependency cache directory.
21+
if [ -n "$GRADLE_RO_DEP_CACHE" ];then
22+
echo "Copying Gradle dependency cache to $GRADLE_RO_DEP_CACHE"
23+
mkdir -p $GRADLE_RO_DEP_CACHE
24+
25+
# https://docs.gradle.org/current/userguide/dependency_caching.html#sec:cache-copy
26+
# Gradle suggests removing the "*.lock" files and the `gc.properties` file for saving/restoring cache
27+
cp -r $HOME/.gradle/caches/modules-2 "$GRADLE_RO_DEP_CACHE"
28+
find "$GRADLE_RO_DEP_CACHE" -name "*.lock" -type f | xargs rm -f
29+
find "$GRADLE_RO_DEP_CACHE" -name "gc.properties" -type f | xargs rm -f
30+
31+
echo "Copied Gradle dependency cache to $GRADLE_RO_DEP_CACHE"
32+
fi

.evergreen/javaConfig.bash

Lines changed: 0 additions & 19 deletions
This file was deleted.

.evergreen/publish.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -o errexit # Exit the script with error if any of the commands fail
88
# Main Program #
99
############################################
1010
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE:-$0}")"
11-
. "${RELATIVE_DIR_PATH}/javaConfig.bash"
11+
. "${RELATIVE_DIR_PATH}/setup-env.bash"
1212

1313
RELEASE=${RELEASE:false}
1414

@@ -18,14 +18,14 @@ export ORG_GRADLE_PROJECT_signingKey="${SIGNING_KEY}"
1818
export ORG_GRADLE_PROJECT_signingPassword=${SIGNING_PASSWORD}
1919

2020
if [ "$RELEASE" == "true" ]; then
21-
TASK="publishArchives"
21+
TASK="publishArchives closeAndReleaseSonatypeStagingRepository"
2222
else
2323
TASK="publishSnapshots"
2424
fi
2525

26-
SYSTEM_PROPERTIES="-Dorg.gradle.internal.publish.checksums.insecure=true -Dorg.gradle.internal.http.connectionTimeout=120000 -Dorg.gradle.internal.http.socketTimeout=120000"
26+
SYSTEM_PROPERTIES="-Dorg.gradle.internal.publish.checksums.insecure=true"
2727

2828
./gradlew -version
29-
./gradlew ${SYSTEM_PROPERTIES} --stacktrace --info ${TASK}
30-
./gradlew ${SYSTEM_PROPERTIES} --stacktrace --info :bson-scala:${TASK} :driver-scala:${TASK} -PdefaultScalaVersions=2.12.12
31-
./gradlew ${SYSTEM_PROPERTIES} --stacktrace --info :bson-scala:${TASK} :driver-scala:${TASK} -PdefaultScalaVersions=2.11.12
29+
./gradlew ${SYSTEM_PROPERTIES} --stacktrace --info ${TASK} # Scala 2.13 is published as result of this gradle execution.
30+
./gradlew ${SYSTEM_PROPERTIES} --stacktrace --info :bson-scala:${TASK} :driver-scala:${TASK} -PscalaVersion=2.12
31+
./gradlew ${SYSTEM_PROPERTIES} --stacktrace --info :bson-scala:${TASK} :driver-scala:${TASK} -PscalaVersion=2.11
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Exit the script with error if any of the commands fail
4+
set -o errexit
5+
6+
# Supported/used environment variables:
7+
# JDK Set the version of java to be used. Java versions can be set from the java toolchain /opt/java
8+
# "jdk5", "jdk6", "jdk7", "jdk8", "jdk9"
9+
# Support arguments:
10+
# Pass as many MongoDB URIS as arguments to this script as required
11+
12+
############################################
13+
# Main Program #
14+
############################################
15+
JAVA_VERSION=8
16+
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE:-$0}")"
17+
. "${RELATIVE_DIR_PATH}/setup-env.bash"
18+
19+
echo "Running connectivity tests with Java ${JAVA_VERSION}"
20+
21+
MONGODB_URIS="${ATLAS_FREE}|${ATLAS_REPL}|${ATLAS_SHRD}|${ATLAS_TLS11}|${ATLAS_TLS12}|${ATLAS_SRV_FREE}|${ATLAS_SRV_REPL}|${ATLAS_SRV_SHRD}|${ATLAS_SRV_TLS11}|${ATLAS_SRV_TLS12}"
22+
23+
./gradlew -PjavaVersion=${JAVA_VERSION} -Dorg.mongodb.test.connectivity.uris="${MONGODB_URIS}" --info --continue \
24+
driver-sync:test --tests ConnectivityTest \
25+
driver-legacy:test --tests ConnectivityTest \
26+
driver-reactive-streams:test --tests ConnectivityTest

.evergreen/run-atlas-data-lake-test.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

.evergreen/run-atlas-search-index-management-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set -o errexit
99
# Main Program #
1010
############################################
1111
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE[0]:-$0}")"
12-
source "${RELATIVE_DIR_PATH}/javaConfig.bash"
12+
source "${RELATIVE_DIR_PATH}/setup-env.bash"
1313

1414
echo "Running Atlas Search tests"
1515
./gradlew -version

.evergreen/run-atlas-search-tests.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ set -o errexit
99
# Main Program #
1010
############################################
1111
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE[0]:-$0}")"
12-
source "${RELATIVE_DIR_PATH}/javaConfig.bash"
12+
source "${RELATIVE_DIR_PATH}/setup-env.bash"
1313

1414
echo "Running Atlas Search tests"
15+
1516
./gradlew -version
1617
./gradlew --stacktrace --info \
1718
-Dorg.mongodb.test.atlas.search=true \
18-
-Dorg.mongodb.test.uri=${MONGODB_URI} \
19-
driver-core:test --tests AggregatesSearchIntegrationTest --tests AggregatesVectorSearchIntegrationTest
19+
-Dorg.mongodb.test.uri=${ATLAS_SEARCH_URI} \
20+
driver-core:test --tests AggregatesSearchIntegrationTest \
21+
--tests AggregatesBinaryVectorSearchIntegrationTest \
22+
--tests AggregatesSearchTest \

.evergreen/run-connectivity-tests.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

.evergreen/run-csfle-aws-from-environment.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ set -o errexit # Exit the script with error if any of the commands fail
1212
# Main Program #
1313
############################################
1414
RELATIVE_DIR_PATH="$(dirname "${BASH_SOURCE:-$0}")"
15-
. "${RELATIVE_DIR_PATH}/javaConfig.bash"
15+
. "${RELATIVE_DIR_PATH}/setup-env.bash"
16+
1617
echo "Running CSFLE AWS from environment tests"
1718

1819
./gradlew -version
@@ -21,12 +22,12 @@ export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
2122
export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
2223

2324
./gradlew --stacktrace --info -Dorg.mongodb.test.uri=${MONGODB_URI} \
24-
--no-build-cache driver-sync:cleanTest driver-sync:test --tests ClientSideEncryptionAwsCredentialFromEnvironmentTest
25+
driver-sync:cleanTest driver-sync:test --tests ClientSideEncryptionAwsCredentialFromEnvironmentTest
2526
first=$?
2627
echo $first
2728

2829
./gradlew --stacktrace --info -Dorg.mongodb.test.uri=${MONGODB_URI} \
29-
--no-build-cache driver-reactive-streams:cleanTest driver-reactive-streams:test --tests ClientSideEncryptionAwsCredentialFromEnvironmentTest
30+
driver-reactive-streams:cleanTest driver-reactive-streams:test --tests ClientSideEncryptionAwsCredentialFromEnvironmentTest
3031
second=$?
3132
echo $second
3233

0 commit comments

Comments
 (0)