Backend: Sidekiq warns of unsafe JSON serialization
Problem
Noticed in !79291 (comment 828755219) by @jhyson:
I also wanted to note that I saw both these errors in
log/sidekiq_client.log
while I was testing this:{"severity":"WARN","time":"2022-02-02T03:20:13.856Z","message":"Job arguments to MergeRequests::UpdateHeadPipelineWorker do not serialize to JSON safely. This will raise an error in\nSidekiq 7.0. See https://github.com/mperham/sidekiq/wiki/Best-Practices or raise an error today\nby calling `Sidekiq.strict_args!` during Sidekiq initialization.\n"} {"severity":"WARN","time":"2022-02-02T03:09:02.237Z","message":"Job arguments to GitlabSubscriptions::NotifySeatsExceededWorker do not serialize to JSON safely. This will raise an error in\nSidekiq 7.0. See https://github.com/mperham/sidekiq/wiki/Best-Practices or raise an error today\nby calling `Sidekiq.strict_args!` during Sidekiq initialization.\n"}
Perhaps this is something we need to look into as well?
We need to check why Sidekiq is rasing this warning and what we need to do to solve that.
Proposal
It's sufficient to ensure that the hash data uses string keys.
Edited by Mark Nuzzo