Closed Bug 2042832 Opened 5 days ago Closed 3 days ago

Remove --total-chunks/--this-chunk and chunk_by_slice from mochitest harness

Categories

(Testing :: Mochitest, task)

task

Tracking

(firefox153 fixed)

RESOLVED FIXED
153 Branch
Tracking Status
firefox153 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(3 files)

Bug 2017153 removed most of the dead static chunking code from the mochitest harness (--chunk-by-runtime, --chunk-by-dir, and the manifest-runtimes-*.json files), but had to scale back to keep --total-chunks, --this-chunk, and the chunk_by_slice filter in runtests.py and mochitest_options.py.

The reason was mochitest-webgl2-ext: its 4-chunk job fell through to the runtime chunking path because the suite's manifest was a single large generated file (dom/canvas/test/webgl-conf/generated-mochitest.toml) that couldn't be split at taskgraph time.

Bug 2040629 has since enabled dynamic chunking for all webgl mochitest jobs (once the webgl-conf manifest got split into per-cluster files). With that, no remaining mochitest task hits the --total-chunks/--this-chunk path:

  • mochitest-browser-chrome-failures, mochitest-devtools-chrome-failures, and mochitest-valgrind all still have static chunks in kind.yml, but none set test-manifest-loader: null. Their manifests are pre-resolved by the taskgraph and passed via MOZHARNESS_TEST_PATHS, so desktop_unittest.py never falls through to the --total-chunks/--this-chunk branch.
  • mochitest-valgrind also has run-on-projects: [], so it never runs by default anyway.

This bug re-does the part of bug 2017153 that was scaled back:

In testing/mochitest/mochitest_options.py:

  • Remove the --total-chunks and --this-chunk option blocks
  • Remove the totalChunks/thisChunk validation in validate()

In testing/mochitest/runtests.py:

  • Remove the chunk_by_slice import from manifestparser.filters
  • Remove the if options.totalChunks: filters.append(chunk_by_slice(...)) block

Bug 2017153 removed most of the dead static chunking code from the mochitest
harness, but had to scale back to keep --total-chunks, --this-chunk, and
the chunk_by_slice filter because mochitest-webgl2-ext fell through to the
runtime chunking path (its tests all lived in a single large generated
manifest that couldn't be split at taskgraph time).

Bug 2040629 has since enabled dynamic chunking for all webgl mochitest jobs,
once the webgl-conf manifest was split into per-cluster files. No remaining
mochitest task hits the --total-chunks/--this-chunk path: the only suites
still on static chunks in kind.yml (mochitest-browser-chrome-failures,
mochitest-devtools-chrome-failures, mochitest-valgrind) do not set
test-manifest-loader: null, so taskgraph pre-resolves their manifests and
passes them via MOZHARNESS_TEST_PATHS, and desktop_unittest.py never
appends --total-chunks/--this-chunk to the harness command.

Same reasoning as the mochitest cleanup in the previous commit. Neither
xpcshell task in taskcluster/kinds/test/xpcshell.yml sets
test-manifest-loader: null, so taskgraph always pre-resolves their
manifests and passes them via MOZHARNESS_TEST_PATHS. desktop_unittest.py
never appends --total-chunks/--this-chunk to the xpcshell command,
self.totalChunks stays at its default of 1, and the chunk_by_slice call
in runxpcshelltests.py never fires.

With xpcshell and mochitest no longer importing chunk_by_slice, the
filter has no consumers anywhere in-tree.

Status: ASSIGNED → RESOLVED
Closed: 3 days ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
See Also: → 2043459
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: