Let direct-member issue alerts bypass personal alert filter

Đang mở
#129,185 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
django, python
Lĩnh vực
backend

Hướng nghiên cứu

Read src/sentry/notifications/utils/participants.py and tests/sentry/notifications/utils/test_participants.py, especially determine_eligible_recipients() and GetSendToMemberTest.test_send_to_user. Compare the issue alert flow with email_metric_alert_handler.get_targets() to understand how direct targets are handled. Done means direct-member issue alerts follow the intended personal-settings behavior while implicit recipients remain filterable, with tests covering both cases; the issue frames this as future personal notification settings work, so the policy needs clarification.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Feature

Users want to turn off issue alerts they receive implicitly (for example as a recently active member through fallthrough, or as a suggested assignee/issue owner) while still receiving issue alerts whose action explicitly notifies them as a member. Today the single "Issue Alert Notifications" setting covers both cases. Raised by Zsofia Papp after a user with the setting Off did not receive a test email from an alert configured to notify them directly.

Current behavior

  • For a "Notify Member" action, get_send_to() resolves the user in determine_eligible_recipients() and then filters them through _get_recipients_by_provider() using the user's ISSUE_ALERTS setting, the same filter applied to issue owners, suggested assignees, suspect committers, and fallthrough recipients (src/sentry/notifications/utils/participants.py).
  • GetSendToMemberTest.test_send_to_user in tests/sentry/notifications/utils/test_participants.py asserts that a direct member with email alerts set to "never" receives nothing.
  • Test notifications (OrganizationTestFireActionsEndpoint) go through the same path; they only skip digests.
  • Metric alerts behave differently: email_metric_alert_handler.get_targets() sends to a directly targeted user without checking notification settings.

History

  • Before getsentry/sentry#28624 (2021-09-21), get_send_to_member() explicitly ignored the user's settings: "If a user explicitly specifies a member as a target to send to, it should overwrite the user's personal mail settings."
  • getsentry/sentry#28624 replaced it with determine_eligible_recipients() + get_recipients_by_provider(), which filters direct members by their settings, and added the test above.
  • The settings copy promising "You'll always receive notifications from Alerts configured to be sent directly to you" was added in getsentry/sentry#27261 (2021-07-13) and became inaccurate for issue alerts after #28624.

Gap

  • Users can't opt out of noisy implicit issue alerts without also losing alerts that a teammate explicitly routed to them.
  • Issue and metric alerts treat direct-member targets inconsistently.

The settings copy is being corrected separately to match current behavior; this issue tracks revisiting the filtering granularity as part of upcoming personal notification settings work.

via Nick Meisenheimer.

--

View Junior Session [Sentry]

Ngôn ngữ chính
Python
Star
45.7k
Fork
5k
Merge trung bình
1 ngày 30 phút
Pull request đã merge (30 ngày)
600

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry

Tất cả issue của getsentry/sentry

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.