Skip to content

feat: Add IN operator support for semver release search #96492

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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

JoshFerge
Copy link
Member

Summary

  • Add support for IN/NOT IN operators in semver release search across all filter converter locations
  • Enable queries like release.version:[1.2.3,1.2.4], release.version:[1.2.*,2.*], release.build:[123,456]
  • Implement comprehensive TDD test coverage with edge cases

Test plan

  • Unit tests for all semver filter converters with IN operator support
  • Integration tests via organization group index endpoint
  • Edge case testing (empty lists, invalid versions, mixed valid/invalid)
  • Wildcard support in IN clauses (release.version:[1.*,2.*])
  • Package name support (release.version:[pkg1@1.2.3,pkg2@1.2.4])
  • All existing tests pass (123/123)

Add support for IN/NOT IN operators in semver release search across all filter converter locations.

This allows queries like:
- release.version:[1.2.3,1.2.4]
- release.version:[1.2.*,2.*]
- release.build:[123,456]
- release.build:[1*,2*]

Implementation details:
- Process each item in IN clause individually using existing = operator
- Union results to create final version list
- Maintain existing query optimization for non-IN operators
- Add graceful error handling for invalid semver versions
- Include comprehensive TDD test coverage

Files modified:
- src/sentry/search/events/filter.py: Main filter converter logic
- src/sentry/search/eap/spans/filter_aliases.py: EAP spans search support
- src/sentry/search/events/datasets/filter_aliases.py: Dataset search support
- tests/sentry/search/events/test_filter.py: Unit tests
- tests/sentry/issues/endpoints/test_organization_group_index.py: Integration tests

All tests pass (123/123).
Add support for IN/NOT IN operators in semver release search across all filter converter locations.

This allows queries like:
- release.version:[1.2.3,1.2.4]
- release.version:[1.2.*,2.*]
- release.build:[123,456]
- release.build:[1*,2*]

Implementation details:
- Process each item in IN clause individually using existing = operator
- Union results to create final version list
- Maintain existing query optimization for non-IN operators
- Add graceful error handling for invalid semver versions
- Include comprehensive TDD test coverage

Files modified:
- src/sentry/search/events/filter.py: Main filter converter logic
- src/sentry/search/eap/spans/filter_aliases.py: EAP spans search support
- src/sentry/search/events/datasets/filter_aliases.py: Dataset search support
- tests/sentry/search/events/test_filter.py: Unit tests
- tests/sentry/issues/endpoints/test_organization_group_index.py: Integration tests

All tests pass (123/123).
- Use separate list variables to avoid type conflicts
- Handle raw_value type casting properly for mypy compliance
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 25, 2025
Copy link

codecov bot commented Jul 25, 2025

Codecov Report

❌ Patch coverage is 65.21739% with 80 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...rc/sentry/search/events/datasets/filter_aliases.py 33.33% 38 Missing ⚠️
src/sentry/search/eap/spans/filter_aliases.py 42.85% 36 Missing ⚠️
src/sentry/search/events/filter.py 88.46% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #96492       +/-   ##
===========================================
+ Coverage   33.26%   87.74%   +54.47%     
===========================================
  Files        9040    10652     +1612     
  Lines      504726   614798   +110072     
  Branches    24158    24158               
===========================================
+ Hits       167887   539426   +371539     
+ Misses     336549    75082   -261467     
  Partials      290      290               

@getsantry
Copy link
Contributor

getsantry bot commented Aug 16, 2025

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Aug 16, 2025
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.

1 participant