Skip to content

fix(notifications): Update alert rule URLs to use /issues/alerts/ prefix#110499

Open
JonasBa wants to merge 3 commits intomasterfrom
jb/nav/backend-alert-rule-urls
Open

fix(notifications): Update alert rule URLs to use /issues/alerts/ prefix#110499
JonasBa wants to merge 3 commits intomasterfrom
jb/nav/backend-alert-rule-urls

Conversation

@JonasBa
Copy link
Member

@JonasBa JonasBa commented Mar 12, 2026

Addressing some of the remaining redirect log messages

Backend notification links were still pointing to the old /alerts/rules/
path. After the navigation v2 rename, alert rules moved to
/issues/alerts/rules/. The old paths trigger double-redirect warnings via
useRedirectNavigationV2Routes when users click notification links.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 12, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

Backend Test Failures

Failures on 6ea91fa in this run:

tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_issue_alert_issue_owners_environment_block__workflow_enginelog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:404: in test_issue_alert_issue_owners_environment_block__workflow_engine
    self._assert_issue_owners_env_block(rule, environment)
tests/sentry/integrations/slack/notifications/test_issue_alert.py:350: in _assert_issue_owners_env_block
    assert (
E   AssertionError: assert 'Alert trigge...ils/|ja rule>' == 'Alert trigge...ils/|ja rule>'
E     
E     Skipping 43 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/32/details/|ja rule>
E     + tions/baz/issues/alerts/rules/bar/32/details/|ja rule>
E     ?          +++++++
tests/sentry/integrations/msteams/notifications/test_issue_alert.py::MSTeamsIssueAlertNotificationTest::test_issue_alert_ownerslog
tests/sentry/integrations/msteams/notifications/test_issue_alert.py:106: in test_issue_alert_owners
    assert (
E   AssertionError: assert 'Alert trigge...r/8/details/)' == 'Alert trigge...r/8/details/)'
E     
E     Skipping 52 identical leading characters in diff, use -v to show
E     - tions/baz/issues/alerts/rules/bar/8/details/)
E     ?          -------
E     + tions/baz/alerts/rules/bar/8/details/)
tests/sentry/integrations/msteams/notifications/test_issue_alert.py::MSTeamsIssueAlertNotificationTest::test_issue_alert_userlog
tests/sentry/integrations/msteams/notifications/test_issue_alert.py:56: in test_issue_alert_user
    assert (
E   AssertionError: assert 'Alert trigge.../14/details/)' == 'Alert trigge.../14/details/)'
E     
E     Skipping 52 identical leading characters in diff, use -v to show
E     - tions/baz/issues/alerts/rules/bar/14/details/)
E     ?          -------
E     + tions/baz/alerts/rules/bar/14/details/)
tests/sentry/integrations/opsgenie/test_client.py::OpsgenieClientTest::test_send_notificationlog
tests/sentry/integrations/opsgenie/test_client.py:95: in test_send_notification
    assert payload == {
E   AssertionError: assert {'alias': 'se...o world', ...} == {'alias': 'se...o world', ...}
E     
E     Omitting 6 identical items, use -vv to show
E     Differing items:
E     {'details': {'Issue URL': 'http://example.com/organizations/baz/issues/81/?referrer=opsgenie', 'Level': 'warning', 'Logger': '', 'Project ID': 'bar', ...}} != {'details': {'Issue URL': 'http://example.com/organizations/baz/issues/81/?referrer=opsgenie', 'Level': 'warning', 'Logger': '', 'Project ID': 'bar', ...}}
E     
E     Full diff:
E       {
E           'alias': 'sentry: 81',
E           'details': {
E               'Issue URL': 'http://example.com/organizations/baz/issues/81/?referrer=opsgenie',
E               'Level': 'warning',
E               'Logger': '',
E               'Project ID': 'bar',
E               'Project Name': 'Bar',
E               'Release': None,
E               'Sentry Group': 'Hello world',
E               'Sentry ID': '81',
E     -         'Triggering Rule URLs': 'http://example.com/organizations/baz/alerts/rules/bar/30/details/',
E     +         'Triggering Rule URLs': 'http://example.com/organizations/baz/issues/alerts/rules/bar/30/details/',
E     ?                                                                       +++++++
E               'Triggering Rules': 'my rule',
E           },
E           'entity': 'foo.bar',
E           'message': 'Hello world',
E           'priority': 'P2',
E           'source': 'Sentry',
E           'tags': [
E               'level:warning',
E           ],
E       }
tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_digest_enabled_blocklog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:945: in test_digest_enabled_block
    assert (
E   AssertionError: assert 'Alert trigge.../|Test Alert>' == 'Alert trigge.../|Test Alert>'
E     
E     Skipping 43 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/49/details/|Test Alert>
E     + tions/baz/issues/alerts/rules/bar/49/details/|Test Alert>
E     ?          +++++++
tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_issue_alert_issue_owners_environment_blocklog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:384: in test_issue_alert_issue_owners_environment_block
    self._assert_issue_owners_env_block(rule, environment)
tests/sentry/integrations/slack/notifications/test_issue_alert.py:350: in _assert_issue_owners_env_block
    assert (
E   AssertionError: assert 'Alert trigge...ils/|ja rule>' == 'Alert trigge...ils/|ja rule>'
E     
E     Skipping 43 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/61/details/|ja rule>
E     + tions/baz/issues/alerts/rules/bar/61/details/|ja rule>
E     ?          +++++++
tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_issue_alert_team_issue_owners_blocklog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:486: in test_issue_alert_team_issue_owners_block
    assert (
E   AssertionError: assert 'Alert trigge...ils/|ja rule>' == 'Alert trigge...ils/|ja rule>'
E     
E     Skipping 43 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/73/details/|ja rule>
E     + tions/baz/issues/alerts/rules/bar/73/details/|ja rule>
E     ?          +++++++
tests/sentry/integrations/slack/test_message_builder.py::BuildGroupAttachmentTest::test_build_group_block_noalog
tests/sentry/integrations/slack/test_message_builder.py:365: in test_build_group_block_noa
    assert SlackIssuesMessageBuilder(group, rules=[rule]).build() == build_test_message_blocks(
E   assert {'blocks': [{...: '[bar] bar'} == {'blocks': [{...: '[bar] bar'}
E     
E     Omitting 1 identical items, use -vv to show
E     Differing items:
E     {'blocks': [{'block_id': '{"issue":147,"rule":92}', 'text': {'text': ':red_circle: <http://testserver/organizations/ba...ts/rules/bar/92/details/|Test Alert>    Short ID: BAR-1', 'type': 'mrkdwn'}], 'type': 'context'}, {'type': 'divider'}]} != {'blocks': [{'block_id': '{"issue":147,"rule":92}', 'text': {'text': ':red_circle: <http://testserver/organizations/ba...ts/rules/bar/92/details/|Test Alert>    Short ID: BAR-1', 'type': 'mrkdwn'}], 'type': 'context'}, {'type': 'divider'}]}
E     
E     Full diff:
E       {
E           'blocks': [
E               {
E                   'block_id': '{"issue":147,"rule":92}',
E                   'text': {
E                       'text': ':red_circle: '
E                       '<http://testserver/organizations/baz/issues/147/?referrer=slack&alert_rule_id=92&alert_type=issue|*bar*>',
E                       'type': 'mrkdwn',
E                   },
E                   'type': 'section',
E               },
E               {
E                   'elements': [
E                       {
E                           'text': 'State: *New*   First Seen: *1\xa0minute ago*',
E                           'type': 'mrkdwn',
E                       },
E                   ],
E                   'type': 'context',
E               },
E               {
E                   'elements': [
E                       {
E                           'action_id': 'resolve_dialog::4557776889380864::4557776889380864',
E                           'text': {
E                               'text': 'Resolve',
E                               'type': 'plain_text',
E                           },
E                           'type': 'button',
E                           'value': 'resolve_dialog',
E                       },
E                       {
E                           'action_id': 'archive_dialog::4557776889380864::4557776889380864',
E                           'text': {
E                               'text': 'Archive',
E                               'type': 'plain_text',
E                           },
E                           'type': 'button',
E                           'value': 'archive_dialog',
E                       },
E                       {
... (32 more lines)
tests/sentry/rules/actions/test_create_ticket_utils.py::CreateTicketUtilsTest::test_build_descriptionlog
tests/sentry/rules/actions/test_create_ticket_utils.py:25: in test_build_description
    assert (
E   AssertionError: assert 'Test descrip...ules/bar/121/' == 'Test descrip...ules/bar/121/'
E     
E     Skipping 61 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/121/
E     + tions/baz/issues/alerts/rules/bar/121/
E     ?          +++++++
tests/sentry/api/endpoints/test_organization_plugin_deprecation_info.py::OrganizationPluginDeprecationInfoEndpointTest::test_project_with_plugin_rulelog
tests/sentry/api/endpoints/test_organization_plugin_deprecation_info.py:83: in test_project_with_plugin_rule
    assert expected_rule_url in affected_rules[0]
E   AssertionError: assert '/organizations/alive-woodcock/alerts/rules/project-with-plugin/6/details/' in 'http://alive-woodcock.testserver/organizations/alive-woodcock/issues/alerts/rules/project-with-plugin/6/details/'
tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_generic_issue_alert_user_blocklog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:202: in test_generic_issue_alert_user_block
    assert (
E   AssertionError: assert 'Alert trigge...ils/|ja rule>' == 'Alert trigge...ils/|ja rule>'
E     
E     Skipping 43 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/34/details/|ja rule>
E     + tions/baz/issues/alerts/rules/bar/34/details/|ja rule>
E     ?          +++++++
tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_issue_alert_issue_owners_blocklog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:316: in test_issue_alert_issue_owners_block
    assert (
E   AssertionError: assert 'Alert trigge...ils/|ja rule>' == 'Alert trigge...ils/|ja rule>'
E     
E     Skipping 43 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/48/details/|ja rule>
E     + tions/baz/issues/alerts/rules/bar/48/details/|ja rule>
E     ?          +++++++
tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_issue_alert_team_blocklog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:720: in test_issue_alert_team_block
    assert (
E   AssertionError: assert 'Alert trigge...ils/|ja rule>' == 'Alert trigge...ils/|ja rule>'
E     
E     Skipping 44 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/45/details/|ja rule>
E     + tions/baz/issues/alerts/rules/bar/45/details/|ja rule>
E     ?          +++++++
tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_issue_alert_user_blocklog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:82: in test_issue_alert_user_block
    assert (
E   AssertionError: assert 'Alert trigge...ils/|ja rule>' == 'Alert trigge...ils/|ja rule>'
E     
E     Skipping 43 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/51/details/|ja rule>
E     + tions/baz/issues/alerts/rules/bar/51/details/|ja rule>
E     ?          +++++++
tests/sentry/integrations/opsgenie/test_client.py::OpsgenieClientTest::test_send_notification_with_workflow_engine_trigger_actionslog
tests/sentry/integrations/opsgenie/test_client.py:162: in test_send_notification_with_workflow_engine_trigger_actions
    assert payload == {
E   AssertionError: assert {'alias': 'se...o world', ...} == {'alias': 'se...o world', ...}
E     
E     Omitting 6 identical items, use -vv to show
E     Differing items:
E     {'details': {'Issue URL': 'http://example.com/organizations/baz/issues/72/?referrer=opsgenie', 'Level': 'warning', 'Logger': '', 'Project ID': 'bar', ...}} != {'details': {'Issue URL': 'http://example.com/organizations/baz/issues/72/?referrer=opsgenie', 'Level': 'warning', 'Logger': '', 'Project ID': 'bar', ...}}
E     
E     Full diff:
E       {
E           'alias': 'sentry: 72',
E           'details': {
E               'Issue URL': 'http://example.com/organizations/baz/issues/72/?referrer=opsgenie',
E               'Level': 'warning',
E               'Logger': '',
E               'Project ID': 'bar',
E               'Project Name': 'Bar',
E               'Release': None,
E               'Sentry Group': 'Hello world',
E               'Sentry ID': '72',
E     -         'Triggering Rule URLs': 'http://example.com/organizations/baz/alerts/rules/bar/34/details/',
E     +         'Triggering Rule URLs': 'http://example.com/organizations/baz/issues/alerts/rules/bar/34/details/',
E     ?                                                                       +++++++
E               'Triggering Rules': 'Test Alert',
E           },
E           'entity': 'foo.bar',
E           'message': 'Hello world',
E           'priority': 'P2',
E           'source': 'Sentry',
E           'tags': [
E               'level:warning',
E           ],
E       }
tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_crons_issue_alert_user_blocklog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:173: in test_crons_issue_alert_user_block
    assert (
E   AssertionError: assert 'Alert trigge...ils/|ja rule>' == 'Alert trigge...ils/|ja rule>'
E     
E     Skipping 43 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/47/details/|ja rule>
E     + tions/baz/issues/alerts/rules/bar/47/details/|ja rule>
E     ?          +++++++
tests/sentry/integrations/slack/notifications/test_issue_alert.py::SlackIssueAlertNotificationTest::test_performance_issue_alert_user_blocklog
tests/sentry/integrations/slack/notifications/test_issue_alert.py:120: in test_performance_issue_alert_user_block
    assert (
E   AssertionError: assert 'Alert trigge...ils/|ja rule>' == 'Alert trigge...ils/|ja rule>'
E     
E     Skipping 43 identical leading characters in diff, use -v to show
E     - tions/baz/alerts/rules/bar/54/details/|ja rule>
E     + tions/baz/issues/alerts/rules/bar/54/details/|ja rule>
E     ?          +++++++

Update hardcoded expected URL paths from /alerts/rules/ to
/issues/alerts/rules/ following the notification URL change.

Co-Authored-By: Claude <noreply@anthropic.com>
@JonasBa JonasBa marked this pull request as ready for review March 12, 2026 02:55
@JonasBa JonasBa requested review from a team as code owners March 12, 2026 02:55
@JonasBa
Copy link
Member Author

JonasBa commented Mar 18, 2026

@getsentry/issue-workflow @getsentry/ecosystem @getsentry/alerts-notifications gentle nudge to take a look at this please 🙏🏼

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