Error sending mail when reassigning issue
Created by: martintama
When assigning a previously unassigned issue sidekiq throws error in reassigned_issue_email (Couldn't find User without an ID )
Steps to reproduce:
- Submit a new issue without filling the "assign to" field
- Edit the issue and select an user from the "assign to" field.
- Save changes
Using the latest 4-2-stable release (Commit d67117b5)
sidekiq.log shows:
2013-02-25T11:47:46Z 8001 TID-1hsu18 Sidekiq::Extensions::DelayedMailer JID-138e9b64281bcd2c1716f612 INFO: start
2013-02-25T11:47:46Z 8001 TID-1hsu18 Sidekiq::Extensions::DelayedMailer JID-138e9b64281bcd2c1716f612 INFO: fail: 0.005 sec
2013-02-25T11:47:46Z 8001 TID-1hsu18 WARN: {"retry"=>true, "queue"=>"default", "timeout"=>30, "class"=>"Sidekiq::Extensions::DelayedMailer", "args"=>["---\n- !ruby/class 'Notify'\n- :reassigned_issue_email\n- - 2\n - 18\n - \n"], "at"=>1361792859.589683, "jid"=>"138e9b64281bcd2c1716f612", "error_message"=>"Couldn't find User without an ID", "error_class"=>"ActiveRecord::RecordNotFound", "failed_at"=>2013-02-25 11:47:46 UTC, "retry_count"=>0}
2013-02-25T11:47:46Z 8001 TID-1hsu18 WARN: Couldn't find User without an ID
2013-02-25T11:47:46Z 8001 TID-1hsu18 WARN: /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/finder_methods.rb:310:in `find_with_ids'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/finder_methods.rb:107:in `find'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/querying.rb:5:in `find'
/home/gitlab/gitlab/app/mailers/notify.rb:31:in `reassigned_issue_email'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/abstract_controller/base.rb:167:in `process_action'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/abstract_controller/base.rb:121:in `process'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/abstract_controller/rendering.rb:45:in `process'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.2.11/lib/action_mailer/base.rb:458:in `process'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.2.11/lib/action_mailer/base.rb:452:in `initialize'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.2.11/lib/action_mailer/base.rb:439:in `new'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/actionmailer-3.2.11/lib/action_mailer/base.rb:439:in `method_missing'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/extensions/action_mailer.rb:20:in `perform'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/processor.rb:45:in `block (3 levels) in process'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/chain.rb:109:in `call'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/chain.rb:109:in `block in invoke'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/server/timeout.rb:11:in `block in call'
/usr/local/lib/ruby/1.9.1/timeout.rb:68:in `timeout'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/server/timeout.rb:10:in `call'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/chain.rb:111:in `block in invoke'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/chain.rb:111:in `block in invoke'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/server/retry_jobs.rb:49:in `call'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/chain.rb:111:in `block in invoke'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/logging.rb:22:in `with_context'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/chain.rb:111:in `block in invoke'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/chain.rb:114:in `call'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/middleware/chain.rb:114:in `invoke'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/processor.rb:44:in `block (2 levels) in process'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/processor.rb:80:in `stats'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/sidekiq-2.6.4/lib/sidekiq/processor.rb:43:in `block in process'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in `call'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in `public_send'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in `dispatch'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/future.rb:18:in `block in initialize'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:in `call'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:in `block in create'