Ruby version: 2.3.1
Sidekiq / Pro / Enterprise version(s): Sidekiq 4.2.7 / Pro 3.4.3 / Ent 1.5.1
When using encryption feature, if a job fails, when it retries it will contain an invalid value for the encrypted argument.
class PrivateWorker
include Sidekiq::Worker
sidekiq_options encrypt: true
def perform(x, y, secret_bag)
puts "secret bag: #{secret_bag}"
raise "Error"
end
end
PrivateWorker.perform_async(1, 2, {"ssn" => "123-45-6789"})
Output on first execution:
secret bag: {"ssn"=>"123-45-6789"}
Output on first retry:
secret bag: BAhTOhFTaWRla2lxOjpFbmMKOgZjSSIQYWVzLTI1Ni1nY20GOgZFVDoIdGFnIhXWsnWEUi75i5Ummecjer8lOgdpdiIRuvSUBYQSRm45aup8OgZ2aQY6CWJsb2IiJsO5evYXFyx9aaympvIszn0usQ7xL81g186zlsDM0195pA==
For each retry, the already encrypted last argument is encrypted again.
Working app to reproduce: https://github.com/renanborgescampos/sidekiq-encryption-test
Thank you, will be fixed in 1.5.2 very soon.
Most helpful comment
Thank you, will be fixed in 1.5.2 very soon.