Skip to content

Commit 9569a35

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 7ae2d95 + 4cac781 commit 9569a35

File tree

8 files changed

+123
-52
lines changed

8 files changed

+123
-52
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3083,6 +3083,50 @@ tasks:
30833083
SUB_TEST_NAME: gke
30843084
tags: [auth_oidc, auth_oidc_remote]
30853085

3086+
# Other hosts tests
3087+
- name: test-sync-noauth-nossl-standalone
3088+
commands:
3089+
- func: run server
3090+
vars:
3091+
AUTH: noauth
3092+
SSL: nossl
3093+
TOPOLOGY: standalone
3094+
- func: run tests
3095+
vars:
3096+
AUTH: noauth
3097+
SSL: nossl
3098+
TOPOLOGY: standalone
3099+
TEST_NAME: default_sync
3100+
tags: [other-hosts, standalone-noauth-nossl]
3101+
- name: test-async-noauth-ssl-replica-set
3102+
commands:
3103+
- func: run server
3104+
vars:
3105+
AUTH: noauth
3106+
SSL: ssl
3107+
TOPOLOGY: replica_set
3108+
- func: run tests
3109+
vars:
3110+
AUTH: noauth
3111+
SSL: ssl
3112+
TOPOLOGY: replica_set
3113+
TEST_NAME: default_async
3114+
tags: [other-hosts, replica_set-noauth-ssl]
3115+
- name: test-sync-auth-ssl-sharded-cluster
3116+
commands:
3117+
- func: run server
3118+
vars:
3119+
AUTH: auth
3120+
SSL: ssl
3121+
TOPOLOGY: sharded_cluster
3122+
- func: run tests
3123+
vars:
3124+
AUTH: auth
3125+
SSL: ssl
3126+
TOPOLOGY: sharded_cluster
3127+
TEST_NAME: default_sync
3128+
tags: [other-hosts, sharded_cluster-auth-ssl]
3129+
30863130
# Perf tests
30873131
- name: perf-8.0-standalone-ssl
30883132
commands:

.evergreen/generated_configs/variants.yml

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,66 @@
11
buildvariants:
22
# Alternative hosts tests
3-
- name: openssl-1.0.2-rhel7-python3.9
3+
- name: openssl-1.0.2-rhel7-v5.0-python3.9
44
tasks:
5-
- name: .5.0 .standalone !.sync_async
6-
display_name: OpenSSL 1.0.2 RHEL7 Python3.9
5+
- name: .other-hosts
6+
display_name: OpenSSL 1.0.2 RHEL7 v5.0 Python3.9
77
run_on:
88
- rhel79-small
99
batchtime: 10080
1010
expansions:
11+
VERSION: "5.0"
12+
PYTHON_VERSION: "3.9"
1113
PYTHON_BINARY: /opt/python/3.9/bin/python3
12-
- name: other-hosts-rhel9-fips
14+
- name: other-hosts-rhel9-fips-latest
1315
tasks:
14-
- name: .6.0 .standalone !.sync_async
15-
display_name: Other hosts RHEL9-FIPS
16+
- name: .other-hosts
17+
display_name: Other hosts RHEL9-FIPS latest
1618
run_on:
1719
- rhel92-fips
1820
batchtime: 10080
1921
expansions:
22+
VERSION: latest
2023
NO_EXT: "1"
2124
REQUIRE_FIPS: "1"
22-
- name: other-hosts-rhel8-zseries
25+
- name: other-hosts-rhel8-zseries-latest
2326
tasks:
24-
- name: .6.0 .standalone !.sync_async
25-
display_name: Other hosts RHEL8-zseries
27+
- name: .other-hosts
28+
display_name: Other hosts RHEL8-zseries latest
2629
run_on:
2730
- rhel8-zseries-small
2831
batchtime: 10080
2932
expansions:
33+
VERSION: latest
3034
NO_EXT: "1"
31-
- name: other-hosts-rhel8-power8
35+
- name: other-hosts-rhel8-power8-latest
3236
tasks:
33-
- name: .6.0 .standalone !.sync_async
34-
display_name: Other hosts RHEL8-POWER8
37+
- name: .other-hosts
38+
display_name: Other hosts RHEL8-POWER8 latest
3539
run_on:
3640
- rhel8-power-small
3741
batchtime: 10080
3842
expansions:
43+
VERSION: latest
3944
NO_EXT: "1"
40-
- name: other-hosts-rhel8-arm64
45+
- name: other-hosts-rhel8-arm64-latest
4146
tasks:
42-
- name: .6.0 .standalone !.sync_async
43-
display_name: Other hosts RHEL8-arm64
47+
- name: .other-hosts
48+
display_name: Other hosts RHEL8-arm64 latest
4449
run_on:
4550
- rhel82-arm64-small
4651
batchtime: 10080
4752
expansions:
53+
VERSION: latest
4854
NO_EXT: "1"
49-
- name: other-hosts-amazon2023
55+
- name: other-hosts-amazon2023-latest
5056
tasks:
51-
- name: .latest !.sync_async .sharded_cluster .auth .ssl
52-
- name: .latest !.sync_async .replica_set .noauth .ssl
53-
- name: .latest !.sync_async .standalone .noauth .nossl
54-
display_name: Other hosts Amazon2023
57+
- name: .other-hosts
58+
display_name: Other hosts Amazon2023 latest
5559
run_on:
5660
- amazon2023-arm64-latest-large-m8g
5761
batchtime: 10080
5862
expansions:
63+
VERSION: latest
5964
NO_EXT: "1"
6065

