fix(substatus): Set group substatus to NEW when creating a new group
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
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!
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_groupView Issue
Did you find this useful? React with a 👍 or 👎