Skip to content

Commit e190eab

Browse files
Merge branch 'main' into DRIVERS-3022
2 parents df9e595 + a0431f0 commit e190eab

File tree

59 files changed

+2639
-1506
lines changed

Some content is hidden

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

59 files changed

+2639
-1506
lines changed

.evergreen/config.in.yml

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ functions:
7171
params:
7272
file: mo-expansion.yml
7373

74+
"stop mongo-orchestration":
75+
- command: shell.exec
76+
params:
77+
script: |
78+
bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
79+
7480
"bootstrap mongohoused":
7581
- command: shell.exec
7682
params:
@@ -227,7 +233,10 @@ functions:
227233
# Get access to the AWS temporary credentials:
228234
echo "adding temporary AWS credentials to environment"
229235
# CSFLE_AWS_TEMP_ACCESS_KEY_ID, CSFLE_AWS_TEMP_SECRET_ACCESS_KEY, CSFLE_AWS_TEMP_SESSION_TOKEN
230-
. "$DRIVERS_TOOLS"/.evergreen/csfle/set-temp-creds.sh
236+
pushd "$DRIVERS_TOOLS"/.evergreen/csfle
237+
. ./activate-kmstlsvenv.sh
238+
. ./set-temp-creds.sh
239+
popd
231240
232241
MONGODB_URI="${MONGODB_URI}" \
233242
AUTH=${AUTH} SSL=${SSL} TEST_CSFLE=true \
@@ -1103,6 +1112,7 @@ functions:
11031112
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
11041113
MONGODB_URI: ${MONGODB_URI}
11051114
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1115+
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
11061116
binary: bash
11071117
args:
11081118
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
@@ -1168,6 +1178,50 @@ tasks:
11681178
params:
11691179
file: src/results.json
11701180

1181+
- name: run-spec-benchmark-tests-node-server-timeoutMS-120000
1182+
tags:
1183+
- run-spec-benchmark-tests
1184+
- performance
1185+
exec_timeout_secs: 3600
1186+
commands:
1187+
- command: expansions.update
1188+
type: setup
1189+
params:
1190+
updates:
1191+
- { key: NODE_LTS_VERSION, value: v22.11.0 }
1192+
- { key: VERSION, value: v6.0-perf }
1193+
- { key: TOPOLOGY, value: server }
1194+
- { key: AUTH, value: noauth }
1195+
- { key: MONGODB_CLIENT_OPTIONS, value: '{"timeoutMS": 120000}' }
1196+
- func: install dependencies
1197+
- func: bootstrap mongo-orchestration
1198+
- func: run spec driver benchmarks
1199+
- command: perf.send
1200+
params:
1201+
file: src/results.json
1202+
1203+
- name: run-spec-benchmark-tests-node-server-timeoutMS-0
1204+
tags:
1205+
- run-spec-benchmark-tests
1206+
- performance
1207+
exec_timeout_secs: 3600
1208+
commands:
1209+
- command: expansions.update
1210+
type: setup
1211+
params:
1212+
updates:
1213+
- { key: NODE_LTS_VERSION, value: v22.11.0 }
1214+
- { key: VERSION, value: v6.0-perf }
1215+
- { key: TOPOLOGY, value: server }
1216+
- { key: AUTH, value: noauth }
1217+
- { key: MONGODB_CLIENT_OPTIONS, value: '{"timeoutMS": 0}' }
1218+
- func: install dependencies
1219+
- func: bootstrap mongo-orchestration
1220+
- func: run spec driver benchmarks
1221+
- command: perf.send
1222+
params:
1223+
file: src/results.json
1224+
11711225
- name: "test-gcpkms-task"
11721226
commands:
11731227
- command: expansions.update
@@ -1300,7 +1354,7 @@ tasks:
13001354
include_expansions_in_env: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN"]
13011355
args:
13021356
- .evergreen/run-oidc-tests-k8s.sh
1303-
1357+
13041358
- name: "oidc-auth-test-k8s-latest-aks"
13051359
commands:
13061360
- func: "install dependencies"
@@ -1725,6 +1779,7 @@ pre:
17251779
post:
17261780
- func: "reset aws instance profile"
17271781
- func: "upload test results"
1782+
- func: "stop mongo-orchestration"
17281783
- func: "upload coverage report"
17291784
- func: "cleanup"
17301785

