]> cat aescling's git repositories - mastodon.git/commit
Fix Sidekiq warnings about JSON serialization (#17381)
authorClaire <claire.github-309c@sitedethib.com>
Thu, 27 Jan 2022 23:43:56 +0000 (00:43 +0100)
committerGitHub <noreply@github.com>
Thu, 27 Jan 2022 23:43:56 +0000 (00:43 +0100)
commit03d59340da3ffc380d7b27169bdc887140d88bee
tree32f4a9835d860de7b3b2d0a42b42202c57f6d2e7
parent14c69a535bcf5c96459a802093463e0bd1a8ef66
Fix Sidekiq warnings about JSON serialization (#17381)

* Fix Sidekiq warnings about JSON serialization

This occurs on every symbol argument we pass, and every symbol key in hashes,
because Sidekiq expects strings instead.

See https://github.com/mperham/sidekiq/pull/5071

We do not need to change how workers parse their arguments because this has
not changed and we were already converting to symbols adequately or using
`with_indifferent_access`.

* Set Sidekiq to raise on unsafe arguments in test mode

In order to more easily catch issues that would produce warnings in production
code.
16 files changed:
app/controllers/api/v1/statuses_controller.rb
app/lib/activitypub/activity/create.rb
app/lib/feed_manager.rb
app/models/admin/status_batch_action.rb
app/models/form/account_batch.rb
app/services/account_statuses_cleanup_service.rb
app/services/activitypub/process_status_update_service.rb
app/services/fan_out_on_write_service.rb
app/services/follow_service.rb
app/services/import_service.rb
app/services/reblog_service.rb
app/services/resolve_account_service.rb
app/workers/activitypub/distribution_worker.rb
app/workers/feed_insert_worker.rb
app/workers/scheduler/user_cleanup_scheduler.rb
config/environments/test.rb