Skip to content

Handle projects not found in Zoekt indexer worker

What does this MR do and why?

There have been an influx of ActiveRecord::NotFound errors for the ZoektIndexerWorker every time a new batch of namespaces is indexed

image source

I spot checked a few of the projects and they are a gitlab-qa-sandbox-group-X. It's expected that there are frequent project creations/deletions from qa testing. The indexer worker is scheduled in the future so these projects are deleted before they are indexed into Zoekt.

This merge request

  • returns false in the worker if the project is not found
  • adds a new spec
  • fix a rubocop warning in the spec for subject naming

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Enable the feature flag index_code_with_zoekt
    Feature.enable(:index_code_with_zoekt) 
  2. Run the worker with a not found project id
  3. Verify you get back false and no errors
    Zoekt::IndexerWorker.new.perform(0)
Edited by Terri Chu

Merge request reports