@@ -1736,3 +1791,5 @@ buildvariants:
17361791
run_on: rhel90-dbx-perf-large
17371792
tasks:
17381793
- run-spec-benchmark-tests-node-server
1794+
- run-spec-benchmark-tests-node-server-timeoutMS-120000
1795+
- run-spec-benchmark-tests-node-server-timeoutMS-0

.evergreen/config.yml

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ functions:
4646
- command: expansions.update
4747
params:
4848
file: mo-expansion.yml
49+
stop mongo-orchestration:
50+
- command: shell.exec
51+
params:
52+
script: |
53+
bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
4954
bootstrap mongohoused:
5055
- command: shell.exec
5156
params:
@@ -199,7 +204,10 @@ functions:
199204
# Get access to the AWS temporary credentials:
200205
echo "adding temporary AWS credentials to environment"
201206
# CSFLE_AWS_TEMP_ACCESS_KEY_ID, CSFLE_AWS_TEMP_SECRET_ACCESS_KEY, CSFLE_AWS_TEMP_SESSION_TOKEN
202-
. "$DRIVERS_TOOLS"/.evergreen/csfle/set-temp-creds.sh
207+
pushd "$DRIVERS_TOOLS"/.evergreen/csfle
208+
. ./activate-kmstlsvenv.sh
209+
. ./set-temp-creds.sh
210+
popd
203211
204212
MONGODB_URI="${MONGODB_URI}" \
205213
AUTH=${AUTH} SSL=${SSL} TEST_CSFLE=true \
@@ -1065,6 +1073,7 @@ functions:
10651073
PROJECT_DIRECTORY: ${PROJECT_DIRECTORY}
10661074
MONGODB_URI: ${MONGODB_URI}
10671075
DRIVERS_TOOLS: ${DRIVERS_TOOLS}
1076+
MONGODB_CLIENT_OPTIONS: ${MONGODB_CLIENT_OPTIONS}
10681077
binary: bash
10691078
args:
10701079
- ${PROJECT_DIRECTORY}/.evergreen/run-benchmarks.sh
@@ -1128,6 +1137,48 @@ tasks:
11281137
- command: perf.send
11291138
params:
11301139
file: src/results.json
1140+
- name: run-spec-benchmark-tests-node-server-timeoutMS-120000
1141+
tags:
1142+
- run-spec-benchmark-tests
1143+
- performance
1144+
exec_timeout_secs: 3600
1145+
commands:
1146+
- command: expansions.update
1147+
type: setup
1148+
params:
1149+
updates:
1150+
- {key: NODE_LTS_VERSION, value: v22.11.0}
1151+
- {key: VERSION, value: v6.0-perf}
1152+
- {key: TOPOLOGY, value: server}
1153+
- {key: AUTH, value: noauth}
1154+
- {key: MONGODB_CLIENT_OPTIONS, value: '{"timeoutMS": 120000}'}
1155+
- func: install dependencies
1156+
- func: bootstrap mongo-orchestration
1157+
- func: run spec driver benchmarks
1158+
- command: perf.send
1159+
params:
1160+
file: src/results.json
1161+
- name: run-spec-benchmark-tests-node-server-timeoutMS-0
1162+
tags:
1163+
- run-spec-benchmark-tests
1164+
- performance
1165+
exec_timeout_secs: 3600
1166+
commands:
1167+
- command: expansions.update
1168+
type: setup
1169+
params:
1170+
updates:
1171+
- {key: NODE_LTS_VERSION, value: v22.11.0}
1172+
- {key: VERSION, value: v6.0-perf}
1173+
- {key: TOPOLOGY, value: server}
1174+
- {key: AUTH, value: noauth}
1175+
- {key: MONGODB_CLIENT_OPTIONS, value: '{"timeoutMS": 0}'}
1176+
- func: install dependencies
1177+
- func: bootstrap mongo-orchestration
1178+
- func: run spec driver benchmarks
1179+
- command: perf.send
1180+
params:
1181+
file: src/results.json
11311182
- name: test-gcpkms-task
11321183
commands:
11331184
- command: expansions.update
@@ -3554,7 +3605,7 @@ tasks:
35543605
- func: install dependencies
35553606
- func: bootstrap mongo-orchestration
35563607
- func: check resource management feature integration
3557-
- name: check-types-typescript-next-node-types-22.4.1
3608+
- name: check-types-typescript-next-node-types-22.9.0
35583609
tags:
35593610
- check-types-typescript-next
35603611
- typescript-compilation
@@ -3566,10 +3617,10 @@ tasks:
35663617
- {key: NODE_LTS_VERSION, value: '16'}
35673618
- {key: NPM_VERSION, value: '9'}
35683619
- {key: TS_VERSION, value: next}
3569-
- {key: TYPES_VERSION, value: 22.4.1}
3620+
- {key: TYPES_VERSION, value: 22.9.0}
35703621
- func: install dependencies
35713622
- func: check types
3572-
- name: check-types-typescript-current-node-types-22.4.1
3623+
- name: check-types-typescript-current-node-types-22.9.0
35733624
tags:
35743625
- check-types-typescript-current
35753626
- typescript-compilation
@@ -3581,7 +3632,7 @@ tasks:
35813632
- {key: NODE_LTS_VERSION, value: '16'}
35823633
- {key: NPM_VERSION, value: '9'}
35833634
- {key: TS_VERSION, value: current}
3584-
- {key: TYPES_VERSION, value: 22.4.1}
3635+
- {key: TYPES_VERSION, value: 22.9.0}
35853636
- func: install dependencies
35863637
- func: check types
35873638
- name: check-types-typescript-next-node-types-16.x
@@ -3629,7 +3680,7 @@ tasks:
36293680
- {key: TYPES_VERSION, value: 18.11.9}
36303681
- func: install dependencies
36313682
- func: check types
3632-
- name: compile-driver-typescript-current-node-types-22.4.1
3683+
- name: compile-driver-typescript-current-node-types-22.9.0
36333684
tags:
36343685
- compile-driver-typescript-current
36353686
- typescript-compilation
@@ -3641,7 +3692,7 @@ tasks:
36413692
- {key: NODE_LTS_VERSION, value: '16'}
36423693
- {key: NPM_VERSION, value: '9'}
36433694
- {key: TS_VERSION, value: current}
3644-
- {key: TYPES_VERSION, value: 22.4.1}
3695+
- {key: TYPES_VERSION, value: 22.9.0}
36453696
- func: install dependencies
36463697
- func: compile driver
36473698
- name: download-and-merge-coverage
@@ -4660,6 +4711,7 @@ pre:
46604711
post:
46614712
- func: reset aws instance profile
46624713
- func: upload test results
4714+
- func: stop mongo-orchestration
46634715
- func: upload coverage report
46644716
- func: cleanup
46654717
ignore:
@@ -4670,6 +4722,8 @@ buildvariants:
46704722
run_on: rhel90-dbx-perf-large
46714723
tasks:
46724724
- run-spec-benchmark-tests-node-server
4725+
- run-spec-benchmark-tests-node-server-timeoutMS-120000
4726+
- run-spec-benchmark-tests-node-server-timeoutMS-0
46734727
- name: rhel80-large-gallium
46744728
display_name: rhel8 Node16
46754729
run_on: rhel80-large

