notification mailer fails since 6.7 upgrade
Created by: Elyahou
I have updated my gitlab+gitlabshell installation yesterday, from 6.6.x to 6.7.2 with the upgrader.
Since, many users dont receive the notification emails for mergerequest.
In the sidekiq panel, I can see 150 failed jobs,
On the retry tabs, I can see the errors:
Arguments:
"---\n- !ruby/class 'Notify'\n- :merged_merge_request_email\n- - 12\n - 255\n"
Error:
ActiveRecord::RecordNotFound: Couldn't find User without an ID
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Author Owner
Created by: kemenaran
It could be related to this code: if the merge request doesn't have an
author_id_of_changes
, it could trigger the error that you posted.Can someone more knowledgeable than me confirm that there may be cases where this condition occurs?
By Administrator on 2014-03-24T13:34:43 (imported from GitLab project)
By Administrator on 2014-03-24T13:34:43 (imported from GitLab)
- Author Owner
Created by: Elyahou
here is the complete trace:
2014-03-24T13:03:04Z 25500 TID-os8voju9w WARN: {"retry"=>true, "queue"=>"default", "class"=>"Sidekiq::Extensions::DelayedMailer", "args"=>["---\n- !ruby/class 'Notify'\n- :merged_merge_request_email\n- - 12\n - 253\n"], "jid"=>"afb5d3f6a17b60f15894345c", "enqueued_at"=>1395660742.0211422, "error_message"=>"Couldn't find User without an ID", "error_class"=>"ActiveRecord::RecordNotFound", "failed_at"=>"2014-03-24T11:32:31Z", "retry_count"=>8, "retried_at"=>2014-03-24 13:03:04 UTC} 2014-03-24T13:03:04Z 25500 TID-os8voju9w WARN: Couldn't find User without an ID 2014-03-24T13:03:04Z 25500 TID-os8voju9w WARN: /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.3/lib/active_record/relation/finder_methods.rb:266:in `find_with_ids' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.3/lib/active_record/relation/finder_methods.rb:35:in `find' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-deprecated_finders-1.0.3/lib/active_record/deprecated_finders/relation.rb:122:in `find' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.3/lib/active_record/querying.rb:3:in `find' /home/git/gitlab/app/mailers/notify.rb:38:in `sender' /home/git/gitlab/app/mailers/emails/merge_requests.rb:36:in `merged_merge_request_email' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.3/lib/abstract_controller/base.rb:189:in `process_action' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.3/lib/abstract_controller/callbacks.rb:18:in `block in process_action' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:373:in `_run__3925385421168629239__process_action__callbacks' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.3/lib/active_support/callbacks.rb:80:in `run_callbacks' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.3/lib/abstract_controller/callbacks.rb:17:in `process_action' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.3/lib/abstract_controller/base.rb:136:in `process' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.3/lib/abstract_controller/rendering.rb:44:in `process' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.0.3/lib/action_mailer/base.rb:503:in `process' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.0.3/lib/action_mailer/base.rb:497:in `initialize' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.0.3/lib/action_mailer/base.rb:480:in `new' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.0.3/lib/action_mailer/base.rb:480:in `method_missing' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/extensions/action_mailer.rb:17:in `perform' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/processor.rb:49:in `block (3 levels) in process' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/chain.rb:122:in `call' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/chain.rb:122:in `block in invoke' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/server/active_record.rb:6:in `call' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/chain.rb:124:in `block in invoke' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/server/retry_jobs.rb:62:in `call' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/chain.rb:124:in `block in invoke' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/server/logging.rb:11:in `block in call' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/logging.rb:22:in `with_context' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/server/logging.rb:7:in `call' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/chain.rb:124:in `block in invoke' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/chain.rb:127:in `call' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/middleware/chain.rb:127:in `invoke' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/processor.rb:48:in `block (2 levels) in process' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/processor.rb:105:in `stats' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/processor.rb:47:in `block in process' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/processor.rb:86:in `do_defer' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/sidekiq-2.17.0/lib/sidekiq/processor.rb:37:in `process' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `public_send' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/calls.rb:122:in `dispatch' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `block in handle_message' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/actor.rb:416:in `block in task' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks.rb:55:in `block in initialize' /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/lib/celluloid/tasks/task_fiber.rb:13:in `block in create'
By Administrator on 2014-03-24T13:55:00 (imported from GitLab project)
By Administrator on 2014-03-24T13:55:00 (imported from GitLab)
- Author Owner
Created by: Elyahou
What I dont understand is that, not all users dont receive the email. For example, the merge request creator dont receive the email, but me, assigned to the request, receive it (Anyway, I am receiving all the merge request notifications as I am watching all projects)
By the way, the subject is also changed since the update, there is no mention that it is a merge request... For example, the subject for a new merge request notification is:
<project> | <branch> (!id)
It is also an issue...
By Administrator on 2014-03-24T15:44:00 (imported from GitLab project)
By Administrator on 2014-03-24T15:44:00 (imported from GitLab)