Skip to content

Add indexing of group wikis in index rake task

Ravi Kumar requested to merge 336100-rake-task-index-group-wikis into master

What does this MR do and why?

While implementing the GroupWiki Elasticsearch, we missed to index group wikis on gitlab:elastic:index. This MR creates two new rake tasks

  • index_group_entities: Invokes index_epics and index_group_wiki
  • index_group_wiki: Indexes all the ES enabled groups' wikis

gitlab:elastic:index task now calls index_group_entities

Screenshots or screen recordings

Screenshot_2023-07-19_at_15.46.59

How to set up and validate locally

  • Make sure Elasticsearch is enabled
  • Create some Group wikis
  • Run the following rake task
bundle exec rake gitlab:elastic:index
  • Notice that in the console you should see this info Enqueuing Group level entities…, Indexing epics... and Indexing group wikis...
  • Now run this:
bundle exec rake gitlab:elastic:index_group_entities
  • Notice that in the console you should see this info Enqueuing Group level entities…, Indexing epics... and Indexing group wikis...
  • Now run this:
bundle exec rake gitlab:elastic:index_group_wikis
  • Notice that in the console you should see this info Indexing group wikis...
  • Also make sure that the group wikis get populated in the Elastic
curl -XGET "http://localhost:9200/gitlab-development-wikis/_search" -H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #336100 (closed)

Edited by Ravi Kumar

Merge request reports