Skip to content

Commit dadc799

Browse files
committed
handle the python version
1 parent 67c0b54 commit dadc799

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ tasks:
108108
vars:
109109
TEST_NAME: auth_aws
110110
SUB_TEST_NAME: eks
111+
PYTHON_VERSION: "3.11"
111112
tags: [auth-aws, auth-aws-eks]
112113
- name: test-auth-aws-latest-ecs-python3.11
113114
commands:
@@ -119,6 +120,7 @@ tasks:
119120
vars:
120121
TEST_NAME: auth_aws
121122
SUB_TEST_NAME: ecs
123+
PYTHON_VERSION: "3.11"
122124
tags: [auth-aws, auth-aws-ecs]
123125

124126
# Backport pr tests

.evergreen/scripts/generate_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,9 @@ def create_aws_tasks():
765765
for test_type in ["eks", "ecs"]:
766766
tags = ["auth-aws", f"auth-aws-{test_type}"]
767767
base_name = f"test-auth-aws-latest-{test_type}"
768-
# Keep this version in sync with the one in "run-aws-container-test.sh".
769-
name = get_task_name(base_name, python="3.11")
770-
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type)
768+
python = "3.11"
769+
name = get_task_name(base_name, python=python)
770+
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type, PYTHON_VERSION=python)
771771
test_func = FunctionCall(func="run tests", vars=test_vars)
772772
funcs = [assume_func, test_func]
773773
if test_type == "ecs":

.evergreen/scripts/run-aws-container-test.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ fi
2020
set -o xtrace
2121

2222
# Install python with pip.
23-
# Keep this version in sync with the one in "generate_config.py".
24-
PYTHON_VER="python3.11"
23+
PYTHON_VER="python3.xx"
2524
apt-get -qq update < /dev/null > /dev/null
2625
apt-get -qq install software-properties-common -y < /dev/null > /dev/null # needed for apt-add-repository
2726
add-apt-repository ppa:deadsnakes/ppa -y || true # this will fail on debian

.evergreen/scripts/run_tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,9 @@ def run() -> None:
163163
if TEST_NAME == "auth_aws" and SUB_TEST_NAME in ["ecs", "eks"]:
164164
target = f"run-mongodb-aws-{SUB_TEST_NAME}-test.sh"
165165
text = (HERE / "run-aws-container-test.sh").read_text()
166+
text = text.replace("python3.xx", os.environ["PYTHON_VERSION"])
166167
if SUB_TEST_NAME == "eks":
167-
text = text.replace("python3.9", "python3.11").replace("ecs", "eks")
168+
text = text.replace("ecs", "eks")
168169
(HERE.parent / target).write_text(text)
169170
run_command(f"{DRIVERS_TOOLS}/.evergreen/auth_aws/aws_setup.sh {SUB_TEST_NAME}")
170171
return

0 commit comments

Comments
 (0)