You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(dashboard): validate display types against all datasets (#577)
Fixes#535. Fixes#536. Supersedes the incorrect fixes in #570 (merged)
and #571 (closed).
## What was wrong
The CLI accepted any `--display` + `--dataset` combination and silently
saved broken widgets. Three independent issues:
1. **Column default too broad** (#536, partially fixed in #570) —
`columns: ["issue"]` was applied for all issue dataset display types,
not just `table`. A `--display line --dataset issue` chart got wrong
columns.
2. **Issue display type validation** (#535) — only `table/area/line/bar`
are valid for the issue dataset but any display type was accepted.
3. **No validation for any other dataset** — `--display table --dataset
tracemetrics` (not supported), `--display table --dataset
preprod-app-size` (not supported), `--display details --dataset logs`
(spans-only), all silently created broken widgets.
## Source of truth
All constraints sourced from Sentry's frontend dataset configs at commit
[`a42668e`](https://github.com/getsentry/sentry/blob/a42668e/static/app/views/dashboards/datasetConfig/):
| Dataset | Supported display types |
|---|---|
| `issue` | `table`, `area`, `line`, `bar` |
| `spans` | `area`, `bar`, `big_number`, `categorical_bar`, `line`,
`stacked_area`, `table`, `top_n`, `details`, `server_tree` |
| `error-events` / `transaction-like` / `metrics` / `logs` / `discover`
| `area`, `bar`, `big_number`, `categorical_bar`, `line`,
`stacked_area`, `table`, `top_n` |
| `tracemetrics` | `area`, `bar`, `big_number`, `categorical_bar`,
`line` |
| `preprod-app-size` | `line` |
## What this does
- Replaces `ISSUE_DATASET_DISPLAY_TYPES` with
`DATASET_SUPPORTED_DISPLAY_TYPES` — a full map for all 9 widget types
- `validateWidgetEnums` does one lookup into the map instead of a
hardcoded issue check
- Column default remains scoped to `issue + table` only
## Test plan
All existing tests pass plus new coverage for:
- `preprod-app-size + table` → error; `+ line` → ok
- `tracemetrics + table` → error
- `spans + details` → ok; `logs + details` → error
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
0 commit comments