Repository navigation
Conversation
Dashboard revisions is rolled out to 100%, so remove the organizations:dashboards-revisions flag and make revision tracking, history, preview, and restore always-on. - Drop the flag registration from features/temporary.py - Remove the REVISIONS_FEATURE gate from the revisions, revision details, and revision restore endpoints - Always take a dashboard snapshot on edit in the details endpoint - Update tests to drop the feature context manager and remove the now-obsolete flag-disabled cases DAIN-1702
nikkikapadia
approved these changes
Jun 5, 2026
skaasten
added a commit
that referenced
this pull request
Jun 5, 2026
…116971) Dashboard revisions is rolled out to 100%, so this removes the `dashboards-revisions` gate on the frontend. The revisions button now renders whenever the user has dashboard edit access. ## Changes - Drop the `<Feature features="dashboards-revisions">` wrapper around `DashboardRevisionsButton` in `controls.tsx`. - Drop the flag from the `dashboardRevisions.spec.tsx` org fixture. ## Notes The backend flag removal is in a **separate PR** (#116969) since frontend and backend are not atomically deployed. Either order is deploy-safe because the flag is already at 100%. DAIN-1702
skaasten
deleted the
shaunkaasten/dain-1702-remove-dashboard-revisions-feature-flag
branch
June 5, 2026 15:45
3 tasks
BYK
pushed a commit
that referenced
this pull request
Nov 7, 2026
Publishes the two dashboard revision endpoints the Sentry CLI calls, so they reach the public OpenAPI schema and the generated `@sentry/api` client. Refs #130351, where the endpoints were proposed for publishing. In the Slack thread that led to it, revisions were confirmed to be "here to stay". | Operation | Endpoint | operationId | | --- | --- | --- | | `GET /organizations/{org}/dashboards/{dashboard_id}/revisions/` | `OrganizationDashboardRevisionsEndpoint` | `listOrganizationDashboardRevisions` | | `POST /organizations/{org}/dashboards/{dashboard_id}/revisions/{revision_id}/restore/` | `OrganizationDashboardRevisionRestoreEndpoint` | `restoreOrganizationDashboardRevision` | **Why now:** the list endpoint landed in #113084 (2026-04-17) and restore in #113176 (2026-04-21). Both have been GA since the `dashboards-revisions` flag was removed in #116969 (2026-06-05). Neither endpoint has a feature gate. **What changed** - `publish_status` goes from `PRIVATE` to `PUBLIC`. Both already had `owner = ApiOwner.DASHBOARDS`, so the ownership allowlist doesn't change. - `DashboardRevisionResponse` now has field descriptions, and its `createdBy` uses a new `DashboardRevisionCreatedByResponse` TypedDict instead of an untyped `dict`. The new type matches the five keys the serializer builds: `id`, `name`, `email`, `avatarType`, `avatarUrl`. - The list is documented as paginated (`OffsetPaginator`, so `cursor` + `per_page`), newest first, and capped at 10 kept revisions (`DashboardRevision.RETENTION_LIMIT`). - Restore returns the dashboard details response (`DashboardDetailsModelSerializer`, the same type as GET/PUT on the dashboard). It is documented with 400 (unsupported snapshot version or validation errors), 403 (no edit access, via `check_object_permissions`), 404, and 409 (title conflict). - Restore sets `idempotent_methods = frozenset()`. Each call records a new `pre-restore` revision and an audit log entry, so it isn't safe to resend. - Return annotations now use `Response[T]` arms, as flake8 S022 requires for published methods. The restore validation error path now goes through `as_validation_errors`, with no runtime change. - `test_organization_agent_token.py` builds its permission matrix from every public operation. It now creates a dashboard revision for the new `revision_id` placeholder. **Schema check:** I ran `make build-api-docs` and diffed `openapi-derefed.json` against master. The only path changes are these two added operations, plus the new `DashboardRevisionListResponse` component. The "(Optional) Shows the difference between the prod and dev schema" check is expected to fail on a schema-changing PR. **Tests run locally** - `make build-api-docs` and `pnpm run validate-api-examples`: pass - `pytest tests/apidocs` plus the revisions, restore and dashboard details endpoint tests: 364 passed - `pytest tests/sentry/seer/endpoints/test_organization_agent_token.py`: 321 passed, 23 xfailed (the restore row needed the new placeholder) - `prek run` and mypy (`--stage pre-push`) on the changed files: pass <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Aad6dcaf84a4dd09a1ae97e392f4bf088 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Aad6dcaf84a4dd09a1ae97e392f4bf088) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Aad6dcaf84a4dd09a1ae97e392f4bf088/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dashboard revisions is rolled out to 100%, so this removes the
organizations:dashboards-revisionsfeature flag on the backend and makes revision tracking, history, preview, and restore always-on.Changes
features/temporary.py.REVISIONS_FEATUREgate (thefeatures.has(...)→ 404 guard) from the revisions, revision-details, and revision-restore endpoints.with self.feature(...)context manager and remove the now-obsolete flag-disabled cases.Notes
The frontend gate removal is in a separate PR since frontend and backend are not atomically deployed. Either order is deploy-safe because the flag is already at 100%.
DAIN-1702