Page MenuHomePhabricator

Query Maniphest Advanced Search instead of Phabricator Primary Global Search
Closed, ResolvedPublic

Description

Steps to reproduce:
In Logstash, investigating an output line, select the "Phatality" tab, and under "Phabricator actions" click the Search button.

Expected results:
Search results, ideally with additional context (project tags, date, etc), ideally without tickets marked as feature requests, provided by more performant Phabricator's Maniphest Advanced Search (class ManiphestTaskSearchEngine):
https://phabricator.wikimedia.org/maniphest/?statuses=open()&group=none&order=newest&query=%22Primary%22%20%22Global%22%20%22Advanced%22#R

Actual results:
Slightly error-prone search results without context, provided by less performant Phabricator's Primary Global Search (class ManiphestTaskFulltextEngine):
https://phabricator.wikimedia.org/search/?search:primary=true&search:scope=open-tasks&query=%22Primary%22%20%22Global%22%20%22Advanced%22#R

Other comments:
I'm unsure if there were particualr reason(s) behind using the primary (global) search with "open tasks" as a scope selector (CC'ing @Krinkle in case there's something I'm missing).
https://gerrit.wikimedia.org/r/plugins/gitiles/releng/phatality/+/96ea0062dd8c9d19cff1bed40b77d33fc9915a11 implies that the intention is to "search Phabricator for open tasks" anyway, so the set scope already excludes e.g. commits among global results anyway.

It seems already possible to use the dedicated "advanced" task search without code changes needed.

Disadvantage:
To get a short sharable URI with an alphanumeric identifier you need to run that query again.

Event Timeline

Change #1165491 had a related patch set uploaded (by Aklapper; author: Aklapper):

[releng/phatality@master] Replace Phabricator Global Search with Maniphest Advanced Search

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

Change #1165491 merged by jenkins-bot:

[releng/phatality@master] Replace Phabricator Global Search with Maniphest Advanced Search

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

Change #1165578 had a related patch set uploaded (by Cwhite; author: Cwhite):

[operations/puppet@production] logstash: deploy phatality 2.7.0.3 on beta-logs

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

Change #1165579 had a related patch set uploaded (by Cwhite; author: Cwhite):

[operations/puppet@production] logstash: deploy phatality 2.7.0.3 to production

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

Change #1165578 merged by Cwhite:

[operations/puppet@production] logstash: deploy phatality 2.7.0.3 on beta-logs

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

Change is live on beta-logs. You may want to test in incognito or manually refresh the JS assets to make sure you have the latest code.

Please let me know if it behaves as expected and we'll roll it out to production. Thanks!

Thanks.
I went to https://beta-logs.wmcloud.org/app/dashboards#/view/62247980-d0f3-11eb-818c-bb40115913b9 and was at first a bit surprised,

But that seems correct, because

I still believe it works all as expected but having some entry in beta-logs which actual does "find" a corresponding Phab ticket would be a welcome test case.

Ack. I'll hold off rolling it to production to give you an opportunity to debug.

Change #1166408 had a related patch set uploaded (by Aklapper; author: Aklapper):

[releng/phatality@master] Replace Phab Global Search with Maniphest Search: Cover more subtypes

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

Further testing shows that reality bites.
Some tickets found by the "old" global search have the default task subtype (which we exclude in the "new" search).

I filtered for normalized_message.keyword: Error in ChangesListHookHandler: No model available for [revertrisklanguageagnostic] on https://beta-logs.wmcloud.org/app/dashboards#/view/default , expanded a result in the list, selected the Phatality tab, clicked Search and got zero results with "new" URI
https://phabricator.wikimedia.org/maniphest/?statuses=open()&group=none&subtypes=bug,error,security&order=newest&query=%22Error%22%20%22in%22%20%22ChangesListHookHandler%3A%22%20%22No%22%20%22model%22%20%22available%22%20%22for%22%20%22%5Brevertrisklanguageagnostic%5D%22#R

The "old" search would have returned one result (not necessarily the one we're looking for but still) with the URI
https://phabricator.wikimedia.org/search/?search:primary=true&search:scope=open-tasks&query=%22Error%22%20%22in%22%20%22ChangesListHookHandler%3A%22%20%22No%22%20%22model%22%20%22available%22%20%22for%22%20%22%5Brevertrisklanguageagnostic%5D%22#R

Thus we should include the default subtype, and should likely also include the deadline subtype due to our rather problematic custom implementation of that thingie (details in T335395, would love to kill it but it's not trivial to remove).

I've put up a followup patch in https://gerrit.wikimedia.org/r/c/releng/phatality/+/1166408

After that adjustment I think we're ready to go, production-wise.

Change #1166408 merged by jenkins-bot:

[releng/phatality@master] Replace Phab Global Search with Maniphest Search: Cover more subtypes

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

Change #1165579 merged by Cwhite:

[operations/puppet@production] logstash: deploy phatality 2.7.0.3 to production

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

This is deployed.