Skip to content

feat(np): Adds renderer for MSTeams issue alerts - #124860

Open
hobzcalvin wants to merge 3 commits into
gp/add_renderer_registryfrom
gv/add_msteams_issue_renderer
Open

hobzcalvin wants to merge 3 commits into
gp/add_renderer_registryfrom
gv/add_msteams_issue_renderer

Conversation

@hobzcalvin

Copy link
Copy Markdown
Contributor

Stacked on #124857 (gp/add_renderer_registry). Supersedes #112890, which could not be reopened after the branch was rebased.

Summary

Adds IssueMSTeamsRenderer, so issue alerts sent through the notification platform produce the same Adaptive Card the legacy MSTeamsIssueMessageBuilder path produces today. The renderer registers itself for (MSTEAMS, ISSUE) with the registry from the parent PR rather than adding a get_renderer override to the provider.

Original work by @GabeVillalobos; rebased onto current master and adapted to the registry.

Notes for review

  • The renderer loads the Group and Event itself, which the comment at the top of render calls out as an anti-pattern. It is deliberate for now: it lets the card be byte-identical to the legacy builder during rollout, since build_attachment_title, build_footer, and friends all take ORM objects. The permanent fix is denormalizing those fields into IssueNotificationData, the way MetricAlertNotificationData already carries precomputed strings.
  • Actions are limited to a single "View Issue" link. The legacy card also offers resolve/archive/assign, which need the RpcIntegration for action webhook routing; that is follow-up work.

Test plan

  • pytest tests/sentry/notifications/platform/ — 246 passing.
  • Verified the provider dispatches IssueNotificationData to IssueMSTeamsRenderer and falls back to the default renderer for an unregistered source.

Made with Cursor

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 17, 2026
@hobzcalvin
hobzcalvin force-pushed the gv/add_msteams_issue_renderer branch 2 times, most recently from cdea8d3 to 7572f39 Compare September 18, 2026 22:11
GabeVillalobos and others added 3 commits September 18, 2026 15:26
Annotates _build_expected_card as returning an AdaptiveCard and types its
actions list, resolving mypy errors in the MSTeams issue renderer tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hobzcalvin
hobzcalvin force-pushed the gv/add_msteams_issue_renderer branch from 7572f39 to 9333505 Compare September 18, 2026 22:26
@hobzcalvin
hobzcalvin added this pull request to stack #124985 September 18, 2026 22:41
@hobzcalvin
hobzcalvin marked this pull request as ready for review September 18, 2026 22:43
@hobzcalvin
hobzcalvin requested a review from a team as a code owner September 18, 2026 22:43
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.

2 participants