Skip to content

Replace zoekt dynamic indexer with gitlab-zoekt-indexer

What does this merge request do and why?

related to gitlab#414725 (closed)

switch GDK over to use the gitlab_zoekt_indexer in place of the zoekt indexer

How to set up and validate locally

verifying gdk setup and update

  1. Setup elasticsearch for gdk
  2. Follow instructions from readme to setup zoekt for gdk and enable it for a namespace
  3. run make gitlab-elasticsearch-setup and make gitlab-elasticsearch-update to verify they work
    ➜ make gitlab-zoekt-indexer-setup
    
    --------------------------------------------------------------------------------
    Updating gitlab-org/gitlab-zoekt-indexer
    --------------------------------------------------------------------------------
    ✅️ Successfully fetched and checked out '229f134015cf9136a52ff676db9ff862f13d301c' for 'gitlab-zoekt-indexer/'
    
    --------------------------------------------------------------------------------
    Building gitlab-org/gitlab-zoekt-indexer version 229f134015cf9136a52ff676db9ff862f13d301c
    --------------------------------------------------------------------------------
  4. change the version in gdk.yml to another commit: https://gitlab.com/gitlab-org/gitlab-zoekt-indexer/-/commits/main?ref_type=heads
  5. run gdk reconfigure
    ➜ gdk reconfigure
    .....   
    --------------------------------------------------------------------------------
    Updating gitlab-org/gitlab-zoekt-indexer
    --------------------------------------------------------------------------------
    Successfully fetched and checked out '0334a96cac09c8088168027cd0d492107ab9e474' for 'gitlab-zoekt-indexer/'
    
    --------------------------------------------------------------------------------
    Building gitlab-org/gitlab-zoekt-indexer version 0334a96cac09c8088168027cd0d492107ab9e474
    --------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------
    Building zoekt/bin/zoekt-webserver version b65e3e6bceef2587a8a9ecaa4515c886dfbc8837
    --------------------------------------------------------------------------------
    
    --------------------------------------------------------------------------------
    Reconfigured successfully as of 2023-07-19 19:53:57
    
    Took 18 sec(s) total
    --------------------------------------------------------------------------------

Verifying indexing

  1. Add a new file to a project in the namespace you setup for zoekt
  2. Verify the file is searchable (and that in the performance bar, that zoekt is being used)

Steps to communicate to our users

If you are using Zoekt in gdk, you must enable a new Feature Flag: ::Feature.enable(:use_new_zoekt_indexer)

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Terri Chu

Merge request reports