Skip to content

fix(workflow-engine): harden level condition label rendering - #122488

Draft
sentry-junior[bot] wants to merge 1 commit into
masterfrom
junior/fix-level-handler-unknown-match
Draft

fix(workflow-engine): harden level condition label rendering#122488
sentry-junior[bot] wants to merge 1 commit into
masterfrom
junior/fix-level-handler-unknown-match

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Listing project rules 500s when a level filter has an unsupported match op such as ne (NOT_EQUAL). Level only evaluates eq / gte / lte, but render_label used a strict dict lookup and the comparison schema allowed every MatchType.

Changes

  • Fall back to the raw match/level value when rendering labels (workflow-engine + legacy rule condition).
  • Restrict level comparison schema to the level-supported match ops.
  • Cover unknown-match label rendering and schema rejection of NOT_EQUAL.

Why

GET /api/0/projects/.../rules/ serializes every rule label. One bad stored match value should not take down the whole list.

Fixes SENTRY-5TFR

--

View Junior Session [Sentry]

Unknown match values like `ne` KeyError'd while serializing rules.
Fall back to the raw value and restrict level schema to supported ops.

Fixes SENTRY-5TFR
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 24, 2026
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.

0 participants