Skip to content

Commit 40d31e3

Browse files
committed
isolated shards should be included in max_shard count
1 parent ee7cabc commit 40d31e3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ci/get_package_shards.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"google-cloud-compute-v1beta",
2525
"google-cloud-dialogflow",
2626
"google-cloud-dialogflow-cx",
27-
"google-cloud-retail",
2827
}
2928

3029

@@ -114,8 +113,9 @@ def group_packages(packages):
114113
# Ensure at least 1 shard if we have packages
115114
num_shards = max(1, num_shards)
116115

117-
# 3. Top out at 16 shards
118-
num_shards = min(16, num_shards)
116+
# 3. Top out at the remaining budget (total 16 shards minus isolated shards)
117+
max_normal_shards = max(1, 16 - len(isolated_to_test))
118+
num_shards = min(max_normal_shards, num_shards)
119119

120120
# Distribute packages between them as evenly as possible
121121
shard_size = math.ceil(num_packages / num_shards)
@@ -126,7 +126,7 @@ def group_packages(packages):
126126
if start >= num_packages:
127127
break
128128
shard_packages = normal_to_test[start:end]
129-
name = f"Shard {index}"
129+
name = f"Shard {i + 1}"
130130
num_in_shard = len(shard_packages)
131131
if len(shard_packages) == 1:
132132
desc = shard_packages[0].strip('/').split('/')[-1]

0 commit comments

Comments
 (0)