Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rc/only block conditonal alerts with ff #35511

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Robert-Costello
Copy link
Contributor

@Robert-Costello Robert-Costello commented Dec 11, 2024

Technical Summary

Jira ticket

The BLOCKED_DOMAIN_EMAIL_SENDERS FF was originally intended to block conditional alert emails from being sent. Later changes (linked in the ticket) resulted in all emails being blocked from domains using this FF. The flag is checked in get_valid_recipients which previously depended only on the FF and the presence of domain to determine whether to block emails. If a domain was passed in, the list of recipients returned would be empty. Those later changes made it so that a domain was always passed in, resulting in all emails, conditional alerts and system-related emails, being blocked.
This adds an additional param, is_conditional_alert, to the "send" functions that is passed along to get_valid_recipients. is_conditional_alert is set by checking EmailContent for an associated case, which should only be present for conditional alerts.

Feature Flag

BLOCKED_DOMAIN_EMAIL_SENDERS
and partially overlaps with RICH_TEXT_EMAILS

Safety Assurance

Safety story

Automated test coverage

QA Plan

no QA planned

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

Copy link

sentry-io bot commented Dec 11, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: corehq/messaging/scheduling/models/content.py

Function Unhandled Issue
send AttributeError: 'ConnectMessage' object has no attribute 'couch_id' corehq.messaging.scheduling.tasks.handle_time...
Event Count: 3
send AttributeError: 'ConnectMessage' object has no attribute 'couch_id' corehq.messaging.scheduling.tasks.handle_case_aler...
Event Count: 2

Did you find this useful? React with a 👍 or 👎

@Robert-Costello Robert-Costello requested review from a team, AddisonDunn, minhaminha and Jtang-1 and removed request for a team December 12, 2024 15:52
@Robert-Costello Robert-Costello marked this pull request as ready for review December 12, 2024 15:52
corehq/util/log.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants