@@ -544,23 +544,24 @@ def create_server_version_tasks():
544544 for (topology , auth , ssl , sync ), python in zip_cycle (
545545 list (product (TOPOLOGIES , ["auth" , "noauth" ], ["ssl" , "nossl" ], SYNCS )), ALL_PYTHONS
546546 ):
547- task_inputs .append ((topology , auth , ssl , sync , python ))
547+ combo = f"{ topology } -{ auth } -{ ssl } "
548+ pr = combo in [
549+ "standalone-noauth-nossl" ,
550+ "replica_set-noauth-ssl" ,
551+ "sharded_cluster-auth-ssl" ,
552+ ]
553+ task_inputs .append ((topology , auth , ssl , sync , python , pr ))
548554
549555 # Every python should be tested with sharded cluster, auth, ssl, with sync and async.
550556 for python , sync in product (ALL_PYTHONS , SYNCS ):
551- task_input = ("sharded_cluster" , "auth" , "ssl" , sync , python )
557+ task_input = ("sharded_cluster" , "auth" , "ssl" , sync , python , False )
552558 if task_input not in task_inputs :
553559 task_inputs .append (task_input )
554560
555561 # Assemble the tasks.
556- for topology , auth , ssl , sync , python in task_inputs :
557- combo = f"{ topology } -{ auth } -{ ssl } "
558- tags = ["server-version" , f"python-{ python } " , combo , sync ]
559- if combo in [
560- "standalone-noauth-nossl" ,
561- "replica_set-noauth-ssl" ,
562- "sharded_cluster-auth-ssl" ,
563- ]:
562+ for topology , auth , ssl , sync , python , pr in task_inputs :
563+ tags = ["server-version" , f"python-{ python } " , f"{ topology } -{ auth } -{ ssl } " , sync ]
564+ if pr :
564565 tags .append ("pr" )
565566 expansions = dict (AUTH = auth , SSL = ssl , TOPOLOGY = topology )
566567 if python not in PYPYS :
@@ -600,11 +601,12 @@ def create_test_non_standard_tasks():
600601 task_combos = []
601602 # For each version and topology, rotate through the CPythons.
602603 for (version , topology ), python in zip_cycle (list (product (ALL_VERSIONS , TOPOLOGIES )), CPYTHONS ):
603- task_combos .append ((version , topology , python ))
604+ pr = version == "latest"
605+ task_combos .append ((version , topology , python , pr ))
604606 # For each PyPy and topology, rotate through the the versions.
605607 for (python , topology ), version in zip_cycle (list (product (PYPYS , TOPOLOGIES )), ALL_VERSIONS ):
606- task_combos .append ((version , topology , python ))
607- for version , topology , python in task_combos :
608+ task_combos .append ((version , topology , python , False ))
609+ for version , topology , python , pr in task_combos :
608610 auth , ssl = get_standard_auth_ssl (topology )
609611 tags = [
610612 "test-non-standard" ,
@@ -615,7 +617,7 @@ def create_test_non_standard_tasks():
615617 ]
616618 if python in PYPYS :
617619 tags .append ("pypy" )
618- if version == "latest" :
620+ if pr :
619621 tags .append ("pr" )
620622 expansions = dict (AUTH = auth , SSL = ssl , TOPOLOGY = topology , VERSION = version )
621623 name = get_task_name ("test-non-standard" , python = python , ** expansions )
@@ -635,14 +637,15 @@ def create_standard_tasks():
635637 for (version , topology ), python , sync in zip_cycle (
636638 list (product (ALL_VERSIONS , TOPOLOGIES )), CPYTHONS , SYNCS
637639 ):
638- task_combos .append ((version , topology , python , sync ))
640+ pr = version == "latest"
641+ task_combos .append ((version , topology , python , sync , pr ))
639642 # For each PyPy and topology, rotate through the the versions and sync/async.
640643 for (python , topology ), version , sync in zip_cycle (
641644 list (product (PYPYS , TOPOLOGIES )), ALL_VERSIONS , SYNCS
642645 ):
643- task_combos .append ((version , topology , python , sync ))
646+ task_combos .append ((version , topology , python , sync , False ))
644647
645- for version , topology , python , sync in task_combos :
648+ for version , topology , python , sync , pr in task_combos :
646649 auth , ssl = get_standard_auth_ssl (topology )
647650 tags = [
648651 "test-standard" ,
@@ -653,7 +656,7 @@ def create_standard_tasks():
653656 ]
654657 if python in PYPYS :
655658 tags .append ("pypy" )
656- if version == "latest" :
659+ if pr :
657660 tags .append ("pr" )
658661 expansions = dict (AUTH = auth , SSL = ssl , TOPOLOGY = topology , VERSION = version )
659662 name = get_task_name ("test-standard" , python = python , sync = sync , ** expansions )
0 commit comments