Skip to content

Conversation

shashjar
Copy link
Member

@shashjar shashjar commented Sep 3, 2025

Resolves ID-227.

We determined the bug reported in the above issue to be intended behavior. If a group already has an assignee, our post-processing logic will never attempt to reassign it when new events come in, even if the cache has expired and/or the ownership rules have changed in the interim.

This PR adds a test to capture this behavior. A separate PR has been created to update the Ownership Rules documentation page in order to make this behavior more explicit to users.

Copy link

linear bot commented Sep 3, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 3, 2025
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #98750       +/-   ##
===========================================
+ Coverage   66.76%   81.25%   +14.49%     
===========================================
  Files        8537     8546        +9     
  Lines      377146   377516      +370     
  Branches    24001    24001               
===========================================
+ Hits       251804   306754    +54950     
+ Misses     124977    70397    -54580     
  Partials      365      365               

@shashjar shashjar changed the title Investigation of bug in issue owners ordering changes chore(issue ownership): Tests that groups with existing assignees are not reassigned Sep 8, 2025
@shashjar shashjar marked this pull request as ready for review September 8, 2025 17:48
@shashjar shashjar requested a review from a team as a code owner September 8, 2025 17:48
Copy link
Contributor

@cvxluo cvxluo left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines 1020 to 1021
assert assignee is not None
assert assignee.user_id is None
Copy link
Contributor

@cvxluo cvxluo Sep 8, 2025

Choose a reason for hiding this comment

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

nit, since i believe we're only really interested in verifying that team is set properly

Suggested change
assert assignee is not None
assert assignee.user_id is None

Copy link
Member Author

Choose a reason for hiding this comment

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

true, these are redundant

@shashjar shashjar merged commit a10d28c into master Sep 8, 2025
62 checks passed
@shashjar shashjar deleted the id-227-issue-owner-reordering-ownership-rules-changes branch September 8, 2025 20:03
shashjar added a commit to getsentry/sentry-docs that referenced this pull request Sep 8, 2025
…assigned (#14840)

Resolves
[ID-227](https://linear.app/getsentry/issue/ID-227/issue-owners-are-not-reordered-when-rules-are-reordered).

Follow-up to [this PR](getsentry/sentry#98750).
Updates the [Ownership Rules
documentation](https://docs.sentry.io/product/issues/ownership-rules/)
to clarify the intended behavior. Our post processing logic will never
attempt to reassign a group if an assignee already exists, even if the
cache has expired and/or the ownership rules have changed in the
interim.

## IS YOUR CHANGE URGENT?  

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

## PRE-MERGE CHECKLIST

*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
andrewshie-sentry pushed a commit that referenced this pull request Sep 9, 2025
… not reassigned (#98750)

Resolves
[ID-227](https://linear.app/getsentry/issue/ID-227/issue-owners-are-not-reordered-when-rules-are-reordered).

We determined the bug reported in the above issue to be intended
behavior. If a group already has an assignee, our post-processing logic
will never attempt to reassign it when new events come in, even if the
cache has expired and/or the ownership rules have changed in the
interim.

This PR adds a test to capture this behavior. [A separate
PR](getsentry/sentry-docs#14840) has been
created to update the [Ownership
Rules](https://docs.sentry.io/product/issues/ownership-rules/)
documentation page in order to make this behavior more explicit to
users.
Copy link

sentry-io bot commented Sep 12, 2025

Issues attributed to commits in this pull request

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

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

@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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