Skip to content

Commit 3ce2dad

Browse files
committed
clean up aws tasks
1 parent 7591e8c commit 3ce2dad

File tree

3 files changed

+22
-34
lines changed

3 files changed

+22
-34
lines changed

.evergreen/generated_configs/tasks.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,33 +87,20 @@ tasks:
8787
SUB_TEST_NAME: web-identity
8888
PYTHON_VERSION: "3.9"
8989
tags: [auth-aws, auth-aws-web-identity]
90-
- name: test-auth-aws-rapid-web-identity-session-name-python3.9
90+
- name: test-auth-aws-latest-web-identity-session-name-python3.10
9191
commands:
9292
- func: run server
9393
vars:
9494
AUTH_AWS: "1"
95-
VERSION: rapid
95+
VERSION: latest
9696
- func: assume ec2 role
9797
- func: run tests
9898
vars:
9999
TEST_NAME: auth_aws
100100
SUB_TEST_NAME: web-identity
101+
PYTHON_VERSION: "3.10"
101102
AWS_ROLE_SESSION_NAME: test
102-
PYTHON_VERSION: "3.9"
103103
tags: [auth-aws, auth-aws-web-identity]
104-
- name: test-auth-aws-latest-regular-python3.10
105-
commands:
106-
- func: run server
107-
vars:
108-
AUTH_AWS: "1"
109-
VERSION: latest
110-
- func: assume ec2 role
111-
- func: run tests
112-
vars:
113-
TEST_NAME: auth_aws
114-
SUB_TEST_NAME: regular
115-
PYTHON_VERSION: "3.10"
116-
tags: [auth-aws, auth-aws-regular]
117104
- name: test-auth-aws-eks
118105
commands:
119106
- func: assume ec2 role

.evergreen/generated_configs/variants.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,16 @@ buildvariants:
8989
tags: [pr]
9090

9191
# Aws auth tests
92+
- name: auth-aws-ubuntu-20
93+
tasks:
94+
- name: .auth-aws !.auth-aws-ecs !.auth-aws-eks
95+
display_name: Auth AWS Ubuntu-20
96+
run_on:
97+
- ubuntu2004-small
98+
tags: []
9299
- name: auth-aws-ubuntu-22
93100
tasks:
94-
- name: .auth-aws
101+
- name: .auth-aws !.server-4.4 !.server-5.0
95102
display_name: Auth AWS Ubuntu-22
96103
run_on:
97104
- ubuntu2204-small

.evergreen/scripts/generate_config.py

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -483,17 +483,18 @@ def create_perf_variants():
483483
def create_aws_auth_variants():
484484
variants = []
485485

486-
for host_name in ["ubuntu22", "win64", "macos"]:
486+
for host_name in ["ubuntu20", "ubuntu22", "win64", "macos"]:
487487
expansions = dict()
488-
tasks = [".auth-aws"]
489488
tags = []
490489
if host_name == "macos":
491490
tasks = [
492491
".auth-aws !.auth-aws-web-identity !.auth-aws-ecs !.auth-aws-ec2 !.auth-aws-eks"
493492
]
494493
tags = ["pr"]
495-
elif host_name == "win64":
494+
elif host_name in ["win64", "ubuntu20"]:
496495
tasks = [".auth-aws !.auth-aws-ecs !.auth-aws-eks"]
496+
elif host_name == "ubuntu22":
497+
tasks = [".auth-aws !.server-4.4 !.server-5.0"]
497498
host = HOSTS[host_name]
498499
variant = create_variant(
499500
tasks,
@@ -743,34 +744,27 @@ def create_aws_tasks():
743744
"env-creds",
744745
"session-creds",
745746
"web-identity",
747+
"web-identity-session-name",
746748
]
747749
base_tags = ["auth-aws"]
748750
assume_func = FunctionCall(func="assume ec2 role")
749751

750752
for version, test_type, python in zip_cycle(get_versions_from("4.4"), aws_test_types, CPYTHONS):
751753
base_name = f"test-auth-aws-{version}"
752-
tags = [*base_tags, f"auth-aws-{test_type}"]
753754
name = get_task_name(f"{base_name}-{test_type}", python=python)
755+
orig_test_type = test_type
756+
if test_type == "web-identity-session-name":
757+
test_type = "web-identity" # noqa:PLW2901
758+
tags = [*base_tags, f"auth-aws-{test_type}"]
754759
test_vars = dict(TEST_NAME="auth_aws", SUB_TEST_NAME=test_type, PYTHON_VERSION=python)
760+
if orig_test_type == "web-identity-session-name":
761+
test_vars["AWS_ROLE_SESSION_NAME"] = "test"
755762
test_func = FunctionCall(func="run tests", vars=test_vars)
756763
server_vars = dict(AUTH_AWS="1", VERSION=version)
757764
server_func = FunctionCall(func="run server", vars=server_vars)
758765
funcs = [server_func, assume_func, test_func]
759766
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
760767

761-
if test_type == "web-identity":
762-
tags = [*base_tags, "auth-aws-web-identity"]
763-
name = get_task_name(f"{base_name}-web-identity-session-name", python=python)
764-
test_vars = dict(
765-
TEST_NAME="auth_aws",
766-
SUB_TEST_NAME="web-identity",
767-
AWS_ROLE_SESSION_NAME="test",
768-
PYTHON_VERSION=python,
769-
)
770-
test_func = FunctionCall(func="run tests", vars=test_vars)
771-
funcs = [server_func, assume_func, test_func]
772-
tasks.append(EvgTask(name=name, tags=tags, commands=funcs))
773-
774768
for test_type in ["eks", "ecs"]:
775769
name = get_task_name(f"test-auth-aws-{test_type}")
776770
tags = [*base_tags, f"auth-aws-{test_type}"]

0 commit comments

Comments
 (0)