-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(dashboards): backend validation for text widget #108535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nikkikapadia
merged 13 commits into
master
from
nikki/text-widget/text-widget-serializer-validation
Mar 5, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6795064
backend validation for text widgets
nikkikapadia c8d98c1
add tests for validation
nikkikapadia 0bb09b1
fix typing i hope
nikkikapadia c7215d2
need to add user to feature flag check
nikkikapadia 5b76080
use get instead of bracket notation to access
nikkikapadia 2d9ca20
Merge branch 'master' into nikki/text-widget/text-widget-serializer-v…
nikkikapadia 8e0fb01
add description validation for non-text widgets
nikkikapadia d65449b
cursor fix
nikkikapadia 4b3caa9
Merge branch 'master' into nikki/text-widget/text-widget-serializer-v…
nikkikapadia 6d28b3a
early return for text widget validation
nikkikapadia 9c2d30c
update comment
nikkikapadia ef85a91
dumb dumb comment
nikkikapadia dbc8987
Merge branch 'master' into nikki/text-widget/text-widget-serializer-v…
nikkikapadia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Null
widget_typetriggers misleading discover monitoring alertLow Severity
Adding
allow_null=Trueto thewidget_typeChoiceField makes a previously-unreachable code path in_validate_widget_typereachable. When a non-text widget sendswidget_type: null,get_id_for_type_name(None)returnsNone, triggering thewidget_type is Nonebranch. This firessentry_sdk.capture_message("Created or updated widget with discover dataset.")and returns an error about "discover" being deprecated — both factually incorrect for a null input. The request is still correctly rejected, but the Sentry signal is a false positive that could pollute monitoring.Additional Locations (1)
src/sentry/api/serializers/rest_framework/dashboard.py#L305-L307There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope this is expected behaviour. No
widget_typefor non-text widgets will default to using the discover dataset.