cds-snc / notification-planning

Project planning for GC Notify Team
5 stars 0 forks source link

Too many "service is near its daily limit for text fragments." emails sent #1264

Closed sastels closed 3 months ago

sastels commented 1 year ago

Describe the bug

IF user goes goes over the "warning" level on their fragments they get repeated emails about it (presumably one per sms after they're over the warning limit)

Bug Severity

See examples in the documentation

SEV-3 Minor - notifications are still being sent, but users will lose confidence in us

To Reproduce

Steps to reproduce the behavior:

  1. Set your daily fragment limit to a hundred or so
  2. Send lots of sms (tested through api, probably through admin would be fine)
  3. At some point you'll start to get multiple warning emails

Expected behavior

Just get one warning email.

Impact

Users lose confidence in us.

andrewleith commented 1 year ago

There is a check and a redis key stored to prevent multiple sends, so there must be an edge case we are missing. See https://github.com/cds-snc/notification-api/blob/main/app/notifications/validators.py#L128

yaelberger-commits commented 11 months ago

First step to validate if this bug still exists.

yaelberger-commits commented 4 months ago

Hey team! Please add your planning poker estimate with Zenhub @andrewleith @jzbahrai @whabanks

whabanks commented 4 months ago

Tested both locally and on production and it looks like this is no longer an issue.

1) Set my limit to 100 2) Sent bulk SMS in increments of 10 using a template with > 1 fragment (this shouldn't matter anymore since we did away with fragment counting) 3) At 90 messages sent, started sending 1 at a time 4) Received one warning email at around 95 messages sent 5) Sent up to my limit + 1 6) Received "You've reached your limit" email but no other warnings