Skip to content

Commit 217882a

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver into PYTHON-5213
2 parents 08b2caf + dc44b49 commit 217882a

File tree

7 files changed

+62
-65
lines changed

7 files changed

+62
-65
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -213,20 +213,6 @@ functions:
213213
params:
214214
file: ${DRIVERS_TOOLS}/mo-expansion.yml
215215

216-
"bootstrap data lake":
217-
- command: subprocess.exec
218-
type: setup
219-
params:
220-
binary: bash
221-
args:
222-
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
223-
- command: subprocess.exec
224-
type: setup
225-
params:
226-
binary: bash
227-
args:
228-
- ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/run-mongohouse-image.sh
229-
230216
"run doctests":
231217
- command: subprocess.exec
232218
type: test
@@ -348,13 +334,6 @@ tasks:
348334
TOPOLOGY: "replica_set"
349335
- func: "run tests"
350336

351-
- name: atlas-data-lake-tests
352-
commands:
353-
- func: "bootstrap data lake"
354-
- func: "run tests"
355-
vars:
356-
TEST_NAME: "data_lake"
357-
358337
# }}}
359338
- name: "coverage-report"
360339
tags: ["coverage"]

.evergreen/generated_configs/tasks.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ tasks:
88
TEST_NAME: atlas_connect
99
tags: [atlas_connect]
1010

11+
# Atlas data lake tests
12+
- name: test-atlas-data-lake-with_ext
13+
commands:
14+
- func: run tests
15+
vars:
16+
TEST_NAME: data_lake
17+
NO_EXT: "1"
18+
tags: [atlas_data_lake]
19+
- name: test-atlas-data-lake-without_ext
20+
commands:
21+
- func: run tests
22+
vars:
23+
TEST_NAME: data_lake
24+
tags: [atlas_data_lake]
25+
1126
# Aws lambda tests
1227
- name: test-aws-lambda-deployed
1328
commands:

.evergreen/generated_configs/variants.yml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -65,43 +65,21 @@ buildvariants:
6565
PYTHON_BINARY: /opt/python/3.13/bin/python3
6666

6767
# Atlas data lake tests
68-
- name: atlas-data-lake-ubuntu-22-python3.9-auth-no-c
68+
- name: atlas-data-lake-ubuntu-22-python3.9
6969
tasks:
70-
- name: atlas-data-lake-tests
71-
display_name: Atlas Data Lake Ubuntu-22 Python3.9 Auth No C
70+
- name: .atlas_data_lake
71+
display_name: Atlas Data Lake Ubuntu-22 Python3.9
7272
run_on:
7373
- ubuntu2204-small
7474
expansions:
75-
AUTH: auth
76-
NO_EXT: "1"
77-
PYTHON_BINARY: /opt/python/3.9/bin/python3
78-
- name: atlas-data-lake-ubuntu-22-python3.9-auth
79-
tasks:
80-
- name: atlas-data-lake-tests
81-
display_name: Atlas Data Lake Ubuntu-22 Python3.9 Auth
82-
run_on:
83-
- ubuntu2204-small
84-
expansions:
85-
AUTH: auth
8675
PYTHON_BINARY: /opt/python/3.9/bin/python3
87-
- name: atlas-data-lake-ubuntu-22-python3.13-auth-no-c
76+
- name: atlas-data-lake-ubuntu-22-python3.13
8877
tasks:
89-
- name: atlas-data-lake-tests
90-
display_name: Atlas Data Lake Ubuntu-22 Python3.13 Auth No C
78+
- name: .atlas_data_lake
79+
display_name: Atlas Data Lake Ubuntu-22 Python3.13
9180
run_on:
9281
- ubuntu2204-small
9382
expansions:
94-
AUTH: auth
95-
NO_EXT: "1"
96-
PYTHON_BINARY: /opt/python/3.13/bin/python3
97-
- name: atlas-data-lake-ubuntu-22-python3.13-auth
98-
tasks:
99-
- name: atlas-data-lake-tests
100-
display_name: Atlas Data Lake Ubuntu-22 Python3.13 Auth
101-
run_on:
102-
- ubuntu2204-small
103-
expansions:
104-
AUTH: auth
10583
PYTHON_BINARY: /opt/python/3.13/bin/python3
10684

10785
# Aws auth tests

.evergreen/scripts/generate_config.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def zip_cycle(*iterables, empty_default=None):
213213
yield tuple(next(i, empty_default) for i in cycles)
214214

215215

