Skip to content

fix(issue summary): Add locking mechanism #90347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 28, 2025
Merged

fix(issue summary): Add locking mechanism #90347

merged 5 commits into from
Apr 28, 2025

Conversation

roaga
Copy link
Member

@roaga roaga commented Apr 24, 2025

If a summary is in progress for an issue while another request comes in, the other request should wait for a bit first. This ensures only one call to Seer per issue at a time.

@roaga roaga requested a review from jennmueng April 24, 2025 22:24
@roaga roaga requested a review from a team as a code owner April 24, 2025 22:24
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 24, 2025
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 94.50549% with 5 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/seer/issue_summary.py 89.28% 3 Missing ⚠️
tests/sentry/seer/test_issue_summary.py 96.82% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #90347      +/-   ##
==========================================
- Coverage   87.78%   87.41%   -0.37%     
==========================================
  Files       10264    10273       +9     
  Lines      580241   585145    +4904     
  Branches    22635    22659      +24     
==========================================
+ Hits       509346   511504    +2158     
- Misses      70460    73203    +2743     
- Partials      435      438       +3     

Copy link
Member

@jennmueng jennmueng left a comment

Choose a reason for hiding this comment

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

other than the comments not making sense, seems reasonble to me.

Have you tested this extensively locally? Just want to make sure to not cause an issue summary INC...

@roaga
Copy link
Member Author

roaga commented Apr 28, 2025

@jennmueng fixed the comments and made it a bit more readable

My testing is:

  • unit tests that should test the race conditions
  • running summaries from the frontend locally

idk if that's enough 🤷

@roaga roaga requested a review from jennmueng April 28, 2025 20:35
Copy link
Member

@jennmueng jennmueng left a comment

Choose a reason for hiding this comment

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

I'd say just making sure the locking mechanism works locally should suffice.

@roaga roaga merged commit 1c89066 into master Apr 28, 2025
63 checks passed
@roaga roaga deleted the issue-summary/locking branch April 28, 2025 21:09
Copy link

sentry-io bot commented May 3, 2025

Suspect Issues

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

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

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