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 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 subscribed.

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

hashar subscribed.

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.

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.

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.

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 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.

@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 :)