Sidekiq PostReceive: undefined method `id' for nil:NilClass
Summary
Sidekiq PostReceive: undefined method `id' for nil:NilClass
2018-09-03_09:43:35.55997 2018-09-03T09:43:35.559Z 18518 TID-otmx7mj26 WARN: NoMethodError: undefined method `id' for nil:NilClass
2018-09-03_09:43:35.56003 2018-09-03T09:43:35.560Z 18518 TID-otmx7mj26 WARN: /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/data_builder/repository.rb:28:in `update'
2018-09-03_09:43:35.56004 /opt/gitlab/embedded/service/gitlab-rails/app/workers/post_receive.rb:56:in `after_project_changes_hooks'
2018-09-03_09:43:35.56004 /opt/gitlab/embedded/service/gitlab-rails/ee/app/workers/ee/post_receive.rb:12:in `after_project_changes_hooks'
2018-09-03_09:43:35.56004 /opt/gitlab/embedded/service/gitlab-rails/app/workers/post_receive.rb:52:in `process_project_changes'
2018-09-03_09:43:35.56004 /opt/gitlab/embedded/service/gitlab-rails/app/workers/post_receive.rb:24:in `perform'
It looks like sidekiq is attempting to execute service hooks without a user, but most likely due to post_received.changes_refs
being empty here https://gitlab.com/gitlab-org/gitlab-ee/blob/v11.2.3-ee/app/workers/post_receive.rb#L34
https://gitlab.zendesk.com/agent/tickets/103315 running 11.2.3-ee
It looks very similar to this sentry error: https://sentry.gitlap.com/gitlab/gitlabcom/issues/475699/events/latest/