sentry icon indicating copy to clipboard operation
sentry copied to clipboard

fix(substatus): Set group substatus to NEW when creating a new group

Open snigdhas opened this issue 1 year ago • 1 comments

New issues are not explicitly created with the NEW substatus today. The order in which events are processed can result in bugs like this where new groups are marked with the default Ongoing substatus before they are processed by Kafka. In post_process, we set the group substatus to New. In self-hosted customers, the delay between these two steps can be long enough that issues appear in the stream with the Ongoing substatus and skip the issue alerts that are tied to the New trigger.

This PR changes that behavior by explicitly setting the substatus for new groups to NEW. The remaining change are tweaks to tests which inadvertently expected new groups to have an ONGOING substatus.

Fixes https://github.com/getsentry/sentry/issues/75540

snigdhas avatar Aug 01 '24 19:08 snigdhas

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

:white_check_mark: All tests successful. No failed tests found.

Files Patch % Lines
src/sentry/testutils/cases.py 50.00% 1 Missing :warning:
Additional details and impacted files

:loudspeaker: Thoughts on this report? Let us know!

codecov[bot] avatar Aug 01 '24 19:08 codecov[bot]

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ OperationalError: connection to server at "127.0.0.1", port 6432 failed: ERROR: pgbouncer cannot connect to server sentry.tasks.post_process.post_process_group View Issue

Did you find this useful? React with a 👍 or 👎

sentry[bot] avatar Aug 14 '24 23:08 sentry[bot]