Skip to content

Commit 51a8935

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver into ocsp-cleanup
2 parents e618d7f + 3210b17 commit 51a8935

File tree

95 files changed

+2826
-1188
lines changed

Some content is hidden

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

95 files changed

+2826
-1188
lines changed

.evergreen/combine-coverage.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# Coverage combine merges (and removes) all the coverage files and
44
# generates a new .coverage file in the current directory.
55

6-
set -o xtrace # Write all commands first to stderr
7-
set -o errexit # Exit the script with error if any of the commands fail
6+
set -eu
87

98
. .evergreen/utils.sh
109

.evergreen/generated_configs/variants.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,9 @@ buildvariants:
360360
tags: [encryption_tag]
361361
- name: encryption-pyopenssl-rhel8-python3.9
362362
tasks:
363-
- name: .sharded_cluster .auth .ssl .sync_async
364-
- name: .replica_set .noauth .ssl .sync_async
365-
- name: .standalone .noauth .nossl .sync_async
363+
- name: .sharded_cluster .auth .ssl .sync
364+
- name: .replica_set .noauth .ssl .sync
365+
- name: .standalone .noauth .nossl .sync
366366
display_name: Encryption PyOpenSSL RHEL8 Python3.9
367367
run_on:
368368
- rhel87-small
@@ -374,9 +374,9 @@ buildvariants:
374374
tags: [encryption_tag]
375375
- name: encryption-pyopenssl-rhel8-python3.13
376376
tasks:
377-
- name: .sharded_cluster .auth .ssl .sync_async
378-
- name: .replica_set .noauth .ssl .sync_async
379-
- name: .standalone .noauth .nossl .sync_async
377+
- name: .sharded_cluster .auth .ssl .sync
378+
- name: .replica_set .noauth .ssl .sync
379+
- name: .standalone .noauth .nossl .sync
380380
display_name: Encryption PyOpenSSL RHEL8 Python3.13
381381
run_on:
382382
- rhel87-small
@@ -388,9 +388,9 @@ buildvariants:
388388
tags: [encryption_tag]
389389
- name: encryption-pyopenssl-rhel8-pypy3.10
390390
tasks:
391-
- name: .sharded_cluster .auth .ssl .sync_async
392-
- name: .replica_set .noauth .ssl .sync_async
393-
- name: .standalone .noauth .nossl .sync_async
391+
- name: .sharded_cluster .auth .ssl .sync
392+
- name: .replica_set .noauth .ssl .sync
393+
- name: .standalone .noauth .nossl .sync
394394
display_name: Encryption PyOpenSSL RHEL8 PyPy3.10
395395
run_on:
396396
- rhel87-small
@@ -419,15 +419,14 @@ buildvariants:
419419
TEST_NAME: encryption
420420
TEST_CRYPT_SHARED: "true"
421421
PYTHON_BINARY: /opt/python/3.11/bin/python3
422-
- name: encryption-pyopenssl-rhel8-python3.12
422+
- name: encryption-rhel8-python3.12
423423
tasks:
424424
- name: .standalone .noauth .nossl .sync_async
425-
display_name: Encryption PyOpenSSL RHEL8 Python3.12
425+
display_name: Encryption RHEL8 Python3.12
426426
run_on:
427427
- rhel87-small
428428
expansions:
429429
TEST_NAME: encryption
430-
SUB_TEST_NAME: pyopenssl
431430
PYTHON_BINARY: /opt/python/3.12/bin/python3
432431
- name: encryption-macos-python3.9
433432
tasks:
@@ -789,8 +788,8 @@ buildvariants:
789788
# Pyopenssl tests
790789
- name: pyopenssl-macos-python3.9
791790
tasks:
792-
- name: .replica_set .noauth .nossl .sync_async
793-
- name: .7.0 .noauth .nossl .sync_async
791+
- name: .replica_set .noauth .nossl .sync
792+
- name: .7.0 .noauth .nossl .sync
794793
display_name: PyOpenSSL macOS Python3.9
795794
run_on:
796795
- macos-14
@@ -800,8 +799,8 @@ buildvariants:
800799
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
801800
- name: pyopenssl-rhel8-python3.10
802801
tasks:
803-
- name: .replica_set .auth .ssl .sync_async
804-
- name: .7.0 .auth .ssl .sync_async
802+
- name: .replica_set .auth .ssl .sync
803+
- name: .7.0 .auth .ssl .sync
805804
display_name: PyOpenSSL RHEL8 Python3.10
806805
run_on:
807806
- rhel87-small
@@ -811,8 +810,8 @@ buildvariants:
811810
PYTHON_BINARY: /opt/python/3.10/bin/python3
812811
- name: pyopenssl-rhel8-python3.11
813812
tasks:
814-
- name: .replica_set .auth .ssl .sync_async
815-
- name: .7.0 .auth .ssl .sync_async
813+
- name: .replica_set .auth .ssl .sync
814+
- name: .7.0 .auth .ssl .sync
816815
display_name: PyOpenSSL RHEL8 Python3.11
817816
run_on:
818817
- rhel87-small
@@ -822,8 +821,8 @@ buildvariants:
822821
PYTHON_BINARY: /opt/python/3.11/bin/python3
823822
- name: pyopenssl-rhel8-python3.12
824823
tasks:
825-
- name: .replica_set .auth .ssl .sync_async
826-
- name: .7.0 .auth .ssl .sync_async
824+
- name: .replica_set .auth .ssl .sync
825+
- name: .7.0 .auth .ssl .sync
827826
display_name: PyOpenSSL RHEL8 Python3.12
828827
run_on:
829828
- rhel87-small
@@ -833,8 +832,8 @@ buildvariants:
833832
PYTHON_BINARY: /opt/python/3.12/bin/python3
834833
- name: pyopenssl-win64-python3.13
835834
tasks:
836-
- name: .replica_set .auth .ssl .sync_async
837-
- name: .7.0 .auth .ssl .sync_async
835+
- name: .replica_set .auth .ssl .sync
836+
- name: .7.0 .auth .ssl .sync
838837
display_name: PyOpenSSL Win64 Python3.13
839838
run_on:
840839
- windows-64-vsMulti-small
@@ -844,8 +843,8 @@ buildvariants:
844843
PYTHON_BINARY: C:/python/Python313/python.exe
845844
- name: pyopenssl-rhel8-pypy3.10
846845
tasks:
847-
- name: .replica_set .auth .ssl .sync_async
848-
- name: .7.0 .auth .ssl .sync_async
846+
- name: .replica_set .auth .ssl .sync
847+
- name: .7.0 .auth .ssl .sync
849848
display_name: PyOpenSSL RHEL8 PyPy3.10
850849
run_on:
851850
- rhel87-small

