Error Tracking incompatible with Sentry 8.x
Summary
Error Tracking page is broken when used with an older version of Sentry API due to a missing project's id
in the issue JSON.
Steps to reproduce
- Launch Sentry 8.16, create a project, report some errors.
- Set up Error Tracking in GitLab in project Settings → Operations.
- Go to Operations → Error Tracking.
What is the current bug behavior?
Error Tracking page seems broken the same way as described in #56851 (closed).
What is the expected correct behavior?
I should be able to see a list of Sentry issues.
Relevant logs and/or screenshots
Found in sidekiq.log:
WARN: KeyError: key not found: "id"
WARN: /opt/gitlab/embedded/service/gitlab-rails/lib/sentry/client.rb:120:in `fetch'
Possible fixes
I checked manually the response from Sentry API, and it turns out the version we use, 8.16, doesn't include project's id in the issue JSON, only the name and the slug.
The culprit is this line https://gitlab.com/gitlab-org/gitlab-ce/blob/810436e858886784b87756d5fa4b0b0a8aeabacd/lib/sentry/client.rb#L120.
I did some search and it doesn't seem like (Sentry) project_id
is used for anything, so for now I made a change in client.rb and simply added a default nil
, restarted GitLab, and now the Error Tracking page works.
I know we use an old version of Sentry but would you consider including this change?