SERVER-119645 Use Python 3.10 for Amazon2 variants via use_python310 … (#48111)

GitOrigin-RevId: d7fa0f92e2a64579e44a99914eeefb1ef669a6ab
This commit is contained in:
Nick Jefferies 2026-02-17 12:39:26 -05:00 committed by MongoDB Bot
parent e070eb91cb
commit c36b6e88aa
3 changed files with 23 additions and 1 deletions

View File

@ -270,6 +270,8 @@ functions:
display_name: "adjust venv"
params:
binary: bash
env:
use_python310: ${use_python310|}
args:
- "src/evergreen/functions/venv_adjust.sh"
@ -788,6 +790,8 @@ functions:
display_name: "set up venv"
params:
binary: bash
env:
use_python310: ${use_python310|}
args:
- "src/evergreen/functions/venv_setup.sh"

View File

@ -11,6 +11,8 @@ buildvariants:
run_on:
- amazon2-latest-small
expansions:
# TODO SERVER-119677: Remove use_python310 once Amazon2 sqlite is upgraded
use_python310: true
test_flags: >-
--excludeWithAnyTags=SERVER-34286,incompatible_with_amazon_linux,requires_external_data_source
--modules=none
@ -63,6 +65,8 @@ buildvariants:
- amazon2-latest-small
tags: ["emergency_release"]
expansions:
# TODO SERVER-119677: Remove use_python310 once Amazon2 sqlite is upgraded
use_python310: true
additional_package_targets: >-
archive-mongocryptd-stripped
archive-mongocryptd-debug
@ -116,6 +120,8 @@ buildvariants:
run_on:
- amazon2-arm64-latest-m8g-xlarge
expansions:
# TODO SERVER-119677: Remove use_python310 once Amazon2 sqlite is upgraded
use_python310: true
test_flags: >-
--excludeWithAnyTags=SERVER-34286,incompatible_with_amazon_linux,requires_external_data_source
--modules=none
@ -168,6 +174,8 @@ buildvariants:
- amazon2-arm64-latest-m8g-xlarge
tags: ["emergency_release"]
expansions:
# TODO SERVER-119677: Remove use_python310 once Amazon2 sqlite is upgraded
use_python310: true
additional_package_targets: >-
archive-mongocryptd-stripped
archive-mongocryptd-debug

View File

@ -5,8 +5,18 @@ elif [ "$(uname)" = "Darwin" ]; then
python='/Library/Frameworks/Python.Framework/Versions/3.13/bin/python3'
echo "Executing on mac, setting python to ${python}"
else
# Check if Python 3.10 is requested via Evergreen parameter
# TODO SERVER-119677: Remove use_python310 parameter once Amazon2 sqlite is upgraded
if [ "${use_python310}" = "true" ]; then
if [ -f /opt/mongodbtoolchain/v4/bin/python3 ]; then
python="/opt/mongodbtoolchain/v4/bin/python3"
echo "Using Python 3.10 from v4 toolchain (use_python310=true): ${python}"
else
echo "ERROR: use_python310 is set but Python 3 is not available at /opt/mongodbtoolchain/v4/bin/python3"
return 1
fi
# Check if v5 toolchain exists - it requires Python 3.13
if [ -d /opt/mongodbtoolchain/v5 ]; then
elif [ -d /opt/mongodbtoolchain/v5 ]; then
if [ -f /opt/mongodbtoolchain/v5/bin/python3.13 ]; then
python="/opt/mongodbtoolchain/v5/bin/python3.13"
echo "Found python 3.13 in v5 toolchain, setting python to ${python}"