Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
11 changes: 9 additions & 2 deletions .evergreen/generated_configs/variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 24 additions & 5 deletions .evergreen/scripts/generate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Copy link
Member Author

Choose a reason for hiding this comment

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

I had missed skipping ec2

Copy link
Contributor

Choose a reason for hiding this comment

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

I really wish we had a way to make these more readable

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know of an easy way to abstract the grammar. Is this PR good to go?

tags = ["pr"]
elif host_name == "win64":
tasks = [".auth-aws !.auth-aws-ecs"]
tasks = [".auth-aws"]
host = HOSTS[host_name]
variant = create_variant(
tasks,
Expand All @@ -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


Expand Down Expand Up @@ -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)
Expand All @@ -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


Expand Down
1 change: 1 addition & 0 deletions .evergreen/scripts/generate_config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class Host:
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"]
Expand Down
Loading