Unable to login to staging due to Sentry and repository issues
While trying to login to staging after entering in username/password/2FA, we often see Error 500s. It looks like there are a few issues:
- Sentry isn't accepting this event (e.g. CSP issue? Valid IP? https://github.com/getsentry/sentry/issues/4212#issuecomment-249606837, https://github.com/getsentry/sentry/blob/ec86dc56a386546a355f84b98dded53a5ce288db/src/sentry/coreapi.py#L392-L400)
- One of the repositories in my login appears to be stale
Sending event bb366925c0cb4efdbc3a9239c18bea78 to Sentry
Unable to record event with remote Sentry server (Raven::Error - the server responded with status 403 Error in headers is: Event dropped due to filter):
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/sentry-raven-2.4.0/lib/raven/transports/http.rb:35:in `rescue in send_event'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/sentry-raven-2.4.0/lib/raven/transports/http.rb:18:in `send_event'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/sentry-raven-2.4.0/lib/raven/client.rb:40:in `send_event'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/sentry-raven-2.4.0/lib/raven/instance.rb:81:in `send_event'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/sentry-raven-2.4.0/lib/raven/instance.rb:126:in `capture_type'
/opt/gitlab/embedded/lib/ruby/2.3.0/forwardable.rb:189:in `capture_type'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/sentry-raven-2.4.0/lib/raven/integrations/rack.rb:28:in `capture_type'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/sentry-raven-2.4.0/lib/raven/integrations/rails/overrides/debug_exceptions_catcher.rb:8:in `render_exception'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:27:in `rescue in call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
Failed to submit event: Rugged::OdbError: Object not found - no match for id (c7d5916019b494c8d3ee1ee1d0277044f46e7946)
Rugged::OdbError (Object not found - no match for id (c7d5916019b494c8d3ee1ee1d0277044f46e7946)):
lib/gitlab/git/repository.rb:133:in `target'
lib/gitlab/git/repository.rb:133:in `block (2 levels) in branch_count'
lib/gitlab/git/repository.rb:131:in `each'
lib/gitlab/git/repository.rb:131:in `count'
lib/gitlab/git/repository.rb:131:in `block in branch_count'
lib/gitlab/gitaly_client.rb:77:in `block in migrate'
lib/gitlab/metrics/influx_db.rb:92:in `measure'
lib/gitlab/gitaly_client.rb:76:in `migrate'
lib/gitlab/git/repository.rb:1247:in `gitaly_migrate'
lib/gitlab/git/repository.rb:127:in `branch_count'
app/models/repository.rb:515:in `branch_count'
app/models/repository.rb:58:in `block (2 levels) in cache_method'
lib/repository_cache.rb:20:in `fetch'
app/models/repository.rb:1150:in `cache_method_output'
app/models/repository.rb:58:in `block in cache_method'
app/models/repository.rb:90:in `has_visible_content?'
app/models/repository.rb:1035:in `empty_repo?'
app/models/project.rb:206:in `empty_repo?'
app/controllers/projects/application_controller.rb:67:in `require_non_empty_project'
lib/gitlab/i18n.rb:39:in `with_locale'
lib/gitlab/i18n.rb:45:in `with_user_locale'
app/controllers/application_controller.rb:307:in `set_locale'
lib/gitlab/performance_bar/peek_performance_bar_with_rack_body.rb:16:in `call'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/readonly_geo.rb:30:in `call'
lib/gitlab/request_context.rb:18:in `call'
Edited by Stan Hu