Deployments::HooksWorker args do not serialize to JSON safely
Summary
Self managed customers are reporting the following sorts of errors on their instances, and they can also be observed on GitLab.com
This will block the eventual upgrade to Sidekiq version 7
Job arguments to Deployments::HooksWorker do not serialize to JSON safely. This will raise an error in
Sidekiq 7.0. See https://github.com/mperham/sidekiq/wiki/Best-Practices or raise an error today
by calling `Sidekiq.strict_args!` during Sidekiq initialization.
Multiple workers are affected, and so multiple groups would be responsible for the fix. So I've raised #383181 (closed) to act as the hub for all the workers I found, and I'm raising separate issues for each worker (and may have to guess which group is responsible for the worker)
Steps to reproduce
Check on gitlab.com - https://log.gprd.gitlab.net/goto/800d7080-6820-11ed-85ed-e7557b0a598c
Example Project
What is the current bug behavior?
Sidekiq generates the error based on arguments to the worker.
What is the expected correct behavior?
Sidekiq no longer generates the error.
Relevant logs and/or screenshots
See error in description.
Output of checks
This bug happens on GitLab.com.
Log entries for this class of issue can be found at: https://log.gprd.gitlab.net/goto/800d7080-6820-11ed-85ed-e7557b0a598c
GitLab Enterprise Edition 15.6.0-pre 3d55ac97
Possible fixes
One worker got fixed in %15.1 - Fix Sidekiq warning in Gitlab::EventStore (!89736 - merged)
From the issue:
It's sufficient to ensure that the hash data uses string keys.