You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help="The maximum number of shards allowed; set to zero to disable ",
226
+
)
219
227
parser.add_argument(
220
228
"--labels",
221
229
help="Comma-separated list of labels to filter by (e.g., 'platform:darwin,python:3.13,build:debug'), all must match.",
@@ -246,14 +254,28 @@ def main() -> None:
246
254
ifrunner_config.get("free")
247
255
}
248
256
249
-
matrix= {
250
-
"include": generate_matrix_entries(
251
-
config,
252
-
runners,
253
-
args.platform,
254
-
labels,
255
-
)
256
-
}
257
+
entries=generate_matrix_entries(
258
+
config,
259
+
runners,
260
+
args.platform,
261
+
labels,
262
+
)
263
+
264
+
ifargs.max_shards:
265
+
matrix= {}
266
+
shards= (len(entries) //CI_MATRIX_SIZE_LIMIT) +1
267
+
ifshards>args.max_shards:
268
+
print(f"error: matrix of size {len(entries)} requires {shards} shards, but the maximum is {args.max_shards}; consider increasing `--max-shards`", file=sys.stderr)
print(f"warning: matrix of size {len(entries)} exceeds limit of {CI_MATRIX_SIZE_LIMIT} but sharding is not enabled; consider setting `--max-shards`", file=sys.stderr)
0 commit comments