Convert GLQL Finder to a more generic Advanced Finder

What does this MR do and why?

  • This MR converts the current GLQL WorkItems finder to a more generic Advanced Finder naming.
    • This way we can also introduce an extra feature flag to reuse the existing ES integration with WorkItems lists.
  • I also moved the existing advanced finder from ee/app/finders/ee/work_items/glql/work_items_finder.rb to ee/lib/ee/search/elastic/advanced_finders/work_items_finder.rb to avoid having to get database reviews which are required for all files within /finders dir.

References

#544820 (closed)
#561475
&17460

Screenshots or screen recordings

Before After

How to set up and validate locally

There are two testing scenarios. First one is to test that everything for GLQL works as it used to. The working integration tests are supporting that nothing changed there. The manual test would be the following:

  1. Follow this guide to have ES enabled locally for GDK
  2. GLQL relies on crypto.subtle, which is unavailable in insecure contexts (except for localhost), it won’t work if you're using a custom URL like http://gdk.test:3000 locally. To resolve this, one of the options is to enable HTTPS in GDK by following this link.
  3. Enable the following feature flags in rails c:
=> Feature.enable(:glql_integration)
=> Feature.enable(:glql_work_items)
=> Feature.enable(:glql_es_integration)
  1. Navigate to any issue comment or description field where Markdown is supported
  2. Add any GLQL query into the field, it should work (make sure to build the query only based on the currently supported ES fields):
```glql
display: table
fields: title, labels, milestone
query: group = "gitlab-org" and label = any
```

The flow to test it with work items lists would be the following:

  1. Have the following feature flags enabled:
=> Feature.enable(:work_items_project_issues_list)
=> Feature.enable(:work_item_planning_view)
=> Feature.enable(:work_items_list_es_integration)

Navigate to the work items overview page https://gdk.test:3443/groups/gitlab-org/-/work_items or https://gdk.test:3443/gitlab-org/gitlab/-/work_items and now you can see that the page loads results from the ES (can be checked via the performance bar).

Please note that Epics listing page is not working since integrating searching by Epics requires some extra job on the ES side, see related issue.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #544820 (closed)

Edited by Alisa Frunza

Merge request reports

Loading