Skip to content

Commit f533005

Browse files
authored
Merge branch 'main' into NODE-6678
2 parents 87ea9ef + 35c703e commit f533005

File tree

548 files changed

+22211
-1415
lines changed

Some content is hidden

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

548 files changed

+22211
-1415
lines changed

.evergreen/config.in.yml

Lines changed: 68 additions & 279 deletions
Large diffs are not rendered by default.

.evergreen/config.yml

Lines changed: 104 additions & 292 deletions
Large diffs are not rendered by default.

.evergreen/generate_evergreen_tasks.js

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ BASE_TASKS.push({
105105
TOPOLOGY: 'server',
106106
REQUIRE_API_VERSION: '1',
107107
MONGODB_API_VERSION: '1',
108-
AUTH: 'auth'
108+
AUTH: 'auth',
109+
TEST_CSFLE: 'true',
110+
CLIENT_ENCRYPTION: 'true'
109111
}),
110112
{ func: 'install dependencies' },
111113
{ func: 'bootstrap mongo-orchestration' },
@@ -146,7 +148,9 @@ TASKS.push(
146148
VERSION: ver,
147149
TOPOLOGY: 'sharded_cluster',
148150
AUTH: 'auth',
149-
LOAD_BALANCER: 'true'
151+
LOAD_BALANCER: 'true',
152+
CLIENT_ENCRYPTION: 'false',
153+
TEST_CSFLE: 'false'
150154
}),
151155
{ func: 'install dependencies' },
152156
{ func: 'bootstrap mongo-orchestration' },
@@ -208,7 +212,7 @@ TASKS.push(
208212
{ func: 'run socks5 tests' }
209213
]
210214
}
211-
]
215+
]
212216
);
213217

