Skip to content

Trim narrating comments

8a1ee34
Select commit
Loading
Failed to load commit list.
Merged

feat(dashboards): Validate display type against dataset config #115951

Trim narrating comments
8a1ee34
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: sentry-backend-bugs completed May 21, 2026 in 2m 5s

1 issue

sentry-backend-bugs: Found 1 issue (1 medium)

Medium

Stale `widget_type` in shared serializer context causes incorrect display-type validation for subsequent widgets - `src/sentry/api/serializers/rest_framework/dashboard.py:447-451`

When a dashboard update includes multiple widgets, the second (and later) widget without a widget_type key in its payload inherits the widget_type set by the previous widget, causing validate_display_type to validate against the wrong dataset and either wrongly reject valid combinations or (if the check is skipped) silently pass invalid ones.


⏱ 1m 32s · 112.5k in / 5.2k out · $0.33

Annotations

Check warning on line 451 in src/sentry/api/serializers/rest_framework/dashboard.py

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: sentry-backend-bugs

Stale `widget_type` in shared serializer context causes incorrect display-type validation for subsequent widgets

When a dashboard update includes multiple widgets, the second (and later) widget without a `widget_type` key in its payload inherits the `widget_type` set by the previous widget, causing `validate_display_type` to validate against the wrong dataset and either wrongly reject valid combinations or (if the check is skipped) silently pass invalid ones.