sentry icon indicating copy to clipboard operation
sentry copied to clipboard

feat(snuba-search): adds handling for additional filters for useGroupSnubaDataset=1

Open scefali opened this issue 1 year ago • 1 comments

This PR adds the capability to filter on the following new attributes:

  • regressed_in_release
  • release.build
  • release.package
  • release.dist

All of them require Postgres queries but handle it differently. For regressed_in_release, use the query to generate a list of IDs where we have a group history for regression that matches the versions we check for. For the other three, we get the release versions from Postgres and use that in a snuba query checking events of particular release versions.

Note I am leveraging convert_search_filter_to_snuba_query to generate the filters which requires some name mapping that I've added. And it adds logic to skip checking search_issues for columns that don't appear in it.

scefali avatar May 09 '24 19:05 scefali

Codecov Report

Attention: Patch coverage is 93.75000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 79.97%. Comparing base (e5cfbd8) to head (d807eac). Report is 87 commits behind head on master.

:exclamation: Current head d807eac differs from pull request most recent head 5531122. Consider uploading reports for the commit 5531122 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #70607      +/-   ##
==========================================
- Coverage   79.97%   79.97%   -0.01%     
==========================================
  Files        6500     6500              
  Lines      290317   290449     +132     
  Branches    50022    50044      +22     
==========================================
+ Hits       232187   232290     +103     
- Misses      57763    57792      +29     
  Partials      367      367              
Files Coverage Δ
...entry/issues/endpoints/organization_group_index.py 92.89% <ø> (ø)
src/sentry/search/snuba/backend.py 96.77% <ø> (ø)
src/sentry/search/snuba/executors.py 96.41% <93.75%> (-0.18%) :arrow_down:

... and 74 files with indirect coverage changes

codecov[bot] avatar May 09 '24 20:05 codecov[bot]

@wedamija It does, i can add tests for it if you think it's worth it

scefali avatar May 10 '24 16:05 scefali

@wedamija It does, i can add tests for it if you think it's worth it

As long as that functionality is already tested I think it's ok. If the tests are part of the old backend, and we plan to remove that backend, then we should port them over

wedamija avatar May 10 '24 16:05 wedamija

Suspect Issues

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

  • ‼️ ValueError: ['handled', "''"] is not a valid Op /api/0/organizations/{organization_slug}/issues/ View Issue

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

sentry[bot] avatar May 13 '24 17:05 sentry[bot]