Skip to content

fix(serializers): tighten blank-value and threshold validation - #130963

Draft
joshuarli wants to merge 1 commit into
masterfrom
josh/typing-bundle/drf-validation
Draft

joshuarli wants to merge 1 commit into
masterfrom
josh/typing-bundle/drf-validation

Conversation

@joshuarli

@joshuarli joshuarli commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Combines three typing-campaign drafts into one review unit; the code is unchanged from the individually validated drafts. Dashboard thresholds accept decimal maximums and the allowed-domains field rejects nonempty scalar strings, per the restacked corrections in #129621 and #129624.

Integrated in #130956.

Consolidates the previously separate drafts #129617, #129624 and #129621
into one review unit; the code is unchanged from those individually
validated drafts.

- OriginField preserves blank strings instead of coercing them to None
- EmptyListField returns an empty list for blank input instead of a bare
  empty string
- dashboard widgets validate threshold JSON shape: object thresholds,
  object max_values, integer or decimal maxima, and a string unit

Integrated in #130956.
@joshuarli
joshuarli force-pushed the josh/typing-bundle/drf-validation branch from c49e6b0 to 4bec556 Compare November 26, 2026 00:01
@github-actions

Copy link
Copy Markdown
Contributor

decision-model-linter

api

src/sentry/api/serializers/rest_framework/dashboard.py

  • warn makesExistingInputStricter = TRUE (0.92): Rejecting input an endpoint accepted before, or changing a field's default, breaks existing callers, and the API spec often doesn't show it. Make the change backward compatible (keep the field optional, accept the old values, or keep the old default), or treat it as a breaking change and coordinate it.

decision-model-linter: 10 calls on 2 files, 25,815 input tokens, $0.0011, model typesafe/jev-1.13-20260917

This branch has not been deployed

No deployments
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.

1 participant