Automatically index projects in Zoekt when namespace is enabled
What does this MR do and why?
Zoekt is a new code search database being gradually rolled out on GitLab.com . It is intended to replace Elasticsearch for code search.
We use the ::Zoekt::IndexedNamespace
model as a way to keep track of
namespaces that are enabled as part of our rollout of using Zoekt for
code search. When we implemented this we did not automate the indexing
of the projects when this was enabled and we had this as another manual
step as part of the rollout. Now that we're building APIs to enable a
namespace in
!116650 (merged) we want
this to also automatically index all the projects in the namespace when
it is enabled.
This MR just adds an after create hook on the model to trigger a Sidekiq
worker which then loops through all projects in the namespace and
triggers another Sidekiq worker to do the indexing. This is larger a
copy of the way we do it with the ElasticNamespaceIndexerWorker
and as
such we have added a 2nd argument to the worker which will be used in
the future to handle deletes.
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
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #389756 (closed)
Merge request reports
Activity
changed milestone to %Backlog
assigned to @DylanGriffith
marked the checklist item I have evaluated the MR acceptance checklist for this MR. as completed
@sdungarwal could you please give this an initial backend review.
requested review from @sdungarwal
- A deleted user
added backend label
1 Warning featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Marcos Rocha (
@mc_rocha
) (UTC-4, 14 hours behind@DylanGriffith
)Rodrigo Tomonari (
@rodrigo.tomonari
) (UTC-3, 13 hours behind@DylanGriffith
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
Sidekiq queue changes
This merge request contains changes to Sidekiq queues. Please follow the documentation on changing a queue's urgency.
These queues were added:
search_zoekt_namespace_indexer
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangeradded 1 commit
- e1670e16 - Automatically index projects in Zoekt when namespace is enabled
mentioned in commit 1cdf07be
added 1 commit
- 1cdf07be - Automatically index projects in Zoekt when namespace is enabled
mentioned in commit 4692206b
added 1 commit
- 4692206b - Automatically index projects in Zoekt when namespace is enabled
removed review request for @sdungarwal
mentioned in commit c1640234
added 329 commits
-
4692206b...80c9f419 - 328 commits from branch
master
- c1640234 - Automatically index projects in Zoekt when namespace is enabled
-
4692206b...80c9f419 - 328 commits from branch
- Resolved by Dylan Griffith
@sdungarwal back to you for review. I fixed the specs now.
requested review from @sdungarwal
- Resolved by Dylan Griffith
- Resolved by Dylan Griffith
@sdungarwal
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.
For more info, please refer to the following links:
added pipeline:mr-approved label
removed review request for @sdungarwal
- Resolved by Dylan Griffith
requested review from @kassio
- Resolved by Jessie Young
- Resolved by Kassio Borges
removed review request for @kassio
mentioned in issue #407329
@kassio back to you for another review. I responded and applied your suggestion.
requested review from @kassio
mentioned in commit 5670f066
added 1 commit
- 5670f066 - Automatically index projects in Zoekt when namespace is enabled
enabled an automatic merge when the pipeline for bed93fd9 succeeds
mentioned in commit d949db08
mentioned in commit f95a5c98
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-production label and removed workflowproduction label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label
mentioned in merge request kubitus-project/kubitus-installer!2061 (merged)
changed milestone to %16.0
mentioned in issue #389756 (closed)