Skip to content

feat(inbound-filters): Add semver based inbound filters for releases - #125877

Open
shellmayr wants to merge 7 commits into
masterfrom
shellmayr/feat/semver-inbound-filter-backend
Open

shellmayr wants to merge 7 commits into
masterfrom
shellmayr/feat/semver-inbound-filter-backend

Conversation

@shellmayr

@shellmayr shellmayr commented Sep 29, 2026 •

Copy link
Copy Markdown
Member
  • A release condition value that compares versions compiles to Relay's release rule condition, added in feat(generic-filters): Add a release rule condition relay#6430. That is a value with a leading >, >=, <, <= or =, or a plain release with a version such as 1.2.0 or myapp@1.2.0, which compares as equal. Any other value stays a glob pattern, so one condition can mix 1.* with >=3.0.
  • A comparison without a package applies to releases of every package. With a package, only that package's releases compare.
  • The API rejects a comparison whose release carries no version, such as >2* or <a4b7e0f9c2d1. Relay would never match those, so the filter would silently lose part of its values.
  • A Relay without the release op reads the condition as unsupported and never matches it. Such a filter drops nothing instead of dropping more than configured.
  • A release value the parser rejects, such as builds/* or one past the length limit, stays a glob. A comparison against one is rejected like one against a commit hash. Before, the endpoint failed with a 500 on such a value.

…itions

A release condition value that starts with >, >=, <, <= or = now compiles to
Relay's semver rule condition instead of a glob, so a filter can drop data from
a version range such as >=1.2.0 without listing each version as a pattern.
The API rejects a comparison whose release carries no version, as Relay would
never match it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 29, 2026
Comment thread src/sentry/api/endpoints/project_custom_inbound_filters.py
A release value without a comparator that carries a version, such as 1.2.0 or
myapp@1.2.0, now compares as equal to that version instead of matching the
text. So 1.2 matches 1.2.0 of every package, and a build code does not get
in the way. A value without a version, such as a commit hash or a glob, still
matches the text.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@shellmayr shellmayr changed the title feat(inbound-filters): Compare release versions in custom filter conditions feat(inbound-filters): Add semver based inbound filters for releases Sep 30, 2026
shellmayr and others added 3 commits October 6, 2026 15:45
Relay renamed the version comparison condition from `semver` to `release`
in getsentry/relay#6430. Emit the new op so a Relay with the condition
matches it, and name the types after it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The release parser raises on a value with bad characters, such as
`builds/*`, or past the length limit. A glob with such a value made the
custom filter endpoint fail with a 500. Relay reads no version out of
these releases, so a comparison against one is rejected like one against
a commit hash, and a glob stays a glob.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Relay config test that master added expects a glob for the release value 1.2.3.
On this branch a plain version compares as equal through the release condition, so
the test expects that condition instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch was successfully deployed

1 active (outdated) deployment
Preview — 2d129a71 Deployed Oct 14, 2026 by vercel[bot]
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.

2 participants