.evergreen/run-azure-kms-mock-server.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ if [ -z ${DRIVERS_TOOLS+omitted} ]; then echo "DRIVERS_TOOLS is unset" && exit 1
44

55
set -o errexit
66

7-
python3 $DRIVERS_TOOLS/.evergreen/csfle/bottle.py fake_azure:imds &
7+
pushd $DRIVERS_TOOLS/.evergreen/csfle
8+
. ./activate-kmstlsvenv.sh
9+
python bottle.py fake_azure:imds &
10+
popd
811

912
echo "Running Azure KMS idms server on port 8080"

.evergreen/run-benchmarks.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set -o nounset
77
source $DRIVERS_TOOLS/.evergreen/init-node-and-npm-env.sh
88

99
export MONGODB_URI=$MONGODB_URI
10+
export MONGODB_CLIENT_OPTIONS=$MONGODB_CLIENT_OPTIONS
1011

1112
npm run build:ts
1213
npm run check:bench

.evergreen/run-custom-csfle-tests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ set -o errexit # Exit the script with error if any of the commands fail
2020
# Get access to the AWS temporary credentials:
2121
echo "adding temporary AWS credentials to environment"
2222
# CSFLE_AWS_TEMP_ACCESS_KEY_ID, CSFLE_AWS_TEMP_SECRET_ACCESS_KEY, CSFLE_AWS_TEMP_SESSION_TOKEN
23-
. "$DRIVERS_TOOLS"/.evergreen/csfle/set-temp-creds.sh
23+
pushd "$DRIVERS_TOOLS"/.evergreen/csfle
24+
. ./activate-kmstlsvenv.sh
25+
. ./set-temp-creds.sh
26+
popd
2427

