Skip to content

Commit 25de52a

Browse files
authored
PYTHON-4892 Use shrub.py for remaining axes (mongodb#1957)
1 parent 081ad89 commit 25de52a

File tree

2 files changed

+115
-138
lines changed

2 files changed

+115
-138
lines changed

.evergreen/config.yml

Lines changed: 65 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,47 +2112,6 @@ axes:
21122112
AUTH: "noauth"
21132113
SSL: "nossl"
21142114

2115-
# Choice of MongoDB server version
2116-
- id: mongodb-version
2117-
display_name: "MongoDB"
2118-
values:
2119-
- id: "4.0"
2120-
display_name: "MongoDB 4.0"
2121-
variables:
2122-
VERSION: "4.0"
2123-
- id: "4.2"
2124-
display_name: "MongoDB 4.2"
2125-
variables:
2126-
VERSION: "4.2"
2127-
- id: "4.4"
2128-
display_name: "MongoDB 4.4"
2129-
variables:
2130-
VERSION: "4.4"
2131-
- id: "5.0"
2132-
display_name: "MongoDB 5.0"
2133-
variables:
2134-
VERSION: "5.0"
2135-
- id: "6.0"
2136-
display_name: "MongoDB 6.0"
2137-
variables:
2138-
VERSION: "6.0"
2139-
- id: "7.0"
2140-
display_name: "MongoDB 7.0"
2141-
variables:
2142-
VERSION: "7.0"
2143-
- id: "8.0"
2144-
display_name: "MongoDB 8.0"
2145-
variables:
2146-
VERSION: "8.0"
2147-
- id: "latest"
2148-
display_name: "MongoDB latest"
2149-
variables:
2150-
VERSION: "latest"
2151-
- id: "rapid"
2152-
display_name: "MongoDB rapid"
2153-
variables:
2154-
VERSION: "rapid"
2155-
21562115
# Choice of Python runtime version
21572116
- id: python-version
21582117
display_name: "Python"
@@ -2212,69 +2171,6 @@ axes:
22122171
variables:
22132172
PYTHON_BINARY: "C:/python/Python313/python.exe"
22142173

2215-
- id: python-version-windows-32
2216-
display_name: "Python"
2217-
values:
2218-
2219-
2220-
- id: "3.9"
2221-
display_name: "32-bit Python 3.9"
2222-
variables:
2223-
PYTHON_BINARY: "C:/python/32/Python39/python.exe"
2224-
- id: "3.10"
2225-
display_name: "32-bit Python 3.10"
2226-
variables:
2227-
PYTHON_BINARY: "C:/python/32/Python310/python.exe"
2228-
- id: "3.11"
2229-
display_name: "32-bit Python 3.11"
2230-
variables:
2231-
PYTHON_BINARY: "C:/python/32/Python311/python.exe"
2232-
- id: "3.12"
2233-
display_name: "32-bit Python 3.12"
2234-
variables:
2235-
PYTHON_BINARY: "C:/python/32/Python312/python.exe"
2236-
- id: "3.13"
2237-
display_name: "32-bit Python 3.13"
2238-
variables:
2239-
PYTHON_BINARY: "C:/python/32/Python313/python.exe"
2240-
2241-
# Choice of mod_wsgi version
2242-
- id: mod-wsgi-version
2243-
display_name: "mod_wsgi version"
2244-
values:
2245-
- id: "4"
2246-
display_name: "mod_wsgi 4.x"
2247-
variables:
2248-
MOD_WSGI_VERSION: "4"
2249-
2250-
# Run with test commands disabled on server?
2251-
- id: disableTestCommands
2252-
display_name: Disable test commands
2253-
values:
2254-
- id: disabled
2255-
display_name: disabled
2256-
variables:
2257-
DISABLE_TEST_COMMANDS: "1"
2258-
2259-
# Generate coverage report?
2260-
- id: coverage
2261-
display_name: "Coverage"
2262-
values:
2263-
- id: "coverage"
2264-
display_name: "Coverage"
2265-
tags: ["coverage_tag"]
2266-
variables:
2267-
COVERAGE: "coverage"
2268-
2269-
- id: serverless
2270-
display_name: "Serverless"
2271-
values:
2272-
- id: "enabled"
2273-
display_name: "Serverless"
2274-
variables:
2275-
test_serverless: true
2276-
batchtime: 10080 # 7 days
2277-
22782174
buildvariants:
22792175
# Server Tests for RHEL8.
22802176
- name: test-rhel8-py3.9-auth-ssl-cov
@@ -3530,6 +3426,71 @@ buildvariants:
35303426
expansions:
35313427
PYTHON_BINARY: /opt/python/3.13/bin/python3
35323428

3429+
# Mod_wsgi tests.
3430+
- name: mod_wsgi-ubuntu-22-py3.9
3431+
tasks:
3432+
- name: mod-wsgi-standalone
3433+
- name: mod-wsgi-replica-set
3434+
- name: mod-wsgi-embedded-mode-standalone
3435+
- name: mod-wsgi-embedded-mode-replica-set
3436+
display_name: mod_wsgi Ubuntu-22 py3.9
3437+
run_on:
3438+
- ubuntu2204-small
3439+
expansions:
3440+
MOD_WSGI_VERSION: "4"
3441+
PYTHON_BINARY: /opt/python/3.9/bin/python3
3442+
- name: mod_wsgi-ubuntu-22-py3.13
3443+
tasks:
3444+
- name: mod-wsgi-standalone
3445+
- name: mod-wsgi-replica-set
3446+
- name: mod-wsgi-embedded-mode-standalone
3447+
- name: mod-wsgi-embedded-mode-replica-set
3448+
display_name: mod_wsgi Ubuntu-22 py3.13
3449+
run_on:
3450+
- ubuntu2204-small
3451+
expansions:
3452+
MOD_WSGI_VERSION: "4"
3453+
PYTHON_BINARY: /opt/python/3.13/bin/python3
3454+
3455+
# Disable test commands variants.
3456+
- name: disable-test-commands-rhel8-py3.9
3457+
tasks:
3458+
- name: .latest
3459+
display_name: Disable test commands RHEL8 py3.9
3460+
run_on:
3461+
- rhel87-small
3462+
expansions:
3463+
AUTH: auth
3464+
SSL: ssl
3465+
DISABLE_TEST_COMMANDS: "1"
3466+
PYTHON_BINARY: /opt/python/3.9/bin/python3
3467+
3468+
# Serverless variants.
3469+
- name: serverless-rhel8-py3.9
3470+
tasks:
3471+
- name: serverless_task_group
3472+
display_name: Serverless RHEL8 py3.9
3473+
run_on:
3474+
- rhel87-small
3475+
batchtime: 10080
3476+
expansions:
3477+
test_serverless: "true"
3478+
AUTH: auth
3479+
SSL: ssl
3480+
PYTHON_BINARY: /opt/python/3.9/bin/python3
3481+
- name: serverless-rhel8-py3.13
3482+
tasks:
3483+
- name: serverless_task_group
3484+
display_name: Serverless RHEL8 py3.13
3485+
run_on:
3486+
- rhel87-small
3487+
batchtime: 10080
3488+
expansions:
3489+
test_serverless: "true"
3490+
AUTH: auth
3491+
SSL: ssl
3492+
PYTHON_BINARY: /opt/python/3.13/bin/python3
3493+
35333494
- matrix_name: "tests-fips"
35343495
matrix_spec:
35353496
platform:
@@ -3562,16 +3523,6 @@ buildvariants:
35623523
tasks:
35633524
- ".5.0"
35643525

3565-
# enableTestCommands=0 tests on RHEL 8.4 (x86_64) with Python 3.9.
3566-
- matrix_name: "test-disableTestCommands"
3567-
matrix_spec:
3568-
platform: rhel8
3569-
disableTestCommands: "*"
3570-
python-version: "3.9"
3571-
display_name: "Disable test commands ${python-version} ${platform}"
3572-
tasks:
3573-
- ".latest"
3574-
35753526
- matrix_name: "test-search-index-helpers"
35763527
matrix_spec:
35773528
platform: rhel8
@@ -3580,18 +3531,6 @@ buildvariants:
35803531
tasks:
35813532
- name: "test_atlas_task_group_search_indexes"
35823533

3583-
- matrix_name: "tests-mod-wsgi"
3584-
matrix_spec:
3585-
platform: ubuntu-22.04
3586-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
3587-
mod-wsgi-version: "*"
3588-
display_name: "${mod-wsgi-version} ${python-version} ${platform}"
3589-
tasks:
3590-
- name: "mod-wsgi-standalone"
3591-
- name: "mod-wsgi-replica-set"
3592-
- name: "mod-wsgi-embedded-mode-standalone"
3593-
- name: "mod-wsgi-embedded-mode-replica-set"
3594-
35953534
- matrix_name: "mockupdb-tests"
35963535
matrix_spec:
35973536
platform: rhel8
@@ -3630,16 +3569,6 @@ buildvariants:
36303569
tasks:
36313570
- name: "atlas-connect"
36323571

3633-
- matrix_name: "serverless"
3634-
matrix_spec:
3635-
platform: rhel8
3636-
python-version: "*"
3637-
auth-ssl: auth-ssl
3638-
serverless: "enabled"
3639-
display_name: "${serverless} ${python-version} ${platform}"
3640-
tasks:
3641-
- "serverless_task_group"
3642-
36433572
# OCSP test matrix.
36443573
- name: ocsp-test-rhel8-v4.4-py3.9
36453574
tasks:

.evergreen/scripts/generate_config.py

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class Host:
5454
HOSTS["win32"] = Host("win32", "windows-64-vsMulti-small", "Win32")
5555
HOSTS["macos"] = Host("macos", "macos-14", "macOS")
5656
HOSTS["macos-arm64"] = Host("macos-arm64", "macos-14-arm64", "macOS Arm64")
57+
HOSTS["ubuntu22"] = Host("ubuntu22", "ubuntu2204-small", "Ubuntu-22")
5758

5859

5960
##############
@@ -102,7 +103,7 @@ def get_python_binary(python: str, host: str) -> str:
102103
python = python.replace(".", "")
103104
return f"{base}/Python{python}/python.exe"
104105

105-
if host == "rhel8":
106+
if host in ["rhel8", "ubuntu22"]:
106107
return f"/opt/python/{python}/bin/python3"
107108

108109
if host in ["macos", "macos-arm64"]:
@@ -558,10 +559,57 @@ def generate_atlas_data_lake_variants():
558559
return variants
559560

560561

562+
def generate_mod_wsgi_variants():
563+
variants = []
564+
host = "ubuntu22"
565+
tasks = [
566+
"mod-wsgi-standalone",
567+
"mod-wsgi-replica-set",
568+
"mod-wsgi-embedded-mode-standalone",
569+
"mod-wsgi-embedded-mode-replica-set",
570+
]
571+
expansions = dict(MOD_WSGI_VERSION="4")
572+
for python in MIN_MAX_PYTHON:
573+
display_name = get_display_name("mod_wsgi", host, python=python)
574+
variant = create_variant(
575+
tasks, display_name, host=host, python=python, expansions=expansions
576+
)
577+
variants.append(variant)
578+
return variants
579+
580+
581+
def generate_disable_test_commands_variants():
582+
host = "rhel8"
583+
expansions = dict(AUTH="auth", SSL="ssl", DISABLE_TEST_COMMANDS="1")
584+
python = CPYTHONS[0]
585+
display_name = get_display_name("Disable test commands", host, python=python)
586+
tasks = [".latest"]
587+
return [create_variant(tasks, display_name, host=host, python=python, expansions=expansions)]
588+
589+
590+
def generate_serverless_variants():
591+
host = "rhel8"
592+
batchtime = BATCHTIME_WEEK
593+
expansions = dict(test_serverless="true", AUTH="auth", SSL="ssl")
594+
tasks = ["serverless_task_group"]
595+
base_name = "Serverless"
596+
return [
597+
create_variant(
598+
tasks,
599+
get_display_name(base_name, host, python=python),
600+
host=host,
601+
python=python,
602+
expansions=expansions,
603+
batchtime=batchtime,
604+
)
605+
for python in MIN_MAX_PYTHON
606+
]
607+
608+
561609
##################
562610
# Generate Config
563611
##################
564612

565-
variants = generate_atlas_data_lake_variants()
613+
variants = generate_serverless_variants()
566614
# print(len(variants))
567615
generate_yaml(variants=variants)

0 commit comments

Comments
 (0)