Commit Graph

113 Commits

Author SHA1 Message Date
Kenneth Kehl
f4ba3cd7bf fix get_job_from_s3 2025-09-30 12:19:47 -07:00
Kenneth Kehl
0d874828e4 fix total message limit so it works 2025-01-23 13:28:26 -08:00
Kenneth Kehl
7529ae0153 more 2024-12-13 15:04:18 -08:00
Kenneth Kehl
f706086bbf cleanup 2024-12-13 09:48:48 -08:00
Kenneth Kehl
26e53a80ba avoid message is none scenario 2024-12-13 08:43:23 -08:00
Kenneth Kehl
5ce31c78fd start writing message ids to the notifications table 2024-12-13 07:30:41 -08:00
Carlo Costino
a15d81ea14 Revert "12/11/2024 Production Deployment API hotfixes" 2024-12-12 09:11:59 -05:00
Kenneth Kehl
50aeb0ab0f try to bypass static scan false positive 2024-12-10 08:53:38 -08:00
Kenneth Kehl
06725af417 try to bypass static scan false positive 2024-12-10 08:49:07 -08:00
Kenneth Kehl
dc8660191c change retry schedule 2024-12-10 08:04:55 -08:00
Kenneth Kehl
665de72059 add expire times for redis objects 2024-12-04 07:37:59 -08:00
Kenneth Kehl
639d2e2335 fix broken go live email notification 2024-11-27 08:50:12 -08:00
Kenneth Kehl
12776354e3 fix broken go live email notification 2024-11-27 08:36:52 -08:00
Kenneth Kehl
64a85868a3 code review feedback and merge from main 2024-09-11 09:39:18 -07:00
Kenneth Kehl
3ac2db4379 more flake 8 2024-08-15 11:24:24 -07:00
Kenneth Kehl
c0ab7c8a68 more exc_info 2024-08-15 11:07:36 -07:00
Kenneth Kehl
bf587aaf2f set delivery receipt delay to 30 seconds (from 120 seconds) 2024-07-23 09:21:40 -07:00
Kenneth Kehl
56c87e9611 handling throttling exception 2024-07-19 07:48:55 -07:00
Kenneth Kehl
905df17f65 remove datetime.utcnow() 2024-05-23 13:59:51 -07:00
Andrew Shumway
d3b895ddc6 PEP-257 changes 2024-03-27 10:32:40 -06:00
Andrew Shumway
6599c284cc Add docs/code comments for message-send-flow 2024-03-18 11:45:40 -06:00
Andrew Shumway
5f2508a975 Add docs/code comments for message send flow 2024-03-18 11:32:29 -06:00
Kenneth Kehl
492daee970 fix personalisation for emails 2024-03-06 10:28:34 -08:00
Cliff Hill
bd705ed188 More cleanup.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:34 -05:00
Cliff Hill
9523cc1d97 Cleaning up with black, isort, flake8.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:33 -05:00
Cliff Hill
69a9accfca Getting NotificationStatus implemented everywhere.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-02-28 12:43:32 -05:00
Kenneth Kehl
6d84ec64e5 notify-api-522 2023-10-24 11:35:00 -07:00
Kenneth Kehl
2487aeb657 remove debugging 2023-10-02 14:13:25 -07:00
Kenneth Kehl
bd09c63ea9 notify-api-521 fix sms temporary failure message 2023-10-02 14:09:50 -07:00
Kenneth Kehl
8af7a5552f notify-api-520 persist the provider response even for successful sms messages 2023-09-29 13:39:10 -07:00
Kenneth Kehl
bebce829af instructions for bulk testing and change delivery receipt delay to 2 minutes 2023-09-28 14:27:16 -07:00
Kenneth Kehl
62f83ffe1e revamp how authentication code is displayed as per Steven 2023-08-30 09:29:08 -07:00
Kenneth Kehl
4df9fa934d Tweak signin so you don't need a phone to login in dev mode 2023-08-30 07:41:04 -07:00
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Kenneth Kehl
29a280ced4 notify-api-390 2023-08-29 13:12:18 -07:00
Kenneth Kehl
17e9fc1e8f notify-api-317 fix the scrubbing of pii for successful notifications 2023-06-27 10:48:14 -07:00
Kenneth Kehl
e4a98dfcc2 cleanup, get rid of print statements, etc. 2023-06-15 10:45:03 -07:00
Kenneth Kehl
8db16f9410 fix tests 2023-06-15 08:23:00 -07:00
Kenneth Kehl
008c3a8d68 initial 2023-06-13 12:57:51 -07:00
Kenneth Kehl
633532b639 code review feedback 2023-05-26 13:47:05 -07:00
Kenneth Kehl
8f5f9f8f59 Merge branch 'main' of https://github.com/GSA/notifications-api into notify-233b 2023-05-26 13:13:13 -07:00
Kenneth Kehl
1e72f97b17 code review feedback 2023-05-09 08:45:51 -07:00
Kenneth Kehl
b59e4df06d code review feedback 2023-05-05 08:09:15 -07:00
Kenneth Kehl
3fb113a83e notify-152 sms delivery receipts 2023-05-04 07:56:24 -07:00
Kenneth Kehl
6e3d3f325d notify-233: delete notifications from notifications table after they are successfully sent 2023-04-18 12:42:23 -07:00
Ben Thorner
3988a6cd07 Include exception info in SMS warning log
This makes it easier to debug failures when adding a new provider.
2022-03-30 13:36:56 +01:00
Ben Thorner
e3e067c795 Remove redundant @statsd timing decorators
These are superseded by timing task execution generically in the
NotifyTask superclass [1]. Note that we need to wait until we've
gathered enough data under the new metrics before removing these.

[1]: https://github.com/alphagov/notifications-api/pull/3201#pullrequestreview-633549376
2021-04-12 15:19:18 +01:00
Ben Thorner
a91fde2fda Run auto-correct on app/ and tests/ 2021-03-12 11:45:45 +00:00
David McDonald
ac6837cde5 Downgrade exception to warning for provider API call
When we send an HTTP request to our SMS providers, there is a
chance we get a 5xx status code back from them. Currently we log this as
two different exception level logs.

If a provider has a funny few minutes, we could end up with
hundreds of exceptions thrown and pagerduty waking someone up in the
middle of the night. These problems tend to pretty quickly fix
themselves as we balance traffic from one SMS to the other SMS provider
within 5 minutes.

By downgrading both exceptions to warning in the case of a
`SmsClientResponseException`, we will reduce the change of waking us up
in the middle of the night for no reason.

If the error is not a `SmsClientResponseException`, then we will still
log at the exception level as before as this is more unexpected and we
may want to be alerted sooner.

What we still want to happen though is that let's say both SMS providers
went down at the same time for 1 hour. We don't want our tasks to just
sit there, retrying every 5 minutes for the whole time without us being
aware (so we can at least raise a statuspage update). Luckily we will
still be alerted because our smoke tests will fail after 10 minutes and
raise a p1:
https://github.com/alphagov/notifications-functional-tests/blob/master/tests/functional/staging_and_prod/notify_api/test_notify_api_sms.py#L21
2021-01-18 17:00:21 +00:00
David McDonald
977554781f Add better logging message for tech failure
So we can easily identify which notification ID failed
2020-12-30 17:28:21 +00:00