2528
export MONGODB_URI=${MONGODB_URI}
2629
export KMIP_TLS_CA_FILE="${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem"

.evergreen/run-socks5-tests.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ function setup_fle() {
1818
# Get access to the AWS temporary credentials:
1919
echo "adding temporary AWS credentials to environment"
2020
# CSFLE_AWS_TEMP_ACCESS_KEY_ID, CSFLE_AWS_TEMP_SECRET_ACCESS_KEY, CSFLE_AWS_TEMP_SESSION_TOKEN
21-
. "$DRIVERS_TOOLS"/.evergreen/csfle/set-temp-creds.sh
21+
pushd "$DRIVERS_TOOLS"/.evergreen/csfle
22+
. ./activate-kmstlsvenv.sh
23+
. ./set-temp-creds.sh
24+
popd
2225

2326
export KMIP_TLS_CA_FILE="${DRIVERS_TOOLS}/.evergreen/x509gen/ca.pem"
2427
export KMIP_TLS_CERT_FILE="${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem"
@@ -27,7 +30,7 @@ function setup_fle() {
2730

2831
node -v
2932

30-
PYTHON_BINARY=${PYTHON_BINARY:-python3}
33+
PYTHON_BINARY=$(bash -c ". $DRIVERS_TOOLS/.evergreen/find-python3.sh && ensure_python3 2>/dev/null")
3134

3235
# ssl setup
3336
SSL=${SSL:-nossl}

.evergreen/run-tests.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ if [[ -z "${CLIENT_ENCRYPTION}" ]]; then
4545
unset AWS_ACCESS_KEY_ID;
4646
unset AWS_SECRET_ACCESS_KEY;
4747
else
48-
pip install --upgrade boto3
48+
pushd "$DRIVERS_TOOLS/.evergreen/csfle"
49+
. ./activate-kmstlsvenv.sh
4950
# Get access to the AWS temporary credentials:
5051
echo "adding temporary AWS credentials to environment"
5152
# CSFLE_AWS_TEMP_ACCESS_KEY_ID, CSFLE_AWS_TEMP_SECRET_ACCESS_KEY, CSFLE_AWS_TEMP_SESSION_TOKEN
52-
source "$DRIVERS_TOOLS"/.evergreen/csfle/set-temp-creds.sh
53+
source set-temp-creds.sh
54+
popd
5355
fi
5456

5557
npm install @mongodb-js/zstd

.evergreen/run-typescript.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ if [ "$TS_CHECK" == "COMPILE_DRIVER" ]; then
4444
npm run build:ts
4545
elif [ "$TS_CHECK" == "CHECK_TYPES" ]; then
4646
echo "checking driver types"
47+
if [ "$TS_VERSION" == "4.4" ]; then
4748
# check compilation
48-
node $TSC mongodb.d.ts
49+
node $TSC mongodb.d.ts --module commonjs --target es2021
50+
else
51+
node $TSC mongodb.d.ts --module node16 --target es2021
52+
fi
4953
else
5054
"Invalid value $TS_CHECK for TS_CHECK environment variable."
5155
exit 1

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ This is the lowest typescript version guaranteed to work with our driver: older
9999
Since typescript [does not restrict breaking changes to major versions](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes), we consider this support best effort.
100100
If you run into any unexpected compiler failures against our supported TypeScript versions, please let us know by filing an issue on our [JIRA](https://jira.mongodb.org/browse/NODE).
101101

102+
Additionally, our Typescript types are compatible with the ECMAScript standard for our minimum supported Node version. Currently, our Typescript targets es2021.
103+
102104
## Installation
103105

104106
The recommended way to get started using the Node.js 5.x driver is by using the `npm` (Node Package Manager) to install the dependency in your project.

0 commit comments

Comments
 (0)