6166
# Atlas connect tests
@@ -531,17 +536,6 @@ buildvariants:
531536
AUTH: auth
532537
SSL: ssl
533538
PYTHON_BINARY: /opt/python/3.9/bin/python3
534-
- name: green-eventlet-rhel8-python3.13
535-
tasks:
536-
- name: .standalone .noauth .nossl .sync_async
537-
display_name: Green Eventlet RHEL8 Python3.13
538-
run_on:
539-
- rhel87-small
540-
expansions:
541-
GREEN_FRAMEWORK: eventlet
542-
AUTH: auth
543-
SSL: ssl
544-
PYTHON_BINARY: /opt/python/3.13/bin/python3
545539
- name: green-gevent-rhel8-python3.13
546540
tasks:
547541
- name: .standalone .noauth .nossl .sync_async

.evergreen/scripts/generate_config.py

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
create_variant,
2323
get_assume_role,
2424
get_s3_put,
25+
get_standard_auth_ssl,
2526
get_subprocess_exec,
2627
get_task_name,
2728
get_variant_name,
@@ -342,6 +343,10 @@ def create_green_framework_variants():
342343
tasks = [".standalone .noauth .nossl .sync_async"]
343344
host = DEFAULT_HOST
344345
for python, framework in product([CPYTHONS[0], CPYTHONS[-1]], ["eventlet", "gevent"]):
346+
if framework == "eventlet" and python == CPYTHONS[-1]:
347+
# Eventlet has issues with dnspython > 2.0 and newer versions of CPython
348+
# https://jira.mongodb.org/browse/PYTHON-5284
349+
continue
345350
expansions = dict(GREEN_FRAMEWORK=framework, AUTH="auth", SSL="ssl")
346351
display_name = get_variant_name(f"Green {framework.capitalize()}", host, python=python)
347352
variant = create_variant(
@@ -548,29 +553,29 @@ def create_alternative_hosts_variants():
548553
variants = []
549554

550555
host = HOSTS["rhel7"]
556+
version = "5.0"
551557
variants.append(
552558
create_variant(
553-
[".5.0 .standalone !.sync_async"],
554-
get_variant_name("OpenSSL 1.0.2", host, python=CPYTHONS[0]),
559+
[".other-hosts"],
560+
get_variant_name("OpenSSL 1.0.2", host, python=CPYTHONS[0], version=version),
555561
host=host,
556562
python=CPYTHONS[0],
557563
batchtime=batchtime,
564+
expansions=dict(VERSION=version, PYTHON_VERSION=CPYTHONS[0]),
558565
)
559566
)
560567

568+
version = "latest"
561569
for host_name in OTHER_HOSTS:
562-
expansions = dict()
570+
expansions = dict(VERSION="latest")
563571
handle_c_ext(C_EXTS[0], expansions)
564572
host = HOSTS[host_name]
565573
if "fips" in host_name.lower():
566574
expansions["REQUIRE_FIPS"] = "1"
567-
tags = [".6.0 .standalone !.sync_async"]
568-
if host_name == "Amazon2023":
569-
tags = [f".latest !.sync_async {t}" for t in SUB_TASKS]
570575
variants.append(
571576
create_variant(
572-
tags,
573-
display_name=get_variant_name("Other hosts", host),
577+
[".other-hosts"],
578+
display_name=get_variant_name("Other hosts", host, version=version),
574579
batchtime=batchtime,
575580
host=host,
576581
expansions=expansions,
@@ -615,14 +620,32 @@ def create_server_version_tasks():
615620
return tasks
616621

617622

623+
def create_other_hosts_tasks():
624+
tasks = []
625+
626+
for topology, sync in zip_cycle(TOPOLOGIES, SYNCS):
627+
auth, ssl = get_standard_auth_ssl(topology)
628+
tags = [
629+
"other-hosts",
630+
f"{topology}-{auth}-{ssl}",
631+
]
632+
expansions = dict(AUTH=auth, SSL=ssl, TOPOLOGY=topology)
633+
name = get_task_name("test", sync=sync, **expansions)
634+
server_func = FunctionCall(func="run server", vars=expansions)
635+
test_vars = expansions.copy()
636+
test_vars["TEST_NAME"] = f"default_{sync}"
637+
test_func = FunctionCall(func="run tests", vars=test_vars)
638+
tasks.append(EvgTask(name=name, tags=tags, commands=[server_func, test_func]))
639+
return tasks
640+
641+
618642
def create_standard_linux_tasks():
619643
tasks = []
620644

621645
for (version, topology), python in zip_cycle(
622646
list(product(ALL_VERSIONS, TOPOLOGIES)), ALL_PYTHONS
623647
):
624-
auth = "auth" if topology == "sharded_cluster" else "noauth"
625-
ssl = "nossl" if topology == "standalone" else "ssl"
648+
auth, ssl = get_standard_auth_ssl(topology)
626649
tags = [
627650
"standard-linux",
628651
f"server-{version}",
@@ -645,8 +668,7 @@ def create_standard_non_linux_tasks():
645668
for (version, topology), python, sync in zip_cycle(
646669
list(product(ALL_VERSIONS, TOPOLOGIES)), CPYTHONS, SYNCS
647670
):
648-
auth = "auth" if topology == "sharded_cluster" else "noauth"
649-
ssl = "nossl" if topology == "standalone" else "ssl"
671+
auth, ssl = get_standard_auth_ssl(topology)
650672
tags = [
651673
"standard-non-linux",
652674
f"server-{version}",

.evergreen/scripts/generate_config_utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,12 @@ def handle_c_ext(c_ext, expansions) -> None:
239239
expansions["NO_EXT"] = "1"
240240

241241

242+
def get_standard_auth_ssl(topology):
243+
auth = "auth" if topology == "sharded_cluster" else "noauth"
244+
ssl = "nossl" if topology == "standalone" else "ssl"
245+
return auth, ssl
246+
247+
242248
def get_assume_role(**kwargs):
243249
kwargs.setdefault("command_type", EvgCommandType.SETUP)
244250
kwargs.setdefault("role_arn", "${assume_role_arn}")

.evergreen/scripts/setup_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,9 @@ def handle_test_env() -> None:
387387
if not DRIVERS_TOOLS:
388388
raise RuntimeError("Missing DRIVERS_TOOLS")
389389
csfle_dir = Path(f"{DRIVERS_TOOLS}/.evergreen/csfle")
390-
run_command(f"bash {csfle_dir}/setup-secrets.sh", cwd=csfle_dir)
390+
run_command(f"bash {csfle_dir.as_posix()}/setup-secrets.sh", cwd=csfle_dir)
391391
load_config_from_file(csfle_dir / "secrets-export.sh")
392-
run_command(f"bash {csfle_dir}/start-servers.sh")
392+
run_command(f"bash {csfle_dir.as_posix()}/start-servers.sh")
393393

394394
if sub_test_name == "pyopenssl":
395395
UV_ARGS.append("--extra ocsp")

.github/workflows/release-python.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ name: Release
33
on:
44
workflow_dispatch:
55
inputs:
6-
version:
7-
description: "The new version to set"
8-
required: true
96
following_version:
107
description: "The post (dev) version to set"
11-
required: true
128
dry_run:
139
description: "Dry Run?"
1410
default: false
@@ -26,7 +22,6 @@ env:
2622
# to 'false' when the input is set to 'false'.
2723
DRY_RUN: ${{ ! contains(inputs.dry_run, 'false') }}
2824
FOLLOWING_VERSION: ${{ inputs.following_version || '' }}
29-
VERSION: ${{ inputs.version || '10.10.10.10' }}
3025

3126
defaults:
3227
run:
@@ -56,7 +51,6 @@ jobs:
5651
- uses: mongodb-labs/drivers-github-tools/python/pre-publish@v2
5752
id: pre-publish
5853
with:
59-
version: ${{ env.VERSION }}
6054
dry_run: ${{ env.DRY_RUN }}
6155

6256
build-dist:
@@ -118,7 +112,6 @@ jobs:
118112
artifactory_username: ${{ vars.ARTIFACTORY_USERNAME }}
119113
- uses: mongodb-labs/drivers-github-tools/python/post-publish@v2
120114
with:
121-
version: ${{ env.VERSION }}
122115
following_version: ${{ env.FOLLOWING_VERSION }}
123116
product_name: ${{ env.PRODUCT_NAME }}
124117
evergreen_project: ${{ env.EVERGREEN_PROJECT }}

test/asynchronous/unified_format.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,12 @@ def maybe_skip_test(self, spec):
551551
self.skipTest("PYTHON-5170 tests are flakey")
552552
if "Driver extends timeout while streaming" in spec["description"] and not _IS_SYNC:
553553
self.skipTest("PYTHON-5174 tests are flakey")
554+
if (
555+
"inserting _id with type null via clientBulkWrite" in spec["description"]
556+
or "commitTransaction fails after Interrupted" in spec["description"]
557+
or "commit is not retried after MaxTimeMSExpired error" in spec["description"]
558+
) and async_client_context.serverless:
559+
self.skipTest("PYTHON-5326 known serverless failures")
554560

555561
class_name = self.__class__.__name__.lower()
556562
description = spec["description"].lower()

test/unified_format.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,12 @@ def maybe_skip_test(self, spec):
550550
self.skipTest("PYTHON-5170 tests are flakey")
551551
if "Driver extends timeout while streaming" in spec["description"] and not _IS_SYNC:
552552
self.skipTest("PYTHON-5174 tests are flakey")
553+
if (
554+
"inserting _id with type null via clientBulkWrite" in spec["description"]
555+
or "commitTransaction fails after Interrupted" in spec["description"]
556+
or "commit is not retried after MaxTimeMSExpired error" in spec["description"]
557+
) and client_context.serverless:
558+
self.skipTest("PYTHON-5326 known serverless failures")
553559

554560
class_name = self.__class__.__name__.lower()
555561
description = spec["description"].lower()

0 commit comments

Comments
 (0)