Selecting multiple values for release.version in a dashboard widget filter produces a 400 "Invalid Query" response. A single release.version value works fine.
Root cause
release.version uses the semver filter pipeline, which only supports operators that map to Django/semver semantics (=, !=, >=, etc.). When multiple values are selected, the query builder emits an IN operator, which is not handled by the semver converter:
# src/sentry/search/events/filter.py (~line 467)
try:
operator = OPERATOR_TO_DJANGO[operator]
except KeyError:
raise InvalidSearchQuery("Invalid operation 'IN' for semantic version filter.")
By contrast, the plain release filter field supports multi-value selection via release_filter_converter in src/sentry/search/events/datasets/filter_aliases.py, which explicitly maps = → IN and resolves release strings before passing to the default filter converter.
Reproduction
- Open a dashboard widget with a
release.version filter.
- Select two or more release versions from the dropdown (operator: "is").
- The widget query returns HTTP 400 "Invalid Query".
Workaround
- Use the
release filter field (full release string) instead of release.version when multiple versions need to be selected simultaneously.
- If
release.version is required, restrict to one value at a time.
Fix direction
Extend the release.version filter handler so that multi-value inputs are resolved to their corresponding release strings and forwarded as an IN clause (similar to how release_filter_converter works), rather than passing IN directly through the semver operator converter.
Action taken on behalf of Chris Stavitsky.
Selecting multiple values for
release.versionin a dashboard widget filter produces a 400 "Invalid Query" response. A singlerelease.versionvalue works fine.Root cause
release.versionuses the semver filter pipeline, which only supports operators that map to Django/semver semantics (=,!=,>=, etc.). When multiple values are selected, the query builder emits anINoperator, which is not handled by the semver converter:By contrast, the plain
releasefilter field supports multi-value selection viarelease_filter_converterinsrc/sentry/search/events/datasets/filter_aliases.py, which explicitly maps=→INand resolves release strings before passing to the default filter converter.Reproduction
release.versionfilter.Workaround
releasefilter field (full release string) instead ofrelease.versionwhen multiple versions need to be selected simultaneously.release.versionis required, restrict to one value at a time.Fix direction
Extend the
release.versionfilter handler so that multi-value inputs are resolved to their corresponding release strings and forwarded as anINclause (similar to howrelease_filter_converterworks), rather than passingINdirectly through the semver operator converter.Action taken on behalf of Chris Stavitsky.