@@ -223,7 +223,8 @@ def create_enterprise_auth_variants():
223223 if host == "macos" :
224224 tasks = [".test-standard-auth !.pypy .auth !.free-threaded" ]
225225 if host == "win64" :
226- tasks = [".test-standard-auth !.pypy .auth" ]
226+ # https://jira.mongodb.org/browse/PYTHON-5704
227+ tasks = [".test-standard-auth !.pypy .auth !.free-threaded" ]
227228 variant = create_variant (tasks , display_name , host = host , expansions = expansions )
228229 variants .append (variant )
229230 return variants
@@ -481,15 +482,15 @@ def create_perf_variants():
481482def create_aws_auth_variants ():
482483 variants = []
483484
484- for host_name in ["ubuntu20 " , "win64" , "macos" ]:
485+ for host_name in ["rhel8 " , "win64" , "macos" ]:
485486 expansions = dict ()
486487 tasks = [".auth-aws" ]
487488 tags = []
488489 if host_name == "macos" :
489- tasks = [".auth-aws !.auth-aws-web-identity !.auth-aws-ecs !.auth-aws- ec2" ]
490+ tasks = [".auth-aws !.auth-aws-web-identity !.auth-aws-ec2" ]
490491 tags = ["pr" ]
491492 elif host_name == "win64" :
492- tasks = [".auth-aws !.auth-aws-ecs " ]
493+ tasks = [".auth-aws" ]
493494 host = HOSTS [host_name ]
494495 variant = create_variant (
495496 tasks ,
@@ -499,6 +500,16 @@ def create_aws_auth_variants():
499500 expansions = expansions ,
500501 )
501502 variants .append (variant )
503+
504+ # The ECS test must be run on Ubuntu 24 to match the Fargate Config.
505+ variant = create_variant (
506+ [".auth-aws-ecs" ],
507+ get_variant_name ("Auth AWS ECS" , host ),
508+ host = HOSTS ["ubuntu24" ],
509+ tags = tags ,
510+ expansions = expansions ,
511+ )
512+ variants .append (variant )
502513 return variants
503514
504515
@@ -788,19 +799,18 @@ def create_aws_tasks():
788799 "env-creds" ,
789800 "session-creds" ,
790801 "web-identity" ,
791- "ecs" ,
792802 ]
803+ assume_func = FunctionCall (func = "assume ec2 role" )
793804 for version , test_type , python in zip_cycle (get_versions_from ("4.4" ), aws_test_types , CPYTHONS ):
794805 base_name = f"test-auth-aws-{ version } "
795806 base_tags = ["auth-aws" ]
796807 server_vars = dict (AUTH_AWS = "1" , VERSION = version )
797808 server_func = FunctionCall (func = "run server" , vars = server_vars )
798- assume_func = FunctionCall (func = "assume ec2 role" )
799809 tags = [* base_tags , f"auth-aws-{ test_type } " ]
800810 if "t" in python :
801811 tags .append ("free-threaded" )
802812 test_vars = dict (TEST_NAME = "auth_aws" , SUB_TEST_NAME = test_type , TOOLCHAIN_VERSION = python )
803- if python == ALL_PYTHONS [0 ] and test_type != "ecs" :
813+ if python == ALL_PYTHONS [0 ]:
804814 test_vars ["TEST_MIN_DEPS" ] = "1"
805815 name = get_task_name (f"{ base_name } -{ test_type } " , ** test_vars )
806816 test_func = FunctionCall (func = "run tests" , vars = test_vars )
@@ -822,6 +832,16 @@ def create_aws_tasks():
822832 funcs = [server_func , assume_func , test_func ]
823833 tasks .append (EvgTask (name = name , tags = tags , commands = funcs ))
824834
835+ # Add the ECS task. This will run on Ubuntu 24 to match the
836+ # Fargate environment.
837+ tags = ["auth-aws-ecs" ]
838+ test_vars = dict (TEST_NAME = "auth_aws" , SUB_TEST_NAME = "ecs" )
839+ name = get_task_name ("test-auth-aws-ecs" , ** test_vars )
840+ test_func = FunctionCall (func = "run tests" , vars = test_vars )
841+ server_func = FunctionCall (func = "run server" , vars = dict (VERSION = "8.0" ))
842+ funcs = [assume_func , server_func , test_func ]
843+ tasks .append (EvgTask (name = name , tags = tags , commands = funcs ))
844+
825845 return tasks
826846
827847
0 commit comments