Convert Enterprise Auth Variants to use common tasks (#2330)

This commit is contained in:
Steven Silvester 2025-05-02 11:54:54 -05:00 committed by GitHub
parent 2b4ab2a9ad
commit cf9b68c6f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 67 additions and 83 deletions

View File

@ -136,50 +136,6 @@ tasks:
depends_on: [{ name: .server-version, variant: .coverage_tag, status: "*", patch_optional: true }]
tags: [coverage]
# Enterprise auth tests
- name: test-enterprise-auth-python3.9
commands:
- func: run server
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: "3.9"
- func: assume ec2 role
- func: run tests
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: "3.9"
tags: [enterprise_auth]
- name: test-enterprise-auth-python3.13
commands:
- func: run server
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: "3.13"
- func: assume ec2 role
- func: run tests
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: "3.13"
tags: [enterprise_auth]
- name: test-enterprise-auth-pypy3.10
commands:
- func: run server
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: pypy3.10
- func: assume ec2 role
- func: run tests
vars:
TEST_NAME: enterprise_auth
AUTH: auth
PYTHON_VERSION: pypy3.10
tags: [enterprise_auth, pypy]
# Free threading tests
- name: test-free-threading
commands:
@ -3928,6 +3884,7 @@ tasks:
- server-4.0
- python-3.9
- standalone-noauth-nossl
- noauth
- name: test-non-standard-v4.0-python3.10-noauth-ssl-replica-set
commands:
- func: run server
@ -3948,6 +3905,7 @@ tasks:
- server-4.0
- python-3.10
- replica_set-noauth-ssl
- noauth
- name: test-non-standard-v4.0-python3.11-auth-ssl-sharded-cluster
commands:
- func: run server
@ -3968,6 +3926,7 @@ tasks:
- server-4.0
- python-3.11
- sharded_cluster-auth-ssl
- auth
- name: test-non-standard-v4.2-python3.12-noauth-nossl-standalone
commands:
- func: run server
@ -3988,6 +3947,7 @@ tasks:
- server-4.2
- python-3.12
- standalone-noauth-nossl
- noauth
- name: test-non-standard-v4.2-python3.13-noauth-ssl-replica-set
commands:
- func: run server
@ -4008,6 +3968,7 @@ tasks:
- server-4.2
- python-3.13
- replica_set-noauth-ssl
- noauth
- name: test-non-standard-v4.2-python3.9-auth-ssl-sharded-cluster
commands:
- func: run server
@ -4028,6 +3989,7 @@ tasks:
- server-4.2
- python-3.9
- sharded_cluster-auth-ssl
- auth
- name: test-non-standard-v4.4-python3.10-noauth-nossl-standalone
commands:
- func: run server
@ -4048,6 +4010,7 @@ tasks:
- server-4.4
- python-3.10
- standalone-noauth-nossl
- noauth
- name: test-non-standard-v4.4-python3.11-noauth-ssl-replica-set
commands:
- func: run server
@ -4068,6 +4031,7 @@ tasks:
- server-4.4
- python-3.11
- replica_set-noauth-ssl
- noauth
- name: test-non-standard-v4.4-python3.12-auth-ssl-sharded-cluster
commands:
- func: run server
@ -4088,6 +4052,7 @@ tasks:
- server-4.4
- python-3.12
- sharded_cluster-auth-ssl
- auth
- name: test-non-standard-v5.0-python3.13-noauth-nossl-standalone
commands:
- func: run server
@ -4108,6 +4073,7 @@ tasks:
- server-5.0
- python-3.13
- standalone-noauth-nossl
- noauth
- name: test-non-standard-v5.0-python3.9-noauth-ssl-replica-set
commands:
- func: run server
@ -4128,6 +4094,7 @@ tasks:
- server-5.0
- python-3.9
- replica_set-noauth-ssl
- noauth
- name: test-non-standard-v5.0-python3.10-auth-ssl-sharded-cluster
commands:
- func: run server
@ -4148,6 +4115,7 @@ tasks:
- server-5.0
- python-3.10
- sharded_cluster-auth-ssl
- auth
- name: test-non-standard-v6.0-python3.11-noauth-nossl-standalone
commands:
- func: run server
@ -4168,6 +4136,7 @@ tasks:
- server-6.0
- python-3.11
- standalone-noauth-nossl
- noauth
- name: test-non-standard-v6.0-python3.12-noauth-ssl-replica-set
commands:
- func: run server
@ -4188,6 +4157,7 @@ tasks:
- server-6.0
- python-3.12
- replica_set-noauth-ssl
- noauth
- name: test-non-standard-v6.0-python3.13-auth-ssl-sharded-cluster
commands:
- func: run server
@ -4208,6 +4178,7 @@ tasks:
- server-6.0
- python-3.13
- sharded_cluster-auth-ssl
- auth
- name: test-non-standard-v7.0-python3.9-noauth-nossl-standalone
commands:
- func: run server
@ -4228,6 +4199,7 @@ tasks:
- server-7.0
- python-3.9
- standalone-noauth-nossl
- noauth
- name: test-non-standard-v7.0-python3.10-noauth-ssl-replica-set
commands:
- func: run server
@ -4248,6 +4220,7 @@ tasks:
- server-7.0
- python-3.10
- replica_set-noauth-ssl
- noauth
- name: test-non-standard-v7.0-python3.11-auth-ssl-sharded-cluster
commands:
- func: run server
@ -4268,6 +4241,7 @@ tasks:
- server-7.0
- python-3.11
- sharded_cluster-auth-ssl
- auth
- name: test-non-standard-v8.0-python3.12-noauth-nossl-standalone
commands:
- func: run server
@ -4288,6 +4262,7 @@ tasks:
- server-8.0
- python-3.12
- standalone-noauth-nossl
- noauth
- name: test-non-standard-v8.0-python3.13-noauth-ssl-replica-set
commands:
- func: run server
@ -4308,6 +4283,7 @@ tasks:
- server-8.0
- python-3.13
- replica_set-noauth-ssl
- noauth
- name: test-non-standard-v8.0-python3.9-auth-ssl-sharded-cluster
commands:
- func: run server
@ -4328,6 +4304,7 @@ tasks:
- server-8.0
- python-3.9
- sharded_cluster-auth-ssl
- auth
- name: test-non-standard-rapid-python3.10-noauth-nossl-standalone
commands:
- func: run server
@ -4348,6 +4325,7 @@ tasks:
- server-rapid
- python-3.10
- standalone-noauth-nossl
- noauth
- name: test-non-standard-rapid-python3.11-noauth-ssl-replica-set
commands:
- func: run server
@ -4368,6 +4346,7 @@ tasks:
- server-rapid
- python-3.11
- replica_set-noauth-ssl
- noauth
- name: test-non-standard-rapid-python3.12-auth-ssl-sharded-cluster
commands:
- func: run server
@ -4388,6 +4367,7 @@ tasks:
- server-rapid
- python-3.12
- sharded_cluster-auth-ssl
- auth
- name: test-non-standard-latest-python3.13-noauth-nossl-standalone
commands:
- func: run server
@ -4408,6 +4388,7 @@ tasks:
- server-latest
- python-3.13
- standalone-noauth-nossl
- noauth
- name: test-non-standard-latest-python3.9-noauth-ssl-replica-set
commands:
- func: run server
@ -4428,6 +4409,7 @@ tasks:
- server-latest
- python-3.9
- replica_set-noauth-ssl
- noauth
- name: test-non-standard-latest-python3.10-auth-ssl-sharded-cluster
commands:
- func: run server
@ -4448,6 +4430,7 @@ tasks:
- server-latest
- python-3.10
- sharded_cluster-auth-ssl
- auth
- name: test-non-standard-v4.0-pypy3.10-noauth-nossl-standalone
commands:
- func: run server
@ -4468,6 +4451,7 @@ tasks:
- server-4.0
- python-pypy3.10
- standalone-noauth-nossl
- noauth
- pypy
- name: test-non-standard-v4.2-pypy3.10-noauth-ssl-replica-set
commands:
@ -4489,6 +4473,7 @@ tasks:
- server-4.2
- python-pypy3.10
- replica_set-noauth-ssl
- noauth
- pypy
- name: test-non-standard-v4.4-pypy3.10-auth-ssl-sharded-cluster
commands:
@ -4510,6 +4495,7 @@ tasks:
- server-4.4
- python-pypy3.10
- sharded_cluster-auth-ssl
- auth
- pypy
- name: test-non-standard-v5.0-pypy3.10-noauth-nossl-standalone
commands:
@ -4531,6 +4517,7 @@ tasks:
- server-5.0
- python-pypy3.10
- standalone-noauth-nossl
- noauth
- pypy
- name: test-non-standard-v6.0-pypy3.10-noauth-ssl-replica-set
commands:
@ -4552,6 +4539,7 @@ tasks:
- server-6.0
- python-pypy3.10
- replica_set-noauth-ssl
- noauth
- pypy
- name: test-non-standard-v7.0-pypy3.10-auth-ssl-sharded-cluster
commands:
@ -4573,6 +4561,7 @@ tasks:
- server-7.0
- python-pypy3.10
- sharded_cluster-auth-ssl
- auth
- pypy
- name: test-non-standard-v8.0-pypy3.10-noauth-nossl-standalone
commands:
@ -4594,6 +4583,7 @@ tasks:
- server-8.0
- python-pypy3.10
- standalone-noauth-nossl
- noauth
- pypy
- name: test-non-standard-rapid-pypy3.10-noauth-ssl-replica-set
commands:
@ -4615,6 +4605,7 @@ tasks:
- server-rapid
- python-pypy3.10
- replica_set-noauth-ssl
- noauth
- pypy
- name: test-non-standard-latest-pypy3.10-auth-ssl-sharded-cluster
commands:
@ -4636,4 +4627,5 @@ tasks:
- server-latest
- python-pypy3.10
- sharded_cluster-auth-ssl
- auth
- pypy

View File

@ -251,24 +251,33 @@ buildvariants:
tags: [encryption_tag]
# Enterprise auth tests
- name: auth-enterprise-macos
tasks:
- name: .enterprise_auth !.pypy
display_name: Auth Enterprise macOS
run_on:
- macos-14
- name: auth-enterprise-win64
tasks:
- name: .enterprise_auth !.pypy
display_name: Auth Enterprise Win64
run_on:
- windows-64-vsMulti-small
- name: auth-enterprise-rhel8
tasks:
- name: .enterprise_auth
- name: .test-non-standard .auth
display_name: Auth Enterprise RHEL8
run_on:
- rhel87-small
expansions:
TEST_NAME: enterprise_auth
AUTH: auth
- name: auth-enterprise-macos
tasks:
- name: .test-non-standard !.pypy .auth
display_name: Auth Enterprise macOS
run_on:
- macos-14
expansions:
TEST_NAME: enterprise_auth
AUTH: auth
- name: auth-enterprise-win64
tasks:
- name: .test-non-standard !.pypy .auth
display_name: Auth Enterprise Win64
run_on:
- windows-64-vsMulti-small
expansions:
TEST_NAME: enterprise_auth
AUTH: auth
# Free threaded tests
- name: free-threaded-rhel8-python3.13t
@ -368,7 +377,7 @@ buildvariants:
- name: mod_wsgi-ubuntu-22
tasks:
- name: .mod_wsgi
display_name: mod_wsgi Ubuntu-22
display_name: Mod_WSGI Ubuntu-22
run_on:
- ubuntu2204-small
expansions:

View File

@ -211,15 +211,14 @@ def create_compression_variants():
def create_enterprise_auth_variants():
variants = []
for host in [HOSTS["macos"], HOSTS["win64"], DEFAULT_HOST]:
for host in ["rhel8", "macos", "win64"]:
expansions = dict(TEST_NAME="enterprise_auth", AUTH="auth")
display_name = get_variant_name("Auth Enterprise", host)
if host == DEFAULT_HOST:
tags = [".enterprise_auth"]
else:
tags = [".enterprise_auth !.pypy"]
variant = create_variant(tags, display_name, host=host)
tasks = [".test-non-standard .auth"]
if host != "rhel8":
tasks = [".test-non-standard !.pypy .auth"]
variant = create_variant(tasks, display_name, host=host, expansions=expansions)
variants.append(variant)
return variants
@ -338,7 +337,7 @@ def create_mod_wsgi_variants():
host = HOSTS["ubuntu22"]
tasks = [".mod_wsgi"]
expansions = dict(MOD_WSGI_VERSION="4")
display_name = get_variant_name("mod_wsgi", host)
display_name = get_variant_name("Mod_WSGI", host)
return [create_variant(tasks, display_name, host=host, expansions=expansions)]
@ -605,6 +604,7 @@ def create_test_non_standard_tasks():
f"server-{version}",
f"python-{python}",
f"{topology}-{auth}-{ssl}",
auth,
]
if python in PYPYS:
tags.append("pypy")
@ -815,23 +815,6 @@ def create_search_index_tasks():
return [EvgTask(name=task_name, tags=tags, commands=commands)]
def create_enterprise_auth_tasks():
tasks = []
for python in [*MIN_MAX_PYTHON, PYPYS[-1]]:
vars = dict(TEST_NAME="enterprise_auth", AUTH="auth", PYTHON_VERSION=python)
server_func = FunctionCall(func="run server", vars=vars)
assume_func = FunctionCall(func="assume ec2 role")
test_func = FunctionCall(func="run tests", vars=vars)
task_name = get_task_name("test-enterprise-auth", python=python)
tags = ["enterprise_auth"]
if python in PYPYS:
tags += ["pypy"]
tasks.append(
EvgTask(name=task_name, tags=tags, commands=[server_func, assume_func, test_func])
)
return tasks
def create_perf_tasks():
tasks = []
for version, ssl, sync in product(["8.0"], ["ssl", "nossl"], ["sync", "async"]):