Page MenuHomePhabricator

Gerrit bug search not (naively) working with Phabricator tasks
Closed, ResolvedPublic

Description

A search for "bug:65278" correctly finds Gerrit change 133650. But "bug:T74334" doesn't find Gerrit change 177076 for some reason, although counterintuitively "bug:74334" (no 'T' prefix) does.

Related Objects

Event Timeline

Anomie created this task.Dec 19 2014, 3:33 PM
Anomie raised the priority of this task from to Needs Triage.
Anomie updated the task description. (Show Details)
Anomie added a project: Gerrit.
Anomie changed Security from none to None.
Anomie added a subscriber: Anomie.

Gerrit's configuration for Phabricator references matches the number only and adds the T in the url. The commentlink match group should instead include the T in the match.

https://github.com/wikimedia/operations-puppet/blob/ead8a651f11072a9bc35f666646aa9b9d41b13c5/modules/gerrit/templates/gerrit.config.erb#L99-L101

Paladox added a subscriber: QChris.Jun 4 2015, 7:33 PM
hashar triaged this task as Low priority.Sep 10 2015, 9:25 AM
hashar added a subscriber: hashar.
hashar removed a subscriber: hashar.Jul 23 2016, 10:07 PM

Gerrit 2.12 seems to allow us to search with out any for example type:

So for example you can search for

T1 and it should find commits with that being referenced.

Would that be ok, or do you still want it to be bug:. I doint see that happening in the near future.

demon moved this task from Bugs & stuff to Maybe fixed? on the Gerrit board.Jul 25 2016, 5:32 PM

The test case in the initial description can still be reproduced.
Whether it's worth to care or not is a different question. :)

Yep it Is still reproducible, I'm wondering if it is infact the plugins that do this if so maybe we can extend it in its-phabricator plugin, if not we can find where the source code is that supports search prefix bug: and then look at it to see why it wont take in T in the search.

Krinkle removed a subscriber: Krinkle.Aug 2 2016, 10:03 PM
Paladox moved this task from Maybe fixed? to Local hacks on the Gerrit board.Sep 6 2016, 3:55 PM

Change 308753 had a related patch set uploaded (by Paladox):
Add support for searching gerrit using bug:T1

https://gerrit.wikimedia.org/r/308753

The above change requires a reindex.

Dzahn added a subscriber: Dzahn.Dec 14 2016, 5:59 AM

bump, can we have some attention on https://gerrit.wikimedia.org/r/#/c/308753 @Paladox can you extend the commit message

Change 308753 merged by Dzahn:
Add support for searching gerrit using bug:T1

https://gerrit.wikimedia.org/r/308753

Paladox closed this task as Resolved.Jan 6 2017, 7:03 PM
Paladox claimed this task.

This now works.

See https://gerrit.wikimedia.org/r/#/q/bug:T1

All new changes will be able to do search doing that.

Existing changes will have to be reindexed first. We can either do that through off line reindex or reindex online.

Paladox added a subscriber: demon.Jan 6 2017, 7:27 PM

@demon has initiated the online reindex and some existing changes have started to work. Will take a while before all existing changes can do this. But it works now :)

Paladox removed a subscriber: gerritbot.