Closed Bug 1400426 Opened 7 years ago Closed 6 years ago

mach try fuzzy search is too fuzzy

Categories

(Developer Infrastructure :: Try, enhancement)

enhancement
Not set
normal

Tracking

(firefox67 fixed)

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: sfink, Assigned: ahal)

Details

Attachments

(1 file)

For example, say I want to select all spidermonkey builds. If I type "spider", I get things like test-android-4.3-arm7-api-16/debug-reftest-33 ^ ^^ ^^ ^ This is clearly not what I intended. I'm not sure what the best way to search is. Maybe any \w+ tokens in the input should have to be uninterrupted in the job names? Or maybe \w+ tokens in the job names should only match at their beginnings? (For the record, "spidermo" is enough to get what I want.)
Product: TaskCluster → Firefox Build System
Component: Task Configuration → Try

Sorry I missed this. There's a decent chance you figured this out already, but for others who stumble upon this..

You can prefix a term with ' to make it an exact match. So for example:

asdf 'spider

The first term (asdf) will be a regular fuzzy match. The second one will only match tasks that have the substring "spider". You can reverse the behaviour of ' by setting FZF_DEFAULT_OPTS=--exact. In this mode, the first term (asdf) will be an exact match, and the second one (spider) will be fuzzy.

I know :jgraham wants --exact to be the default behaviour. I'm a bit on the fence about it though (mostly due to disrupting people's workflows and saved queries).

Yeah, thanks. I did figure it out, though I didn't know about the FZF_DEFAULT_OPTS=--exact trick. I definitely would have preferred that default, but at this point I think I agree that the current behavior is too entrenched and it would be too confusing to change. I'm resigned to train myself to use ' especially if there are going to be other things using this fzf thing that are going to use the default default.

I'm a bit on the fence about it though (mostly due to disrupting people's workflows and saved queries).

Do you really expect people to be relying on "asdf" currently matching fuzzily?

(In reply to Steve Fink [:sfink] [:s:] from comment #2)

Yeah, thanks. I did figure it out, though I didn't know about the FZF_DEFAULT_OPTS=--exact trick. I definitely would have preferred that default, but at this point I think I agree that the current behavior is too entrenched and it would be too confusing to change. I'm resigned to train myself to use ' especially if there are going to be other things using this fzf thing that are going to use the default default.

We should at least make --exact a top-level argument to mach try fuzzy so that people can set up an alias more easily without knowing the magic incantation.

(In reply to Mike Hommey [:glandium] from comment #3)

Do you really expect people to be relying on "asdf" currently matching fuzzily?

The breaking workflows statement is more in reference to the fact that 'term will become the new fuzzy match. This will definitely break saved queries and confuse people who have gotten used to typing 'term. It would also make try fuzzy inconsistent with fzf in other areas where fuzzy matching is more appropriate (e.g file system searching).

But to answer your question, I use fuzzy matching all the time (though I understand that it isn't the common use case).

Passing in --exact reverses the behaviour of the ' operator. For example, take the query "foo 'bar". By default: foo is a fuzzy match and bar is an exact match. With --exact: foo is an exact match and bar is a fuzzy match
Assignee: nobody → ahal
Status: NEW → ASSIGNED
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ba052addf07 [try] Add --exact argument to |mach try fuzzy|, r=jgraham
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: