Closed Bug 2017946 Opened 9 months ago Closed 9 months ago

Enable dynamic chunking for all test suites that use manifest loading

Categories

(Firefox Build System :: Task Configuration, enhancement)

enhancement

Tracking

(firefox150 fixed)

RESOLVED FIXED
150 Branch
Tracking Status
firefox150 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(2 external files)

The taskgraph has infrastructure for dynamic chunking (computing the number of test chunks based on manifest runtime data rather than using hardcoded values from YAML). However, it was effectively unused for most jobs.

The code in set_test_manifests had an isinstance(loader, DefaultLoader) guard that was supposed to trigger dynamic chunking when a non-default manifest loader was in use (e.g. the bugbug loader on autoland). But since BugbugLoader inherits from DefaultLoader, the isinstance check always returned True and dynamic chunking was never activated through this path. The only place it was actually used was the os-integration cron task.

This patch removes the dead isinstance guards and unconditionally sets chunks = "dynamic" for all tasks that go through manifest loading. This means the number of chunks is now computed from manifest runtime data (manifests-runtimes.json from mozilla-central) for all applicable test suites (mochitest, xpcshell, reftest, crashtest, web-platform-tests, etc.).

Tasks that opt out of manifest loading (test-manifest-loader: null in YAML) are unaffected -- they continue to use hardcoded chunk counts and resolve chunking at test runtime. This includes talos, browsertime, awsy, compiled tests (gtest, cppunittest, jittest), and some specific mochitest/reftest/wpt variants.

When no runtime data is available for a given platform/suite combination, the code falls back to the original hardcoded chunk count from the YAML definition. Some YAML-defined variants (inc-origin-init, vertical-tabs, privatebrowsing) already set chunks: dynamic explicitly; this is handled correctly.

Depends on: 2018130

When dynamic chunking resolves to 1 chunk, the task label has no numeric
suffix (e.g. "test-linux-xpcshell" instead of "test-linux-xpcshell-1").
The glob matching in _try_task_config only looked for numeric suffixes,
so these tasks were never matched. Also update the MOZHARNESS_TEST_PATHS
and MOZHARNESS_TEST_TAG first-chunk filters to keep unchunked tasks.

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d2a9d3f43a72 https://hg.mozilla.org/integration/autoland/rev/aa06a64a5a53 Enable dynamic chunking for all test suites that use manifest loading, r=ahal,taskgraph-reviewers,releng-reviewers. https://github.com/mozilla-firefox/firefox/commit/5e33c527a966 https://hg.mozilla.org/integration/autoland/rev/016ddb39fe93 Fix try task matching for single-chunk dynamically-chunked tasks, r=ahal,taskgraph-reviewers.
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/34962eacc037 https://hg.mozilla.org/integration/autoland/rev/d584635261f3 Revert "Bug 2017946 - Fix try task matching for single-chunk dynamically-chunked tasks, r=ahal,taskgraph-reviewers." for causing ci failures on test_new_config.py

Backed out for causing ci failures on test_new_config.py

Backout link

Push with failures

Failure log

Flags: needinfo?(florian)
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ea5f21e06740 https://hg.mozilla.org/integration/autoland/rev/b3e68c53a29e Enable dynamic chunking for all test suites that use manifest loading, r=ahal,taskgraph-reviewers,releng-reviewers. https://github.com/mozilla-firefox/firefox/commit/23880a6b8a62 https://hg.mozilla.org/integration/autoland/rev/cbae3fa54148 Fix try task matching for single-chunk dynamically-chunked tasks, r=ahal,taskgraph-reviewers.
Regressions: 2019790
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 150 Branch
Flags: needinfo?(florian)
Regressions: 2020777
Depends on: 2020785
Regressions: 2020914
Regressions: 2021087
See Also: → 2021088
Depends on: 2028197
Depends on: 2028218
Depends on: 2028234
Regressions: 2066746
Duplicate of this bug: 1648535
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: