Open Bug 1563379 Opened 5 years ago Updated 2 years ago

make "Add New Jobs (Search)" do a better job matching and sorting results

Categories

(Tree Management :: Treeherder, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

People

(Reporter: froydnj, Unassigned, NeedInfo)

Details

STR:

  1. Visit a try push (e.g. https://treeherder.mozilla.org/#/jobs?repo=try&revision=4657aeec9242ab1cbb8ce60358e77532d686f0cf ), and click "Add New Jobs (Search)".
  2. Check the "Use full job list" box.
  3. Enter "clang" in the search box and hit enter.

Expected results:

Toolchain jobs containing "clang" show up.

Actual results:

A few clang-related jobs show up, followed by several hundred "repackage" jobs of various flavors. The actual clang-related jobs are scattered throughout, and require some hunting to trigger.

I'm guessing some kind of fuzzy search is being used? I can't tell what the algorithm is, because there are things that don't match my query, even fuzzily, in the list (!).

That kind of matching is not really what I expect here, but I suppose it's useful. Can we at least move exact matches to the front, or sort the results alphabetically, or something to make the list more easily scannable?

It is indeed a fuzzy search against the task name and symbol, with the options defined here: https://github.com/mozilla/treeherder/blob/master/ui/job-view/pushes/FuzzyJobFinder.jsx#L54-L59

All of the options are explained at https://fusejs.io/

As a suggestion, I would try changing the "threshold" value from 0.6 to 0.5, to make the fuzzy matching just slightly stricter. 0 would require an exact match, and 1 would match anything regardless of whether it matches. I had originally set it to 0.4 but later loosened it to 0.6 to allow some misspellings to still match results, but maybe that wasn't necessary or was too lenient.

Happy to have someone revisit that decision. I'm heads down trying to figure out my new role after the latest reorg, so won't have time to work on this, but it should be pretty easy for someone to play around with the threshold value (or the other options available) to get things matching better. One could even add the "includeScore: true" option and then you can see the how well each result matches the search terms, but I think that changes the format of the fuzzy search results, so you'd need to change how the results get processed and shown on the page.

The list is supposed to be sorted alphanumerically, but it doesn't seem to be working. I'm not sure why that is. The initial list is getting sorted correctly, but that gets lost when a search filter is applied... Maybe this line needs its own .sort(sortAlphaNum) added to it?

Component: Treeherder → Treeherder: Job Triggering & Cancellation

Aryx, is it possible to get this prioritized? The search box is unusable for a lot of things as a result of this.

Flags: needinfo?(aryx.bugmail)
Component: Treeherder: Job Triggering & Cancellation → TreeHerder
You need to log in before you can comment on or make changes to this bug.