Skip to content

release.version multi-select filter returns 400 due to unsupported IN operator in semver pipeline #113135

@sentry-junior

Description

@sentry-junior

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

  1. Open a dashboard widget with a release.version filter.
  2. Select two or more release versions from the dropdown (operator: "is").
  3. 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.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions