Skip to content

chore(seer-slack): Move organization resolution to control#113107

Draft
leeandher wants to merge 2 commits intomasterfrom
leanderrodrigues/iswf-2467-escalate-organization-resolution-from-cell-to-control
Draft

chore(seer-slack): Move organization resolution to control#113107
leeandher wants to merge 2 commits intomasterfrom
leanderrodrigues/iswf-2467-escalate-organization-resolution-from-cell-to-control

Conversation

@leeandher
Copy link
Copy Markdown
Member

This is set up to allow us to properly route for integrations sharing installations across cells.

@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 15, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 15, 2026
Comment on lines +98 to +109
integration=self.integration,
slack_user_id=self.user_id,
channel_id=self.channel_id,
thread_ts=self.thread_ts or None,
is_welcome_message=self.is_assistant_thread_event,
)
return SeerResolutionResult(
organization_id=None, error_reason=SeerSlackHaltReason.IDENTITY_NOT_LINKED
)

ois = integration_service.get_organization_integrations(
integration_id=self.integration.id,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RuntimeError when resolve_seer_organization accesses self.integration without validation

The new resolve_seer_organization() method accesses self.integration at lines 98 and 109, but self.integration raises RuntimeError when _integration is None. The _integration field is only populated by _get_context() which is called from validate(). The middleware parser (_maybe_get_response_from_event_request in slack.py:297-306) creates a SlackEventRequest and calls resolve_seer_organization() without first calling validate(), causing a RuntimeError to be raised.

Also found at 1 additional location
  • src/sentry/middleware/integrations/parsers/slack.py:303-303

Identified by Warden sentry-backend-bugs · RA8-UWS

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