Closed Bug 1580893 Opened 1 year ago Closed 10 months ago

Treeherder to support filtering tasks by test path

Categories

(Tree Management :: Treeherder: Frontend, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: armenzg, Assigned: armenzg)

References

Details

Attachments

(1 file)

From marco:

We have something similar for code coverage, for generating a mapping between test chunks and tests which run in them.
You can find the source code (beware, it was a WIP written hastily) at https://github.com/mozilla/code-coverage/blob/master/bot/code_coverage_bot/chunk_mapping.py, in particular see the get_tests_chunks function.

From gbrown:

In case it is of any use, be aware that 'mach test-info --show-tasks <test>' provides similar info:
$ ./mach test-info browser_toggleSimple.js --show-tasks
Test tasks for toolkit/components/pictureinpicture/tests/browser_toggleSimple.js on mozilla-central,mozilla-inbound,autoland between 2019-09-04 and 2019-09-11
linux64/debug-ccov-e10s: test-linux64-ccov/debug-mochitest-browser-chrome-e10s-6 in 1 runs
test-linux64-ccov/debug-mochitest-browser-chrome-e10s-11 in 1 runs
test-linux64-ccov/debug-mochitest-browser-chrome-e10s-2 in 1 runs
test-linux64-ccov/debug-mochitest-browser-chrome-e10s-3 in 6 runs
linux64/debug-e10s: test-linux64/debug-mochitest-browser-chrome-sw-e10s-7 in 1 runs
...
It uses an ActiveData query like:
{"limit": 1000, "from": "unittest", "where": {"and": [{"eq": {"result.test": "toolkit/components/pictureinpicture/tests/browser_toggleSimple.js"}}, {"in": {"build.branch": ["mozilla-central", "mozilla-inbound", "autoland"]}}, {"gt": {"run.timestamp": {"date": "2019-09-04"}}}, {"lt": {"run.timestamp": {"date": "2019-09-11"}}}]}, "select": ["build.platform", "build.type", "run.type", "run.name"], "format": "list"}

See Also: → 1583353

ahal: should I give this a try? or are you set on getting bug 1583353 fixed this quarter?

Flags: needinfo?(ahal)

I'm working on it now. Hopefully it'll be fixed this quarter, but no guarantees.. it's going to be a pretty massive change. I think you could likely work on the frontend parts in parallel though. As long as you don't couple it to any particular data source (and don't need to spend too long obtaining the data some other way).

Flags: needinfo?(ahal)
Assignee: nobody → armenzg
Status: NEW → ASSIGNED
Component: Web Tools → Treeherder: Frontend
Summary: Create prototype to filter jobs by test path → Treeherder to support filtering tasks by test path

This will be live Monday.

There's one known bug to me (bug 1611466)
If you append to the URL "&test_paths=foo" it will not apply properly; reloading the URL with "&test_paths=foo" will work.

Regressions: 1612000

On Monday I fixed a race condition that was made more obvious after some last minute changes to address the review feedback.
This is the fix: https://github.com/mozilla/treeherder/commit/013c949c4037c16d91d774394b0995c5353f3a67

The code was live on Tuesday.

Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.