tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit a4078f8799a95c354a0a50ee4d67900bc0c8c141
parent b278826705199a291952a43a413cd7bd72f11b96
Author: serge-sans-paille <sguelton@mozilla.com>
Date:   Fri, 28 Nov 2025 21:06:45 +0000

Bug 2002591 - Restore appropriate dynamic chunking behavior for gecko_taskgraph.util.chunking.chunk_manifests r=taskgraph-reviewers,ahal

Bug 1854964 fixed the logic but forgot to returned the actual result.

As a side effect, also improve the performance of the code snippet by
avoiding to compute useless auxiliary dict in the generic case (gains
~150ms on my setup).

Also remove the check for marionette, as those currently use .toml
files.

Differential Revision: https://phabricator.services.mozilla.com/D274151

Diffstat:
Mtaskcluster/gecko_taskgraph/util/chunking.py | 19+++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/taskcluster/gecko_taskgraph/util/chunking.py b/taskcluster/gecko_taskgraph/util/chunking.py @@ -175,22 +175,17 @@ def chunk_manifests(suite, platform, chunks, manifests): A list of length `chunks` where each item contains a list of manifests that run in that chunk. """ - ini_manifests = set([x.replace(".toml", ".ini") for x in manifests]) - - if "web-platform-tests" not in suite and "marionette" not in suite: + if "web-platform-tests" not in suite: + ini_manifests = {x.replace(".toml", ".ini"): x for x in manifests} runtimes = { k: v for k, v in get_runtimes(platform, suite).items() if k in ini_manifests } - retVal = [] - for c in chunk_by_runtime(None, chunks, runtimes).get_chunked_manifests( - ini_manifests - ): - retVal.append( - [m if m in manifests else m.replace(".ini", ".toml") for m in c[1]] - ) - # Keep track of test paths for each chunk, and the runtime information. - chunked_manifests = [[] for _ in range(chunks)] + cbr = chunk_by_runtime(None, chunks, runtimes) + return [ + [ini_manifests.get(m, m) for m in c] + for _, c in cbr.get_chunked_manifests(manifests) + ] # Spread out the test manifests evenly across all chunks. for index, key in enumerate(sorted(manifests)):