@@ -544,23 +544,24 @@ def create_server_version_tasks():
544
544
for (topology , auth , ssl , sync ), python in zip_cycle (
545
545
list (product (TOPOLOGIES , ["auth" , "noauth" ], ["ssl" , "nossl" ], SYNCS )), ALL_PYTHONS
546
546
):
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 ))
548
554
549
555
# Every python should be tested with sharded cluster, auth, ssl, with sync and async.
550
556
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 )
552
558
if task_input not in task_inputs :
553
559
task_inputs .append (task_input )
554
560
555
561
# 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 :
564
565
tags .append ("pr" )
565
566
expansions = dict (AUTH = auth , SSL = ssl , TOPOLOGY = topology )
566
567
if python not in PYPYS :
@@ -600,11 +601,12 @@ def create_test_non_standard_tasks():
600
601
task_combos = []
601
602
# For each version and topology, rotate through the CPythons.
602
603
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 ))
604
606
# For each PyPy and topology, rotate through the the versions.
605
607
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 :
608
610
auth , ssl = get_standard_auth_ssl (topology )
609
611
tags = [
610
612
"test-non-standard" ,
@@ -615,7 +617,7 @@ def create_test_non_standard_tasks():
615
617
]
616
618
if python in PYPYS :
617
619
tags .append ("pypy" )
618
- if version == "latest" :
620
+ if pr :
619
621
tags .append ("pr" )
620
622
expansions = dict (AUTH = auth , SSL = ssl , TOPOLOGY = topology , VERSION = version )
621
623
name = get_task_name ("test-non-standard" , python = python , ** expansions )
@@ -635,14 +637,15 @@ def create_standard_tasks():
635
637
for (version , topology ), python , sync in zip_cycle (
636
638
list (product (ALL_VERSIONS , TOPOLOGIES )), CPYTHONS , SYNCS
637
639
):
638
- task_combos .append ((version , topology , python , sync ))
640
+ pr = version == "latest"
641
+ task_combos .append ((version , topology , python , sync , pr ))
639
642
# For each PyPy and topology, rotate through the the versions and sync/async.
640
643
for (python , topology ), version , sync in zip_cycle (
641
644
list (product (PYPYS , TOPOLOGIES )), ALL_VERSIONS , SYNCS
642
645
):
643
- task_combos .append ((version , topology , python , sync ))
646
+ task_combos .append ((version , topology , python , sync , False ))
644
647
645
- for version , topology , python , sync in task_combos :
648
+ for version , topology , python , sync , pr in task_combos :
646
649
auth , ssl = get_standard_auth_ssl (topology )
647
650
tags = [
648
651
"test-standard" ,
@@ -653,7 +656,7 @@ def create_standard_tasks():
653
656
]
654
657
if python in PYPYS :
655
658
tags .append ("pypy" )
656
- if version == "latest" :
659
+ if pr :
657
660
tags .append ("pr" )
658
661
expansions = dict (AUTH = auth , SSL = ssl , TOPOLOGY = topology , VERSION = version )
659
662
name = get_task_name ("test-standard" , python = python , sync = sync , ** expansions )
0 commit comments