Skip to content

Resolve "Deployments::HooksWorker args do not serialize to JSON safely"

What does this MR do and why?

Behind a feature flag, the MR serializes sidekiq worker parameters and resolves the warning

Job arguments to Deployments::HooksWorker do not serialize to JSON safely. This will raise an error in
Sidekiq 7.0. 

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

  1. Create a deployment
  2. Check log/sidekiq_client.log, you should see an entry Job arguments to Deployments::HooksWorker do not serialize to JSON safely. This will raise an error in Sidekiq 7.0.
  3. In rails console, enable feature flag improve_hooksworker_serialization
  4. Check log/sidekiq_client.log again, you should not see a new warning entry.

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.

Related to #383194 (closed)

Edited by Halil Coban

Merge request reports