Skip to content

feat(slack): Gate the React team link page behind an option - #130562

Open
sentry-junior[bot] wants to merge 2 commits into
feat/slack-link-team-submitfrom
feat/slack-link-team-react-cutover
Open

sentry-junior[bot] wants to merge 2 commits into
feat/slack-link-team-submitfrom
feat/slack-link-team-react-cutover

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

The React team link page only fixes multi-cell linking if Slack sends people to it on the primary domain, served from control. Today they land on whichever cell received the command (cells[0], which happens to be de).

This registers slack.link-team-react-enabled, defaulting to false. When it's enabled:

  • build_team_linking_url drops the cell locality prefix, so links point at sentry.io.
  • SlackRequestParser sends GET requests for the link-team page to control instead of the first cell.
  • SlackLinkTeamView is now an all-silo view and serves the React app for GET. Its @cell_silo_view moved off the abstract TeamLinkageView, which otherwise blocked control. The Django form POST still runs in the cell, so an already-open Django page can still submit. Unlink stays cell-only.
  • sentry-integration-slack-link-team joins MULTI_REGION_NON_CUSTOMER_DOMAIN_URL_NAMES, so an active org doesn't push the page onto a customer domain, the same as the OAuth pages. That also redirects links already sent on a cell domain to the primary domain.
  • /sentry link team skips its role check. The cell only sees its own memberships, so someone whose qualifying org is in another cell was turned away before getting a link. The React page lists linkable teams from every cell and explains when there are none.

Rollout:

  • Turn the option on only after the frontend PRs in this stack are deployed.
  • The cell reads the option to build links and skip the role check, and control reads it to route the page. Turn it on in control before the cells, and roll back the cells first. With cells on and control off, the page falls back to Django on cells[0], which is the bug this fixes.

Removing the Django view, its templates, and the option will be a follow-up.

Stacked on #130561.

via evan.purkhiser.

--

View Session [Sentry]

@sentry-junior
sentry-junior Bot requested review from a team as code owners November 10, 2026 00:29
@sentry-junior
sentry-junior Bot added this pull request to stack #130555 November 10, 2026 00:29
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 10, 2026
@sentry

sentry Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 804 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@sentry-junior
sentry-junior Bot force-pushed the feat/slack-link-team-react-cutover branch from d70ebaa to 55b6f27 Compare November 10, 2026 00:35
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-link-team-react-cutover branch from 55b6f27 to 7a2c89d Compare November 10, 2026 00:44
sentry-junior Bot and others added 2 commits November 10, 2026 00:48
The React team link page can only fix multi-cell linking once Slack
sends people to it on the primary domain, served from control instead of
whichever cell received the command.

Register `slack.link-team-react-enabled`, defaulting to false. When
enabled, `/sentry link team` builds its link without the cell locality,
the Slack request parser sends GET requests for the page to control, and
`SlackLinkTeamView` serves the React app there. The Django form POST
still runs in the cell, so a Django page that is already open can still
submit after the switch.

Keep the page on the primary domain in multi-region deployments, matching
the OAuth pages.

Co-Authored-By: Evan Purkhiser <evan.purkhiser@sentry.io>
Co-Authored-By: Michi Hoffmann <michael.hoffmann@sentry.io>
The cell that handles /sentry link team only sees its own memberships,
so a user whose qualifying org lives in another cell was told their role
was insufficient before they ever saw a link. With the React page on,
leave that check to the page, which lists linkable teams from every cell.

In control, serve the React page for any GET instead of rereading the
option. The parser already checked it, and a flip between the two reads
would 404 a request the parser meant for React. Keep never_cache on
that response, since it embeds user config and a CSRF token behind a
signed URL.

Cover the control and cell paths that only ran in monolith before.

Co-Authored-By: Evan Purkhiser <evan.purkhiser@sentry.io>
Co-Authored-By: Michi Hoffmann <michael.hoffmann@sentry.io>
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-link-team-react-cutover branch from 7a2c89d to 2129988 Compare November 10, 2026 00:57

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.

0 participants