214218
TASKS.push({
@@ -219,7 +223,9 @@ TASKS.push({
219223
VERSION: 'latest',
220224
TOPOLOGY: 'replica_set',
221225
AUTH: 'auth',
222-
COMPRESSOR: 'snappy'
226+
COMPRESSOR: 'snappy',
227+
CLIENT_ENCRYPTION: 'false',
228+
TEST_CSFLE: 'false'
223229
}),
224230
{ func: 'install dependencies' },
225231
{ func: 'bootstrap mongo-orchestration' },
@@ -235,7 +241,9 @@ TASKS.push({
235241
VERSION: 'latest',
236242
TOPOLOGY: 'replica_set',
237243
AUTH: 'auth',
238-
COMPRESSOR: 'zstd'
244+
COMPRESSOR: 'zstd',
245+
CLIENT_ENCRYPTION: 'false',
246+
TEST_CSFLE: 'false'
239247
}),
240248
{ func: 'install dependencies' },
241249
{ func: 'bootstrap mongo-orchestration' },
@@ -257,7 +265,9 @@ TASKS.push({
257265
VERSION: 'latest',
258266
TOPOLOGY: 'replica_set',
259267
AUTH: 'auth',
260-
COMPRESSOR: 'zstd'
268+
COMPRESSOR: 'zstd',
269+
CLIENT_ENCRYPTION: 'false',
270+
TEST_CSFLE: 'false'
261271
}),
262272
{ func: 'install dependencies' },
263273
{ func: 'bootstrap mongo-orchestration' },
@@ -422,9 +432,8 @@ for (const {
422432
const expansions = { NODE_LTS_VERSION, NPM_VERSION };
423433
const taskNames = tasks.map(({ name }) => name);
424434

425-
if (clientEncryption) {
426-
expansions.CLIENT_ENCRYPTION = true;
427-
}
435+
expansions.CLIENT_ENCRYPTION = String(!!clientEncryption)
436+
expansions.TEST_CSFLE = expansions.CLIENT_ENCRYPTION
428437

429438
BUILD_VARIANTS.push({ name, display_name, run_on, expansions, tasks: taskNames });
430439
}
@@ -562,7 +571,7 @@ SINGLETON_TASKS.push(
562571
updateExpansions({
563572
VERSION: 'latest',
564573
TOPOLOGY: 'replica_set',
565-
NODE_LTS_VERSION: LATEST_LTS
574+
NODE_LTS_VERSION: LATEST_LTS
566575
}),
567576
{ func: 'install dependencies' },
568577
{ func: 'bootstrap mongo-orchestration' },
@@ -666,7 +675,8 @@ for (const version of ['5.0', 'rapid', 'latest']) {
666675
NODE_LTS_VERSION: LOWEST_LTS,
667676
NPM_VERSION: 9,
668677
VERSION: version,
669-
TOPOLOGY: 'replica_set'
678+
TOPOLOGY: 'replica_set',
679+
CLIENT_ENCRYPTION: true
670680
}),
671681
{ func: 'install dependencies' },
672682
{ func: 'bootstrap mongo-orchestration' },
@@ -748,11 +758,8 @@ function addPerformanceTasks() {
748758
monitorCommands: true
749759
}),
750760
makePerfTask('run-spec-benchmark-tests-node-server-logging', {
751-
__enableMongoLogger: true,
752-
__internalLoggerConfig: {
753-
MONGODB_LOG_ALL: 'trace',
754-
MONGODB_LOG_PATH: 'stderr'
755-
}
761+
mongodbLogPath: 'stderr',
762+
mongodbLogComponentSeverities: { default: 'trace' }
756763
})
757764
];
758765

.evergreen/prepare-crypt-shared-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ else
3030
CRYPT_SHARED_LIB_PATH=$(cygpath -m $CRYPT_SHARED_LIB_PATH)
3131
fi
3232
echo "CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH"
33-
export CRYPT_SHARED_LIB_PATH=${CRYPT_SHARED_LIB_PATH}
33+
echo "export CRYPT_SHARED_LIB_PATH=$CRYPT_SHARED_LIB_PATH" >crypt_shared.sh
3434
fi

.evergreen/run-azure-kms-tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@ export MONGODB_URI="mongodb://localhost:27017"
1717

1818
export EXPECTED_AZUREKMS_OUTCOME=${EXPECTED_AZUREKMS_OUTCOME:-omitted}
1919
export TEST_CSFLE=true
20-
export CSFLE_KMS_PROVIDERS='not json'
2120

2221
npx mocha --config test/mocha_mongodb.json test/integration/client-side-encryption/client_side_encryption.prose.19.on_demand_azure.test.ts

.evergreen/run-benchmarks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export MONGODB_CLIENT_OPTIONS=$MONGODB_CLIENT_OPTIONS
1212
npm run build:ts
1313

1414

15-
# If MONGODB_CLIENT_OPTIONS contains __enableMongoLogger redirect stderr to a file
16-
if [[ $MONGODB_CLIENT_OPTIONS == *"__enableMongoLogger"* ]]; then
15+
# If MONGODB_CLIENT_OPTIONS contains mongodbLogComponentSeverities redirect stderr to a file
16+
if [[ $MONGODB_CLIENT_OPTIONS == *"mongodbLogComponentSeverities"* ]]; then
1717
npm run check:bench 2> bench.log
1818
else
1919
npm run check:bench
Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,14 @@
11
#! /usr/bin/env bash
22
set +o xtrace # Do not write AWS credentials to stderr
33

4-
# Initiail checks for running these tests
5-
if [ -z ${AWS_ACCESS_KEY_ID+omitted} ]; then echo "AWS_ACCESS_KEY_ID is unset" && exit 1; fi
6-
if [ -z ${AWS_SECRET_ACCESS_KEY+omitted} ]; then echo "AWS_SECRET_ACCESS_KEY is unset" && exit 1; fi
7-
if [ -z ${CSFLE_KMS_PROVIDERS+omitted} ]; then echo "CSFLE_KMS_PROVIDERS is unset" && exit 1; fi
8-
9-
export AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
10-
export AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
11-
export CSFLE_KMS_PROVIDERS=${CSFLE_KMS_PROVIDERS}
12-
export CRYPT_SHARED_LIB_PATH=${CRYPT_SHARED_LIB_PATH}
13-
echo "csfle CRYPT_SHARED_LIB_PATH: $CRYPT_SHARED_LIB_PATH"
4+
source .evergreen/setup-fle.sh
145

156
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
167

17-
set -o xtrace # Write all commands first to stderr
18-
set -o errexit # Exit the script with error if any of the commands fail
19-
20-
# Get access to the AWS temporary credentials:
21-
echo "adding temporary AWS credentials to environment"
22-
# CSFLE_AWS_TEMP_ACCESS_KEY_ID, CSFLE_AWS_TEMP_SECRET_ACCESS_KEY, CSFLE_AWS_TEMP_SESSION_TOKEN
23-
pushd "$DRIVERS_TOOLS"/.evergreen/csfle
24-
. ./activate-kmstlsvenv.sh
25-
. ./set-temp-creds.sh
26-
popd
8+
set -o xtrace # Write all commands first to stderr
9+
set -o errexit # Exit the script with error if any of the commands fail
2710

2811
export MONGODB_URI=${MONGODB_URI}
29-
export KMIP_TLS_CA_FILE="${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem"
30-
export KMIP_TLS_CERT_FILE="${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem"
3112
export TEST_CSFLE=true
3213

3314
npm run check:csfle

.evergreen/copy-driver-to-azure-and-run.sh renamed to .evergreen/run-deployed-azure-kms-tests.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
set -o errexit
44
source "${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/secrets-export.sh"
5+
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
56

67
if [ -z ${AZUREKMS_RESOURCEGROUP+omitted} ]; then echo "AZUREKMS_RESOURCEGROUP is unset" && exit 1; fi
78
if [ -z ${AZUREKMS_VMNAME+omitted} ]; then echo "AZUREKMS_VMNAME is unset" && exit 1; fi
89

9-
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
10-
1110
export AZUREKMS_PUBLICKEYPATH=/tmp/testazurekms_publickey
1211
export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms_privatekey
1312

.evergreen/setup-gcp-testing.sh renamed to .evergreen/run-deployed-gcp-kms-tests.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#! /usr/bin/env bash
22

33
source "${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/secrets-export.sh"
4+
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
45

56
# Assert required environment variables are present without printing them
67
if [ -z ${GCPKMS_GCLOUD+omitted} ]; then echo "GCPKMS_GCLOUD is unset" && exit 1; fi
@@ -10,8 +11,6 @@ if [ -z ${GCPKMS_INSTANCENAME+omitted} ]; then echo "GCPKMS_INSTANCENAME is unse
1011

1112
set -o errexit
1213

13-
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
14-
1514
export GCPKMS_SRC=node-driver-source.tgz
1615
export GCPKMS_DST=$GCPKMS_INSTANCENAME:
1716

@@ -28,3 +27,6 @@ echo "decompressing node driver tar on gcp ... begin"
2827
export GCPKMS_CMD="tar -xzf $GCPKMS_SRC"
2928
"${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/run-command.sh"
3029
echo "decompressing node driver tar on gcp ... end"
30+
31+
export GCPKMS_CMD="env EXPECTED_GCPKMS_OUTCOME=success bash src/.evergreen/run-gcp-kms-tests.sh"
32+
bash ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/run-command.sh

.evergreen/run-gcp-kms-tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ export MONGODB_URI="mongodb://localhost:27017"
1919

2020
export EXPECTED_GCPKMS_OUTCOME=${EXPECTED_GCPKMS_OUTCOME:-omitted}
2121
export TEST_CSFLE=true
22-
export CSFLE_KMS_PROVIDERS='not json'
2322

2423
npx mocha --config test/mocha_mongodb.json test/integration/client-side-encryption/client_side_encryption.prose.17.on_demand_gcp.test.ts

0 commit comments

Comments
 (0)