diff --git a/taskcluster/taskgraph/util/perfile.py b/taskcluster/taskgraph/util/perfile.py index e2d966c80fbf..96f00f0772c0 100644 --- a/taskcluster/taskgraph/util/perfile.py +++ b/taskcluster/taskgraph/util/perfile.py @@ -83,4 +83,11 @@ def perfile_number_of_chunks(is_try, try_task_config, head_repository, head_rev, test_count += 1 chunks = test_count/tests_per_chunk - return int(math.ceil(chunks)) + chunks = int(math.ceil(chunks)) + + # Never return 0 chunks on try, so that per-file tests can be pushed to try with + # an explicit path, and also so "empty" runs can be checked on try. + if is_try and chunks == 0: + chunks = 1 + + return chunks