-
Notifications
You must be signed in to change notification settings - Fork 18
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
Bounce rate limit notifications when a client's service is suspended. #1717
base: main
Are you sure you want to change the base?
Conversation
3c53036
to
d2af0d2
Compare
d2af0d2
to
6613cad
Compare
- Update db migrations - Add test for service resume notification - Add new draft email content
"An email may bounce if:", | ||
"", | ||
"(1) The recipient or their email provider has blocked sends from your service.", | ||
"(2) You send to an email address that does not exist." "", |
Check warning
Code scanning / CodeQL
Implicit string concatenation in a list
"type": "email", | ||
"subject": "Your bounce rate has exceeded 5%", | ||
"content_lines": [ | ||
"Hello ((name))," "", |
Check warning
Code scanning / CodeQL
Implicit string concatenation in a list
"The bounce rate has exceeded 5% for “((service_name))”. You should update your list of recipient’s email addresses." | ||
"", |
Check warning
Code scanning / CodeQL
Implicit string concatenation in a list
"To maintain our operations, we’ll suspend the service if its bounce rate reaches 10%. While the service is under suspension, it will not be able to send email or text messages." | ||
"", |
Check warning
Code scanning / CodeQL
Implicit string concatenation in a list
"content_lines": [ | ||
"Hello ((name)),", | ||
"", | ||
"“((service_name))” can send messages again. We’ve removed the suspension." "", |
Check warning
Code scanning / CodeQL
Implicit string concatenation in a list
mocker, sample_service, admin_request, bounce_rate_suspend_resume_templates | ||
): | ||
# TODO | ||
mocked = mocker.patch("app.celery.provider_tasks.deliver_email.apply_async") |
Check notice
Code scanning / CodeQL
Unused local variable
# TODO | ||
mocked = mocker.patch("app.celery.provider_tasks.deliver_email.apply_async") | ||
|
||
response = admin_request.post( |
Check notice
Code scanning / CodeQL
Unused local variable
_expected_status=204, | ||
) | ||
|
||
notification = Notification.query.first() |
Check notice
Code scanning / CodeQL
Unused local variable
) | ||
|
||
notification = Notification.query.first() | ||
service = Service.query.get(sample_service.id) |
Check notice
Code scanning / CodeQL
Unused local variable
Summary | Résumé
Plumbing and initial implementation of notifications sent to clients when their service is manually suspended. Email contents are placeholders for now. Additional work to be done once the ADR for bounce rate emails is complete and we have a more complete picture regarding warning emails when a service is approaching it's bounce rate limit, and when automatic suspension takes place.
Test instructions | Instructions pour tester la modification
With an admin account, suspend a service and note that an email is sent to the service owner informing them of the suspension
Release Instructions | Instructions pour le déploiement
Reviewer checklist | Liste de vérification du réviseur
This is a suggested checklist of questions reviewers might ask during their
review | Voici une suggestion de liste de vérification comprenant des questions
que les réviseurs pourraient poser pendant leur examen :
une baisse de la quantité de code couvert par les tests automatisés?
fonctionnalité existante?
modification de la politique de confidentialité?
préoccupations liées à la sécurité?
façon importante la performance?
risque d’utiliser des dépendances ajoutées?
setup, etc.) | Faudra-t-il mettre à jour la documentation à la suite de ce
changement (fichier README, etc.)?