Closed Bug 2017153 Opened 3 months ago Closed 3 months ago

Remove dead mochitest chunking code (--chunk-by-runtime, --chunk-by-dir, --total-chunks, --this-chunk)

Categories

(Testing :: Mochitest, enhancement)

enhancement

Tracking

(firefox149 fixed)

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(2 files)

Mochitest's runtests.py has code to split tests into chunks at runtime using --total-chunks/--this-chunk with either --chunk-by-runtime (loading manifest-runtimes-*.json files) or --chunk-by-dir.

This code is dead in CI: the taskgraph decision task now pre-assigns specific manifests to each chunk via chunk_manifests() in taskcluster/gecko_taskgraph/util/chunking.py, and communicates them to test tasks through MOZHARNESS_TEST_PATHS. When that env var is set, desktop_unittest.py passes the manifest paths directly to mochitest and skips --total-chunks/--this-chunk entirely. Since mochitest uses the default manifest loader (no test-manifest-loader: null), test-manifests are always resolved at taskgraph time, so the runtime chunking path is never taken.

This patch removes:

  • The --total-chunks, --this-chunk, --chunk-by-runtime, --chunk-by-dir options from mochitest_options.py and their validation logic
  • The chunking filter block in runtests.py (chunk_by_dir, chunk_by_runtime, chunk_by_slice) and the corresponding manifestparser imports
  • The chunkByRuntime/chunkByDir assignments in mach_test_package_commands.py
  • The suite_name pass-through in mach_commands.py (only needed for chunk-by-runtime)
  • All --chunk-by-runtime and --chunk-by-dir=4 flags from mozharness configs (linux_unittest.py, mac_unittest.py, win_unittest.py, android_common.py)

Chunking is now done at taskgraph time via chunk_manifests() in
chunking.py, with manifests passed to test tasks via
MOZHARNESS_TEST_PATHS. The --total-chunks/--this-chunk args are
no longer passed to mochitest, making the runtime chunking code
(--chunk-by-runtime, --chunk-by-dir) dead.

These files provided runtime data for the now-removed mochitest chunking
code. The taskgraph fetches runtime data directly from TaskCluster
artifacts instead. The writeruntimes script queried the long-defunct
ActiveData service to generate these files.

Also removes a stale pyproject.toml exclusion and a sparse-profile entry
that is no longer needed since the taskgraph doesn't read from
testing/runtimes/.

Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bb7a4d5ebc72 https://hg.mozilla.org/integration/autoland/rev/19e0d495a041 Revert "Bug 2017153 - Remove dead mochitest chunking code. r=ahal" for causing mochitests failures.

Reverted this because it was causing mochitests failures.

Flags: needinfo?(florian)
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/bd3b6a9b9ce5 https://hg.mozilla.org/integration/autoland/rev/ece0c4f89ac1 Remove manifest-runtimes-*.json files, writeruntimes script, and stale references. r=ahal
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
Flags: needinfo?(florian)
Blocks: 2042832
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: