PYTHON-5703 Use Ubuntu24 for AWS Auth tests (#2686)
This commit is contained in:
parent
a89c5e3a89
commit
896f139ddc
@ -102,7 +102,7 @@ tasks:
|
||||
AWS_ROLE_SESSION_NAME: test
|
||||
TOOLCHAIN_VERSION: "3.14"
|
||||
tags: [auth-aws, auth-aws-web-identity]
|
||||
- name: test-auth-aws-latest-ecs-python3.10
|
||||
- name: test-auth-aws-latest-regular-python3.10-min-deps
|
||||
commands:
|
||||
- func: run server
|
||||
vars:
|
||||
@ -112,9 +112,21 @@ tasks:
|
||||
- func: run tests
|
||||
vars:
|
||||
TEST_NAME: auth_aws
|
||||
SUB_TEST_NAME: ecs
|
||||
SUB_TEST_NAME: regular
|
||||
TOOLCHAIN_VERSION: "3.10"
|
||||
tags: [auth-aws, auth-aws-ecs]
|
||||
TEST_MIN_DEPS: "1"
|
||||
tags: [auth-aws, auth-aws-regular]
|
||||
- name: test-auth-aws-ecs
|
||||
commands:
|
||||
- func: assume ec2 role
|
||||
- func: run server
|
||||
vars:
|
||||
VERSION: "8.0"
|
||||
- func: run tests
|
||||
vars:
|
||||
TEST_NAME: auth_aws
|
||||
SUB_TEST_NAME: ecs
|
||||
tags: [auth-aws-ecs]
|
||||
|
||||
# Backport pr tests
|
||||
- name: backport-pr
|
||||
|
||||
@ -79,18 +79,25 @@ buildvariants:
|
||||
tags: []
|
||||
- name: auth-aws-win64
|
||||
tasks:
|
||||
- name: .auth-aws !.auth-aws-ecs
|
||||
- name: .auth-aws
|
||||
display_name: Auth AWS Win64
|
||||
run_on:
|
||||
- windows-2022-latest-small
|
||||
tags: []
|
||||
- name: auth-aws-macos
|
||||
tasks:
|
||||
- name: .auth-aws !.auth-aws-web-identity !.auth-aws-ecs !.auth-aws-ec2
|
||||
- name: .auth-aws !.auth-aws-web-identity !.auth-aws-ec2
|
||||
display_name: Auth AWS macOS
|
||||
run_on:
|
||||
- macos-14
|
||||
tags: [pr]
|
||||
- name: auth-aws-ecs-macos
|
||||
tasks:
|
||||
- name: .auth-aws-ecs
|
||||
display_name: Auth AWS ECS macOS
|
||||
run_on:
|
||||
- ubuntu2404-small
|
||||
tags: [pr]
|
||||
|
||||
# Aws lambda tests
|
||||
- name: faas-lambda
|
||||
|
||||
@ -486,10 +486,10 @@ def create_aws_auth_variants():
|
||||
tasks = [".auth-aws"]
|
||||
tags = []
|
||||
if host_name == "macos":
|
||||
tasks = [".auth-aws !.auth-aws-web-identity !.auth-aws-ecs !.auth-aws-ec2"]
|
||||
tasks = [".auth-aws !.auth-aws-web-identity !.auth-aws-ec2"]
|
||||
tags = ["pr"]
|
||||
elif host_name == "win64":
|
||||
tasks = [".auth-aws !.auth-aws-ecs"]
|
||||
tasks = [".auth-aws"]
|
||||
host = HOSTS[host_name]
|
||||
variant = create_variant(
|
||||
tasks,
|
||||
@ -499,6 +499,16 @@ def create_aws_auth_variants():
|
||||
expansions=expansions,
|
||||
)
|
||||
variants.append(variant)
|
||||
|
||||
# The ECS test must be run on Ubuntu 24 to match the Fargate Config.
|
||||
variant = create_variant(
|
||||
[".auth-aws-ecs"],
|
||||
get_variant_name("Auth AWS ECS", host),
|
||||
host=HOSTS["ubuntu24"],
|
||||
tags=tags,
|
||||
expansions=expansions,
|
||||
)
|
||||
variants.append(variant)
|
||||
return variants
|
||||
|
||||
|
||||
@ -788,19 +798,18 @@ def create_aws_tasks():
|
||||
"env-creds",
|
||||
"session-creds",
|
||||
"web-identity",
|
||||
"ecs",
|
||||
]
|
||||
assume_func = FunctionCall(func="assume ec2 role")
|
||||
for version, test_type, python in zip_cycle(get_versions_from("4.4"), aws_test_types, CPYTHONS):
|
||||
base_name = f"test-auth-aws-{version}"
|
||||
base_tags = ["auth-aws"]
|
||||
server_vars = dict(AUTH_AWS="1", VERSION=version)
|
||||
server_func = FunctionCall(func="run server", vars=server_vars)
|
||||
assume_func = FunctionCall(func="assume ec2 role")
|
||||
tags = [*base_tags, f"auth-aws-{test_type}"]
|
||||
if "t" in python:
|
||||
tags.append("free-threaded")
|
||||
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type, TOOLCHAIN_VERSION=python)
|
||||
if python == ALL_PYTHONS[0] and test_type != "ecs":
|
||||
if python == ALL_PYTHONS[0]:
|
||||
test_vars["TEST_MIN_DEPS"] = "1"
|
||||
name = get_task_name(f"{base_name}-{test_type}", **test_vars)
|
||||
test_func = FunctionCall(func="run tests", vars=test_vars)
|
||||
@ -822,6 +831,16 @@ def create_aws_tasks():
|
||||
funcs = [server_func, assume_func, test_func]
|
||||
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
|
||||
|
||||
# Add the ECS task. This will run on Ubuntu 24 to match the
|
||||
# Fargate environment.
|
||||
tags = ["auth-aws-ecs"]
|
||||
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME="ecs")
|
||||
name = get_task_name("test-auth-aws-ecs", **test_vars)
|
||||
test_func = FunctionCall(func="run tests", vars=test_vars)
|
||||
server_func = FunctionCall(func="run server", vars=dict(VERSION="8.0"))
|
||||
funcs = [assume_func, server_func, test_func]
|
||||
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
|
||||
|
||||
return tasks
|
||||
|
||||
|
||||
|
||||
@ -64,6 +64,7 @@ HOSTS["win32"] = Host("win32", "windows-64-vsMulti-small", "Win32", dict())
|
||||
HOSTS["macos"] = Host("macos", "macos-14", "macOS", dict())
|
||||
HOSTS["macos-arm64"] = Host("macos-arm64", "macos-14-arm64", "macOS Arm64", dict())
|
||||
HOSTS["ubuntu22"] = Host("ubuntu22", "ubuntu2204-small", "Ubuntu-22", dict())
|
||||
HOSTS["ubuntu24"] = Host("ubuntu24", "ubuntu2404-small", "Ubuntu-24", dict())
|
||||
HOSTS["perf"] = Host("perf", "rhel90-dbx-perf-large", "", dict())
|
||||
HOSTS["debian11"] = Host("debian11", "debian11-small", "Debian11", dict())
|
||||
DEFAULT_HOST = HOSTS["rhel8"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user