Skip to content

feat: Send group status updates to snuba when archiving/unarchiving issues - #127454

Merged
RudraPatel2003 merged 7 commits into
masterfrom
rudra-group-status-emitting
Oct 15, 2026
Merged

RudraPatel2003 merged 7 commits into
masterfrom
rudra-group-status-emitting

Conversation

@RudraPatel2003

@RudraPatel2003 RudraPatel2003 commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Resolves ID-1911

Context:

You can query errors on the "Explore > Errors" page and pass in issue status filters like "is:archived". Under the hood it relies on the group_attributes table in Clickhouse

Issue status is stored in postgres, and the way they are forwarded to Clickhouse is a post_save and post_update receiver that sends the new issue status to snuba

There is an option called "groups.enable-post-update-signal". This flag defaults to off but is on in most of the regions. If this flag is off, we rely on the django post_save signal. Otherwise, we call our custom post_update signal

This post_update signal is called only if the code calls the "update" function. If the code calls the "update_with_returning" function, we do not send the signal

A few months ago a change was made so that when updating a group, it uses the update_with_returning function instead of the update function. In prod, the post_save signal won't get sent because the option is enabled. The post_update signal doesn't get sent because it is not called in update_with_returning

Customer impact: If you archive an event on the UI, the events still show up as unarchived in the Explore page. And this breaks monitors where customers set the is:unresolved query because now metric monitors are counting events from archived issues

@RudraPatel2003
RudraPatel2003 requested a review from a team as a code owner October 14, 2026 22:07
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 14, 2026
@linear-code

linear-code Bot commented Oct 14, 2026

Copy link
Copy Markdown

ID-1911

"""
Copied and modified from `Queryset.update()` to support `RETURNING <returned_fields>`
"""
pk = self.model._meta.pk.name

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Might make more sense to call this pk_name

self._result_cache = None

if self._with_post_update_signal:
pk_index = returned_fields.index(pk)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little risky if fields happen to contain the same value. I think it might be better to just require that the first requested column is the pk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants