Dynamic chunking underestimates runtime for manifests with included sub-manifests
Categories
(Firefox Build System :: Task Configuration, defect)
Tracking
(firefox-esr140 unaffected, firefox148 unaffected, firefox149 unaffected, firefox150 fixed)
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox148 | --- | unaffected |
| firefox149 | --- | unaffected |
| firefox150 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 external file)
resolve_dynamic_chunks in chunk.py computes the number of chunks needed for a test suite by summing per-manifest runtimes from the runtime data. However, it only matches manifests by exact key, ignoring colon-separated runtime keys like manifest.toml:included.toml that represent included sub-manifests. This causes it to severely underestimate the total runtime for suites like xpcshell where some manifests include others (e.g. xpcshell-remote.toml includes xpcshell-common.toml).
For example, on Android shippable/opt, toolkit/components/extensions/test/xpcshell/xpcshell-remote.toml has a direct runtime of only 5.9s, but its included xpcshell-common.toml adds 226.6s. The chunk count calculation sees only 5.9s, producing too few chunks.
Meanwhile, chunk_manifests in chunking.py (which distributes manifests across chunks) already correctly aggregates colon-separated keys into their parent manifests. This creates an inconsistency: the chunk count is computed from an underestimated total, but the balancing algorithm sees the real runtime.
The fix extracts the colon-key aggregation logic from chunk_manifests into a shared resolve_manifest_runtimes helper function and uses it from both resolve_dynamic_chunks and chunk_manifests.
This explains the very poor dynamic chunking we see for android xpcshell tests at https://tests.firefox.dev/xpcshell-jobs.html#autoland-android-tests
| Assignee | ||
Comment 1•9 months ago
|
||
resolve_dynamic_chunks was ignoring colon-separated runtime data keys (e.g. manifest.toml:included.toml) when computing chunk counts, causing it to underestimate the total runtime for manifests that include sub-manifests. The existing chunk_manifests function already handled this correctly for chunk balancing. Extract the shared logic into resolve_manifest_runtimes and use it from both call sites.
Comment 2•9 months ago
|
||
Set release status flags based on info from the regressing bug 2017946
Comment 4•9 months ago
|
||
| bugherder | ||
Description
•