Skip to content

Commit 6ca766e

Browse files
authored
PYTHON-4893 Use shrub.py for aws auth tests (mongodb#1959)
1 parent 1ace045 commit 6ca766e

File tree

2 files changed

+126
-42
lines changed

2 files changed

+126
-42
lines changed

.evergreen/config.yml

Lines changed: 94 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3795,6 +3795,100 @@ buildvariants:
37953795
SSL: ssl
37963796
PYTHON_BINARY: /opt/python/3.13/bin/python3
37973797

3798+
# AWS Auth tests.
3799+
- name: aws-auth-ubuntu-20-py3.9
3800+
tasks:
3801+
- name: aws-auth-test-4.4
3802+
- name: aws-auth-test-5.0
3803+
- name: aws-auth-test-6.0
3804+
- name: aws-auth-test-7.0
3805+
- name: aws-auth-test-8.0
3806+
- name: aws-auth-test-rapid
3807+
- name: aws-auth-test-latest
3808+
display_name: AWS Auth Ubuntu-20 py3.9
3809+
run_on:
3810+
- ubuntu2004-small
3811+
expansions:
3812+
PYTHON_BINARY: /opt/python/3.9/bin/python3
3813+
- name: aws-auth-ubuntu-20-py3.13
3814+
tasks:
3815+
- name: aws-auth-test-4.4
3816+
- name: aws-auth-test-5.0
3817+
- name: aws-auth-test-6.0
3818+
- name: aws-auth-test-7.0
3819+
- name: aws-auth-test-8.0
3820+
- name: aws-auth-test-rapid
3821+
- name: aws-auth-test-latest
3822+
display_name: AWS Auth Ubuntu-20 py3.13
3823+
run_on:
3824+
- ubuntu2004-small
3825+
expansions:
3826+
PYTHON_BINARY: /opt/python/3.13/bin/python3
3827+
- name: aws-auth-win64-py3.9
3828+
tasks:
3829+
- name: aws-auth-test-4.4
3830+
- name: aws-auth-test-5.0
3831+
- name: aws-auth-test-6.0
3832+
- name: aws-auth-test-7.0
3833+
- name: aws-auth-test-8.0
3834+
- name: aws-auth-test-rapid
3835+
- name: aws-auth-test-latest
3836+
display_name: AWS Auth Win64 py3.9
3837+
run_on:
3838+
- windows-64-vsMulti-small
3839+
expansions:
3840+
skip_ECS_auth_test: "true"
3841+
PYTHON_BINARY: C:/python/Python39/python.exe
3842+
- name: aws-auth-win64-py3.13
3843+
tasks:
3844+
- name: aws-auth-test-4.4
3845+
- name: aws-auth-test-5.0
3846+
- name: aws-auth-test-6.0
3847+
- name: aws-auth-test-7.0
3848+
- name: aws-auth-test-8.0
3849+
- name: aws-auth-test-rapid
3850+
- name: aws-auth-test-latest
3851+
display_name: AWS Auth Win64 py3.13
3852+
run_on:
3853+
- windows-64-vsMulti-small
3854+
expansions:
3855+
skip_ECS_auth_test: "true"
3856+
PYTHON_BINARY: C:/python/Python313/python.exe
3857+
- name: aws-auth-macos-py3.9
3858+
tasks:
3859+
- name: aws-auth-test-4.4
3860+
- name: aws-auth-test-5.0
3861+
- name: aws-auth-test-6.0
3862+
- name: aws-auth-test-7.0
3863+
- name: aws-auth-test-8.0
3864+
- name: aws-auth-test-rapid
3865+
- name: aws-auth-test-latest
3866+
display_name: AWS Auth macOS py3.9
3867+
run_on:
3868+
- macos-14
3869+
expansions:
3870+
skip_ECS_auth_test: "true"
3871+
skip_EC2_auth_test: "true"
3872+
skip_web_identity_auth_test: "true"
3873+
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
3874+
- name: aws-auth-macos-py3.13
3875+
tasks:
3876+
- name: aws-auth-test-4.4
3877+
- name: aws-auth-test-5.0
3878+
- name: aws-auth-test-6.0
3879+
- name: aws-auth-test-7.0
3880+
- name: aws-auth-test-8.0
3881+
- name: aws-auth-test-rapid
3882+
- name: aws-auth-test-latest
3883+
display_name: AWS Auth macOS py3.13
3884+
run_on:
3885+
- macos-14
3886+
expansions:
3887+
skip_ECS_auth_test: "true"
3888+
skip_EC2_auth_test: "true"
3889+
skip_web_identity_auth_test: "true"
3890+
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.13/bin/python3
3891+
37983892
- matrix_name: "tests-fips"
37993893
matrix_spec:
38003894
platform:
@@ -4237,47 +4331,6 @@ buildvariants:
42374331
- name: testgcpoidc_task_group
42384332
batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README
42394333

4240-
- matrix_name: "aws-auth-test"
4241-
matrix_spec:
4242-
platform: [ubuntu-20.04]
4243-
python-version: ["3.9"]
4244-
display_name: "MONGODB-AWS Auth ${platform} ${python-version}"
4245-
tasks:
4246-
- name: "aws-auth-test-4.4"
4247-
- name: "aws-auth-test-5.0"
4248-
- name: "aws-auth-test-6.0"
4249-
- name: "aws-auth-test-7.0"
4250-
- name: "aws-auth-test-8.0"
4251-
- name: "aws-auth-test-rapid"
4252-
- name: "aws-auth-test-latest"
4253-
4254-
- matrix_name: "aws-auth-test-mac"
4255-
matrix_spec:
4256-
platform: [macos]
4257-
display_name: "MONGODB-AWS Auth ${platform} ${python-version-mac}"
4258-
tasks:
4259-
- name: "aws-auth-test-4.4"
4260-
- name: "aws-auth-test-5.0"
4261-
- name: "aws-auth-test-6.0"
4262-
- name: "aws-auth-test-7.0"
4263-
- name: "aws-auth-test-8.0"
4264-
- name: "aws-auth-test-rapid"
4265-
- name: "aws-auth-test-latest"
4266-
4267-
- matrix_name: "aws-auth-test-windows"
4268-
matrix_spec:
4269-
platform: [windows]
4270-
python-version-windows: "*"
4271-
display_name: "MONGODB-AWS Auth ${platform} ${python-version-windows}"
4272-
tasks:
4273-
- name: "aws-auth-test-4.4"
4274-
- name: "aws-auth-test-5.0"
4275-
- name: "aws-auth-test-6.0"
4276-
- name: "aws-auth-test-7.0"
4277-
- name: "aws-auth-test-8.0"
4278-
- name: "aws-auth-test-rapid"
4279-
- name: "aws-auth-test-latest"
4280-
42814334
- name: testgcpkms-variant
42824335
display_name: "GCP KMS"
42834336
run_on:

.evergreen/scripts/generate_config.py

Lines changed: 32 additions & 1 deletion
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["ubuntu20"] = Host("ubuntu20", "ubuntu2004-small", "Ubuntu-20")
5758
HOSTS["ubuntu22"] = Host("ubuntu22", "ubuntu2204-small", "Ubuntu-22")
5859

5960

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

106-
if host in ["rhel8", "ubuntu22"]:
107+
if host in ["rhel8", "ubuntu22", "ubuntu20"]:
107108
return f"/opt/python/{python}/bin/python3"
108109

109110
if host in ["macos", "macos-arm64"]:
@@ -609,6 +610,36 @@ def generate_serverless_variants():
609610
]
610611

611612

613+
def generate_aws_auth_variants():
614+
variants = []
615+
tasks = [
616+
"aws-auth-test-4.4",
617+
"aws-auth-test-5.0",
618+
"aws-auth-test-6.0",
619+
"aws-auth-test-7.0",
620+
"aws-auth-test-8.0",
621+
"aws-auth-test-rapid",
622+
"aws-auth-test-latest",
623+
]
624+
625+
for host, python in product(["ubuntu20", "win64", "macos"], MIN_MAX_PYTHON):
626+
expansions = dict()
627+
if host != "ubuntu20":
628+
expansions["skip_ECS_auth_test"] = "true"
629+
if host == "macos":
630+
expansions["skip_EC2_auth_test"] = "true"
631+
expansions["skip_web_identity_auth_test"] = "true"
632+
variant = create_variant(
633+
tasks,
634+
get_display_name("AWS Auth", host, python=python),
635+
host=host,
636+
python=python,
637+
expansions=expansions,
638+
)
639+
variants.append(variant)
640+
return variants
641+
642+
612643
##################
613644
# Generate Config
614645
##################

0 commit comments

Comments
 (0)