Zoekt data is not be dependant on elasticsearch settings
requested to merge 467183-zoekt-data-is-not-getting-deleted-when-elasticsearch_indexing-is-false-in-application into master
What does this MR do and why?
Remove the elasticsearch dependency for the Zoekt data cleaning on the project deletion.
Added a new worker Zoekt::DeleteProjectInZoektWorker
which gets called on the event Projects::ProjectDeletedEvent
if the Zoekt search is enabled for the project.
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.
Before | After |
---|---|
How to set up and validate locally
- Checkout to the
master
- Setup Zoekt for a namespace.
- Create a new project under the selected namespace.
- Perform a code search under the project just to make sure zoekt is setup.
- Now uncheck the
Elasticsearch indexing
under the AdvancedSearch setting. - Restart the gdk. This step might be skipped. I did just to do a fresh test.
- tail the
log/sidekiq.log
in a new tab - Delete this project immediately from the setting
- Notice that there will be no call to the
Search::Zoekt::DeleteProjectWorker
in the logs. Also, you can verify that the zoekt data for this project is still present undergitlab-development-kit/zoekt-data/development/index
path. The data format is "#{project_id}_v16.00000.zoekt" - Now create a new project under the same namespace and perform a code search just to make sure zoekt is setup.
- Switch to the branch of this MR.
467183-zoekt-data-is-not-getting-deleted-when-elasticsearch_indexing-is-false-in-application
- Delete this project immediately from the setting
- Notice that there will be a call to the
Search::Zoekt::DeleteProjectWorker
in the logs. Also, you can verify that the zoekt data for this project is not present undergitlab-development-kit/zoekt-data/development/index
path. The data format is "#{project_id}_v16.00000.zoekt"
Related to #467183 (closed)
Edited by Ravi Kumar