Repository navigation
feat(slack): Add a team link context API - #130554
sentry-junior[bot] wants to merge 2 commits into
Conversation
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
b81ba09 to
b80f45d
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b80f45d. Configure here.
The team link page must offer organizations from every cell, but a cell
only knows about its own. Add a control silo `GET
/api/0/integrations/slack/link-team/{signed_params}/` that validates the
link signed by `/sentry link team` and returns the channel name with the
user's organizations that have the Slack workspace installed.
Organizations are serialized with their region URLs so the page can talk
to each organization's cell directly.
Co-Authored-By: Evan Purkhiser <evan.purkhiser@sentry.io>
Co-Authored-By: Michi Hoffmann <michael.hoffmann@sentry.io>
Serializing an org mapping whose cell isn't in this deploy's directory raises CellResolutionError, so one stale membership failed the whole team link context. Only list orgs in known cells, the same way the organization index does.
a93ab72 to
3bfc89f
Compare

The React team link page has to offer organizations from every cell, but a cell only knows about its own. This adds a control silo endpoint for that:
GET /api/0/integrations/slack/link-team/{signed_params}/It validates the link that
/sentry link teamsigns and returns:channelNamechannelUrl: aslack://deep link back to the channelorganizations: the user's active organizations that have the Slack workspace installed, serialized withControlSiloOrganizationMappingSerializerso each one carries itslinks.regionUrl. The page uses that to call each organization's cell directly.Malformed or expired links return 400 instead of 500. Signed-param parsing lives in
TeamLinkParams.from_signedso the cell endpoint in the next PR can reuse it.Stacked on #130553.
via evan.purkhiser.
--
View Session [Sentry]