Let direct-member issue alerts bypass personal alert filter

Aperta
#129,185 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
django, python
Ambito
backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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]

Lingua principale
Python
Stelle
45.7k
Fork
5k
Merge medio
1g 2h
PR unite (30g)
622

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry

Tutte le issue di getsentry/sentry

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.