Skip to content

ref(aci): Prefer workflow id when building alert links - #126285

Draft
sentry-junior[bot] wants to merge 3 commits into
masterfrom
kc/prefer-workflow-id-for-alert-links
Draft

sentry-junior[bot] wants to merge 3 commits into
masterfrom
kc/prefer-workflow-id-for-alert-links

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

get_rule_or_workflow_id returns the legacy rule id whenever one is present. That made sense when it was added, but it also means every caller that only uses it to pick a rule link or a workflow link ends up linking to the legacy rule even when a workflow id is available.

This adds a keyword-only prefer argument (default unchanged, "legacy_rule_id"). Callers that only use the result to build a link now pass prefer="workflow_id":

  • Slack footer (build_slack_footer) and Slack issue title link plus its environment lookup
  • Shared messaging footer (build_footer)
  • Discord title link
  • AlertRuleNotification.get_notification_title

Callers where the id means something beyond a link stay on the legacy default:

  • Slack block id "rule": the Slack action handler resolves it back to a Rule
  • Digest record ids (event_to_record / split_rules_by_rule_workflow_id): these have to match the record's IdentifierKey
  • Sentry App alert webhook payload id: an external contract

The Slack test expectations now point to /monitors/alerts/<workflow_id>/ and workflow_id= in the cases where the factory rule carries both ids.

via Kyle Consalus.

--

View Junior Session [Sentry]

Co-Authored-By: Kyle Consalus <kyle.consalus@sentry.io>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 1, 2026
Co-Authored-By: Kyle Consalus <kyle.consalus@sentry.io>
@kcons
kcons self-requested a review October 2, 2026 00:03
@kcons

kcons commented Oct 2, 2026

Copy link
Copy Markdown
Member

bugbot review

@cursor cursor Bot left a comment

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7ceadb9. Configure here.

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.

1 participant