.evergreen/resync-specs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
2-
# exit when any command fails
3-
set -e
2+
# Resync test files from the specifications repo.
3+
set -eu
44
PYMONGO=$(dirname "$(cd "$(dirname "$0")"; pwd)")
55
SPECS=${MDB_SPECS:-~/Work/specifications}
66

.evergreen/run-import-time-test.sh

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

.evergreen/run-mongodb-aws-ecs-test.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
2-
3-
# Don't trace since the URI contains a password that shouldn't show up in the logs
4-
set -o errexit # Exit the script with error if any of the commands fail
2+
# Script run on an ECS host to test MONGODB-AWS.
3+
set -eu
54

65
############################################
76
# Main Program #

.evergreen/run-mongodb-oidc-test.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
2-
3-
set +x # Disable debug trace
2+
# Script run on a remote host to test MONGODB-OIDC.
43
set -eu
54

65
echo "Running MONGODB-OIDC authentication tests on ${OIDC_ENV}..."

.evergreen/run-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
# Run a test suite that was configured with setup-tests.sh.
23
set -eu
34

45
SCRIPT_DIR=$(dirname ${BASH_SOURCE:-$0})
Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,43 @@
11
#!/bin/bash
2+
# Check for regressions in the import time of pymongo.
3+
set -eu
24

3-
. .evergreen/scripts/env.sh
4-
set -x
5-
export BASE_SHA="$1"
6-
export HEAD_SHA="$2"
7-
bash .evergreen/run-import-time-test.sh
5+
HERE=$(dirname ${BASH_SOURCE:-$0})
6+
7+
source $HERE/env.sh
8+
9+
pushd $HERE/../.. >/dev/null
10+
11+
BASE_SHA="$1"
12+
HEAD_SHA="$2"
13+
14+
. .evergreen/utils.sh
15+
16+
if [ -z "${PYTHON_BINARY:-}" ]; then
17+
PYTHON_BINARY=$(find_python3)
18+
fi
19+
20+
# Use the previous commit if this was not a PR run.
21+
if [ "$BASE_SHA" == "$HEAD_SHA" ]; then
22+
BASE_SHA=$(git rev-parse HEAD~1)
23+
fi
24+
25+
function get_import_time() {
26+
local log_file
27+
createvirtualenv "$PYTHON_BINARY" import-venv
28+
python -m pip install -q ".[aws,encryption,gssapi,ocsp,snappy,zstd]"
29+
# Import once to cache modules
30+
python -c "import pymongo"
31+
log_file="pymongo-$1.log"
32+
python -X importtime -c "import pymongo" 2> $log_file
33+
}
34+
35+
get_import_time $HEAD_SHA
36+
git stash || true
37+
git checkout $BASE_SHA
38+
get_import_time $BASE_SHA
39+
git checkout $HEAD_SHA
40+
git stash apply || true
41+
python tools/compare_import_time.py $HEAD_SHA $BASE_SHA
42+
43+
popd >/dev/null

.evergreen/scripts/cleanup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
# Clean up resources at the end of an evergreen run.
3+
set -eu
24

35
HERE=$(dirname ${BASH_SOURCE:-$0})
46

@@ -9,4 +11,4 @@ if [ -f $HERE/env.sh ]; then
911
fi
1012

1113
rm -rf "${DRIVERS_TOOLS}" || true
12-
rm -f ./secrets-export.sh || true
14+
rm -f $HERE/../../secrets-export.sh || true

.evergreen/scripts/configure-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
2+
# Configure an evergreen test environment.
33
set -eu
44

55
# Get the current unique version of this checkout

0 commit comments

Comments
 (0)