Skip to content

PYTHON-5233 Allow python version to be set at the task level #2228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 27, 2025
4 changes: 2 additions & 2 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ functions:
params:
binary: bash
working_dir: "src"
include_expansions_in_env: [VERSION, TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, PYTHON_BINARY,
include_expansions_in_env: [VERSION, TOPOLOGY, AUTH, SSL, ORCHESTRATION_FILE, PYTHON_BINARY, PYTHON_VERSION,
STORAGE_ENGINE, REQUIRE_API_VERSION, DRIVERS_TOOLS, TEST_CRYPT_SHARED, AUTH_AWS, LOAD_BALANCER]
args: [.evergreen/just.sh, run-server, "${TEST_NAME}"]
- command: expansions.update
Expand All @@ -227,7 +227,7 @@ functions:
type: test
params:
include_expansions_in_env: [AUTH, SSL, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,
AWS_SESSION_TOKEN, COVERAGE, PYTHON_BINARY, LIBMONGOCRYPT_URL, MONGODB_URI,
AWS_SESSION_TOKEN, COVERAGE, PYTHON_BINARY, LIBMONGOCRYPT_URL, MONGODB_URI, PYTHON_VERSION,
DISABLE_TEST_COMMANDS, GREEN_FRAMEWORK, NO_EXT, COMPRESSORS, MONGODB_API_VERSION, DEBUG_LOG,
ORCHESTRATION_FILE, OCSP_SERVER_TYPE]
binary: bash
Expand Down
32 changes: 31 additions & 1 deletion .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -723,18 +723,48 @@ tasks:
tags: [doctests]

# Enterprise auth tests
- name: test-enterprise-auth
- name: test-enterprise-auth-python3.9
commands:
- func: run server
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: "3.9"
- func: assume ec2 role
- func: run tests
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: "3.9"
tags: [enterprise_auth]
- name: test-enterprise-auth-python3.13
commands:
- func: run server
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: "3.13"
- func: assume ec2 role
- func: run tests
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: "3.13"
tags: [enterprise_auth]
- name: test-enterprise-auth-pypy3.10
commands:
- func: run server
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: pypy3.10
- func: assume ec2 role
- func: run tests
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: pypy3.10
tags: [enterprise_auth, pypy]

# Free threading tests
- name: test-free-threading
Expand Down
46 changes: 8 additions & 38 deletions .evergreen/generated_configs/variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -496,54 +496,24 @@ buildvariants:
tags: [encryption_tag]

# Enterprise auth tests
- name: auth-enterprise-macos-python3.9
- name: auth-enterprise-macos
tasks:
- name: .enterprise_auth
display_name: Auth Enterprise macOS Python3.9
- name: .enterprise_auth !.pypy
display_name: Auth Enterprise macOS
run_on:
- macos-14
expansions:
PYTHON_BINARY: /Library/Frameworks/Python.Framework/Versions/3.9/bin/python3
- name: auth-enterprise-rhel8-python3.10
tasks:
- name: .enterprise_auth
display_name: Auth Enterprise RHEL8 Python3.10
run_on:
- rhel87-small
expansions:
PYTHON_BINARY: /opt/python/3.10/bin/python3
- name: auth-enterprise-rhel8-python3.11
tasks:
- name: .enterprise_auth
display_name: Auth Enterprise RHEL8 Python3.11
run_on:
- rhel87-small
expansions:
PYTHON_BINARY: /opt/python/3.11/bin/python3
- name: auth-enterprise-rhel8-python3.12
- name: auth-enterprise-win64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we running less variants for enterprise auth, or are these changes captured elsewhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same number of total tasks, just run in 3 variants instead of whatever it was before.

tasks:
- name: .enterprise_auth
display_name: Auth Enterprise RHEL8 Python3.12
run_on:
- rhel87-small
expansions:
PYTHON_BINARY: /opt/python/3.12/bin/python3
- name: auth-enterprise-win64-python3.13
tasks:
- name: .enterprise_auth
display_name: Auth Enterprise Win64 Python3.13
- name: .enterprise_auth !.pypy
display_name: Auth Enterprise Win64
run_on:
- windows-64-vsMulti-small
expansions:
PYTHON_BINARY: C:/python/Python313/python.exe
- name: auth-enterprise-rhel8-pypy3.10
- name: auth-enterprise-rhel8
tasks:
- name: .enterprise_auth
display_name: Auth Enterprise RHEL8 PyPy3.10
display_name: Auth Enterprise RHEL8
run_on:
- rhel87-small
expansions:
PYTHON_BINARY: /opt/python/pypy3.10/bin/python3

# Free threaded tests
- name: free-threaded-rhel8-python3.13t
Expand Down
Loading
Loading