Use native JSON type in ElasticCommitIndexerWorker
What does this MR do and why?
I started seeing this warning any time I ran specs where indexing into Elasticsearch was happening
Job arguments to ElasticCommitIndexerWorker must be native JSON types, but :force is a Symbol.
See https://github.com/sidekiq/sidekiq/wiki/Best-Practices
To disable this error, add `Sidekiq.strict_args!(false)` to your initializer.
This MR changes:
- any caller of
ElasticCommitIndexerWorker
to send theforce
param as a string key instead of a symbol - updates all specs to expect the new format
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
N/A
How to set up and validate locally
-
make sure your gdk is setup for
elasticsearch
or the specs will not run -
checkout
master
branch -
run this spec (specifically the
'visibility levels'
describe blockbundle exec rspec -f d ee/spec/lib/gitlab/elastic/search_results_spec.rb:1314
-
verify the warnings come up for
ElasticCommitIndexerWorker
-
check out this branch
-
run the same spec
-
verify you do not see the warnings for
ElasticCommitIndexerWorker
(you may still see messages forElasticWikiIndexerWorker
)
Edited by Terri Chu