Skip to content

Commit af61bbd

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 0ca854e + 13cf110 commit af61bbd

File tree

108 files changed

+14076
-1563
lines changed

Some content is hidden

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

108 files changed

+14076
-1563
lines changed

.evergreen/config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,8 @@ tasks:
21262126
script: |
21272127
${PREPARE_SHELL}
21282128
export PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3
2129-
export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/${bucket_name}/libmongocrypt/debian10/master/latest/libmongocrypt.tar.gz
2129+
export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz
2130+
SKIP_SERVERS=1 bash ./.evergreen/setup-encryption.sh
21302131
SUCCESS=false TEST_FLE_GCP_AUTO=1 ./.evergreen/hatch.sh test:test-eg
21312132
21322133
- name: testazurekms-task
@@ -3144,7 +3145,7 @@ buildvariants:
31443145
- name: testgcpkms-variant
31453146
display_name: "GCP KMS"
31463147
run_on:
3147-
- debian10-small
3148+
- debian11-small
31483149
tasks:
31493150
- name: testgcpkms_task_group
31503151
batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README

.evergreen/resync-specs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ do
137137
srv|SRV|initial-dns-seedlist-discovery|srv_seedlist)
138138
cpjson initial-dns-seedlist-discovery/tests/ srv_seedlist
139139
;;
140+
read-write-concern|read_write_concern)
141+
cpjson read-write-concern/tests/operation read_write_concern/operation
142+
;;
140143
retryable-reads|retryable_reads)
141144
cpjson retryable-reads/tests/ retryable_reads
142145
;;

.evergreen/run-azurekms-fail-test.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/bin/bash
22
set -o errexit # Exit the script with error if any of the commands fail
3-
3+
HERE=$(dirname ${BASH_SOURCE:-$0})
44
. $DRIVERS_TOOLS/.evergreen/csfle/azurekms/setup-secrets.sh
5+
export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz
6+
SKIP_SERVERS=1 bash $HERE/setup-encryption.sh
57
PYTHON_BINARY=/opt/mongodbtoolchain/v4/bin/python3 \
68
KEY_NAME="${AZUREKMS_KEYNAME}" \
79
KEY_VAULT_ENDPOINT="${AZUREKMS_KEYVAULTENDPOINT}" \
8-
LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian10/master/latest/libmongocrypt.tar.gz \
910
SUCCESS=false TEST_FLE_AZURE_AUTO=1 \
10-
./.evergreen/hatch.sh test:test-eg
11+
$HERE/hatch.sh test:test-eg
12+
bash $HERE/teardown-encryption.sh

.evergreen/run-azurekms-test.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#!/bin/bash
22
set -o errexit # Exit the script with error if any of the commands fail
3-
3+
HERE=$(dirname ${BASH_SOURCE:-$0})
44
source ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/secrets-export.sh
55
echo "Copying files ... begin"
66
export AZUREKMS_RESOURCEGROUP=${AZUREKMS_RESOURCEGROUP}
77
export AZUREKMS_VMNAME=${AZUREKMS_VMNAME}
88
export AZUREKMS_PRIVATEKEYPATH=/tmp/testazurekms_privatekey
9+
export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz
10+
SKIP_SERVERS=1 bash $HERE/setup-encryption.sh
911
tar czf /tmp/mongo-python-driver.tgz .
1012
# shellcheck disable=SC2088
1113
AZUREKMS_SRC="/tmp/mongo-python-driver.tgz" AZUREKMS_DST="~/" \
@@ -16,6 +18,7 @@ AZUREKMS_CMD="tar xf mongo-python-driver.tgz" \
1618
$DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh
1719
echo "Untarring file ... end"
1820
echo "Running test ... begin"
19-
AZUREKMS_CMD="KEY_NAME=\"$AZUREKMS_KEYNAME\" KEY_VAULT_ENDPOINT=\"$AZUREKMS_KEYVAULTENDPOINT\" LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian10/master/latest/libmongocrypt.tar.gz SUCCESS=true TEST_FLE_AZURE_AUTO=1 ./.evergreen/hatch.sh test:test-eg" \
21+
AZUREKMS_CMD="KEY_NAME=\"$AZUREKMS_KEYNAME\" KEY_VAULT_ENDPOINT=\"$AZUREKMS_KEYVAULTENDPOINT\" SUCCESS=true TEST_FLE_AZURE_AUTO=1 ./.evergreen/hatch.sh test:test-eg" \
2022
$DRIVERS_TOOLS/.evergreen/csfle/azurekms/run-command.sh
2123
echo "Running test ... end"
24+
bash $HERE/teardown-encryption.sh

