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

Release filtering does not work as expected in Discover #37871

Open
shruthilayaj opened this issue Aug 16, 2022 · 2 comments
Open

Release filtering does not work as expected in Discover #37871

shruthilayaj opened this issue Aug 16, 2022 · 2 comments

Comments

@shruthilayaj
Copy link
Member

shruthilayaj commented Aug 16, 2022

Environment

SaaS (https://sentry.io/)

Version

No response

Steps to Reproduce

Filtering on multiple releases.* keys in discover does not always provide expected results particularly in multi-project environments or projects with a lot of release objects. An example would be adding a search filter like release.version:>1.0.0 release.build:>10 release.stage:adopted to a Discover query.

Expected Result

All releases that fit the above criteria.

Actual Result

Empty results or a subset of the results.

@getsentry-release
Copy link

Routing to @getsentry/visibility for triage. ⏲️

@shruthilayaj
Copy link
Member Author

This happens because each of these release filters are applied independently. We query the Releases postgres table independently for each of these filters, limit the results to the first 1000 results and find the intersection of releases between the three which we then add to the snuba query's WHERE clause. In environments where there are a lot of releases (due to all/my projects being selected, large timeframe or simply because the project is deploying a lot of releases), the intersection of multiple of these postgres queries could easily be 0. Since the QueryBuilder instance has access to all the search terms, a potential solution is just to combine all the release search key conditions into one and make a single postgres query to retrieve the releases.

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

No branches or pull requests

5 participants