Zoekt dot_com_rollout relies upon all enabled namespaces having indices
Summary
Related to gitlab-org/search-team/team-tasks#199 (closed)
The dot_com_rollout
task has a check at the top that prevents the task from running if any enabled namespace exists without an index
EnabledNamespace.with_missing_indices.exists?
What is the current bug behavior?
Even one namespace without an index could hold up an unbounded number of indexed and available namespaces from being rolled out
What is the expected correct behavior?
If a namespace has an index, and meets the other requirements, Zoekt search should be enabled
Relevant logs and/or screenshots
Possible fixes
The code to pull enabled namespaces could have a join for indices which are ready
Search::Zoekt::EnabledNamespace
.where(search: false)
.where('created_at < ?', DOT_COM_ROLLOUT_ENABLE_SEARCH_AFTER.ago)
.joins(:indices).where('zoekt_indices.ready = 10')
.order(:id)
.limit(DOT_COM_ROLLOUT_SEARCH_LIMIT)
.update_all(search: true, updated_at: Time.zone.now)
Edited by Terri Chu