216-
def handle_c_ext(c_ext, expansions):
216+
def handle_c_ext(c_ext, expansions) -> None:
217217
"""Handle c extension option."""
218218
if c_ext == C_EXTS[0]:
219219
expansions["NO_EXT"] = "1"
@@ -600,14 +600,10 @@ def create_no_c_ext_variants():
600600
def create_atlas_data_lake_variants():
601601
variants = []
602602
host = HOSTS["ubuntu22"]
603-
for python, c_ext in product(MIN_MAX_PYTHON, C_EXTS):
604-
tasks = ["atlas-data-lake-tests"]
605-
expansions = dict(AUTH="auth")
606-
handle_c_ext(c_ext, expansions)
607-
display_name = get_display_name("Atlas Data Lake", host, python=python, **expansions)
608-
variant = create_variant(
609-
tasks, display_name, host=host, python=python, expansions=expansions
610-
)
603+
for python in MIN_MAX_PYTHON:
604+
tasks = [".atlas_data_lake"]
605+
display_name = get_display_name("Atlas Data Lake", host, python=python)
606+
variant = create_variant(tasks, display_name, host=host, python=python)
611607
variants.append(variant)
612608
return variants
613609

@@ -996,6 +992,18 @@ def create_perf_tasks():
996992
return tasks
997993

998994

995+
def create_atlas_data_lake_tasks():
996+
tags = ["atlas_data_lake"]
997+
tasks = []
998+
for c_ext in C_EXTS:
999+
vars = dict(TEST_NAME="data_lake")
1000+
handle_c_ext(c_ext, vars)
1001+
test_func = FunctionCall(func="run tests", vars=vars)
1002+
task_name = f"test-atlas-data-lake-{c_ext}"
1003+
tasks.append(EvgTask(name=task_name, tags=tags, commands=[test_func]))
1004+
return tasks
1005+
1006+
9991007
def create_ocsp_tasks():
10001008
tasks = []
10011009
tests = [

.evergreen/scripts/setup_tests.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ def handle_test_env() -> None:
197197
if key in os.environ:
198198
write_env(key, os.environ[key])
199199

200+
if test_name == "data_lake":
201+
# Stop any running mongo-orchestration which might be using the port.
202+
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh")
203+
run_command(f"bash {DRIVERS_TOOLS}/.evergreen/atlas_data_lake/setup.sh")
204+
AUTH = "auth"
205+
200206
if AUTH != "noauth":
201207
if test_name == "data_lake":
202208
config = read_env(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/secrets-export.sh")

.evergreen/scripts/teardown_tests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161

6262
teardown_mod_wsgi()
6363

64+
# Tear down data_lake if applicable.
65+
elif TEST_NAME == "data_lake":
66+
run_command(f"{DRIVERS_TOOLS}/.evergreen/atlas_data_lake/teardown.sh")
67+
6468
# Tear down coverage if applicable.
6569
if os.environ.get("COVERAGE"):
6670
shutil.rmtree(".pytest_cache", ignore_errors=True)

CONTRIBUTING.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,16 +300,23 @@ Note: these tests can only be run from an Evergreen Linux host that has the Pyth
300300
The `mode` can be `standalone` or `embedded`. For the `replica_set` version of the tests, use
301301
`TOPOLOGY=replica_set just run-server`.
302302

303+
### Atlas Data Lake tests.
304+
305+
You must have `docker` or `podman` installed locally.
306+
307+
- Run `just setup-tests data_lake`.
308+
- Run `just run-tests`.
309+
303310
### OCSP tests
304311

305-
- Export the orchestration file, e.g. `export ORCHESTRATION_FILE=rsa-basic-tls-ocsp-disableStapling.json`.
306-
This corresponds to a config file in `$DRIVERS_TOOLS/.evergreen/orchestration/configs/servers`.
307-
MongoDB servers on MacOS and Windows do not staple OCSP responses and only support RSA.
308-
- Run `just run-server ocsp`.
309-
- Run `just setup-tests ocsp <sub test>` (options are "valid", "revoked", "valid-delegate", "revoked-delegate").
310-
- Run `just run-tests`
312+
- Export the orchestration file, e.g. `export ORCHESTRATION_FILE=rsa-basic-tls-ocsp-disableStapling.json`.
313+
This corresponds to a config file in `$DRIVERS_TOOLS/.evergreen/orchestration/configs/servers`.
314+
MongoDB servers on MacOS and Windows do not staple OCSP responses and only support RSA.
315+
- Run `just run-server ocsp`.
316+
- Run `just setup-tests ocsp <sub test>` (options are "valid", "revoked", "valid-delegate", "revoked-delegate").
317+
- Run `just run-tests`
311318

312-
If you are running one of the `no-responder` tests, omit the `run-server` step.
319+
If you are running one of the `no-responder` tests, omit the `run-server` step.
313320

314321
### Perf Tests
315322

0 commit comments

Comments
 (0)