.evergreen/run-gcpkms-test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
#!/bin/bash
22
set -o errexit # Exit the script with error if any of the commands fail
3+
HERE=$(dirname ${BASH_SOURCE:-$0})
34

45
source ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/secrets-export.sh
56
echo "Copying files ... begin"
67
export GCPKMS_GCLOUD=${GCPKMS_GCLOUD}
78
export GCPKMS_PROJECT=${GCPKMS_PROJECT}
89
export GCPKMS_ZONE=${GCPKMS_ZONE}
910
export GCPKMS_INSTANCENAME=${GCPKMS_INSTANCENAME}
11+
export LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian11/master/latest/libmongocrypt.tar.gz
12+
SKIP_SERVERS=1 bash $HERE/setup-encryption.sh
1013
tar czf /tmp/mongo-python-driver.tgz .
1114
GCPKMS_SRC=/tmp/mongo-python-driver.tgz GCPKMS_DST=$GCPKMS_INSTANCENAME: $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/copy-file.sh
1215
echo "Copying files ... end"
1316
echo "Untarring file ... begin"
1417
GCPKMS_CMD="tar xf mongo-python-driver.tgz" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
1518
echo "Untarring file ... end"
1619
echo "Running test ... begin"
17-
GCPKMS_CMD="SUCCESS=true TEST_FLE_GCP_AUTO=1 LIBMONGOCRYPT_URL=https://s3.amazonaws.com/mciuploads/libmongocrypt/debian10/master/latest/libmongocrypt.tar.gz ./.evergreen/hatch.sh test:test-eg" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
20+
GCPKMS_CMD="SUCCESS=true TEST_FLE_GCP_AUTO=1 ./.evergreen/hatch.sh test:test-eg" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh
1821
echo "Running test ... end"
22+
bash $HERE/teardown-encryption.sh

.evergreen/run-tests.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ if [ -n "$TEST_PYOPENSSL" ]; then
121121
fi
122122

123123
if [ -n "$TEST_ENCRYPTION" ] || [ -n "$TEST_FLE_AZURE_AUTO" ] || [ -n "$TEST_FLE_GCP_AUTO" ]; then
124-
125-
python -m pip install '.[encryption]'
126-
127-
# Setup encryption if necessary.
124+
# Check for libmongocrypt checkout.
128125
if [ ! -d "libmongocrypt" ]; then
129-
bash ./.evergreen/setup-encryption.sh
126+
echo "Run encryption setup first!"
127+
exit 1
130128
fi
131129

130+
python -m pip install '.[encryption]'
131+
132132
# Use the nocrypto build to avoid dependency issues with older windows/python versions.
133133
BASE=$(pwd)/libmongocrypt/nocrypto
134134
if [ -f "${BASE}/lib/libmongocrypt.so" ]; then

.evergreen/setup-encryption.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -o xtrace
44

55
if [ -z "${DRIVERS_TOOLS}" ]; then
66
echo "Missing environment variable DRIVERS_TOOLS"
7+
exit 1
78
fi
89

910
TARGET=""
@@ -50,5 +51,7 @@ tar xzf libmongocrypt.tar.gz -C ./libmongocrypt
5051
ls -la libmongocrypt
5152
ls -la libmongocrypt/nocrypto
5253

53-
bash ${DRIVERS_TOOLS}/.evergreen/csfle/setup-secrets.sh
54-
bash ${DRIVERS_TOOLS}/.evergreen/csfle/start-servers.sh
54+
if [ -z "${SKIP_SERVERS:-}" ]; then
55+
bash ${DRIVERS_TOOLS}/.evergreen/csfle/setup-secrets.sh
56+
bash ${DRIVERS_TOOLS}/.evergreen/csfle/start-servers.sh
57+
fi

0 commit comments

Comments
 (0)