Skip to content
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

fix(seer grouping): Stop checking for missing groups when handling processed results #70670

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented May 10, 2024

When Seer sends back information on similar groups, there's no guarantee that those groups still exist on the Sentry side. Therefore, in the similar issues endpoint, we surround our code which handles the Seer results with a try-except, in case we look for a group which isn't there. Now that the Seer data is first being processed by the SeerSimilarIssueData.from_raw factory method, though, we no longer have to worry about missing groups, because from_raw will error out and not create a SeerSimilarIssueData instance if the group doesn't exist.

This therefore removes the try-except, which then allows us to use a simple list comprehension to build the return value of the endpoint's get_formatted_results helper.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 10, 2024
@lobsterkatie lobsterkatie marked this pull request as ready for review May 10, 2024 18:42
@lobsterkatie lobsterkatie force-pushed the kmclb-remove-unnecessary-try-catch-in-similar-issues-endpoint branch from 2f7a6e8 to 082b775 Compare May 14, 2024 05:08
Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.00%. Comparing base (6c80b1e) to head (082b775).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #70670      +/-   ##
==========================================
- Coverage   80.01%   80.00%   -0.01%     
==========================================
  Files        6507     6507              
  Lines      290842   290836       -6     
  Branches    50126    50126              
==========================================
- Hits       232706   232693      -13     
- Misses      57700    57707       +7     
  Partials      436      436              
Files Coverage Δ
...y/api/endpoints/group_similar_issues_embeddings.py 100.00% <100.00%> (+1.92%) ⬆️

... and 5 files with indirect coverage changes

@lobsterkatie lobsterkatie merged commit 6aabf2c into master May 14, 2024
50 checks passed
@lobsterkatie lobsterkatie deleted the kmclb-remove-unnecessary-try-catch-in-similar-issues-endpoint branch May 14, 2024 20:00
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.

None yet

2 participants