Commit Graph

454 Commits

Author SHA1 Message Date
Kenneth Kehl
6dc9828663 fix tests 2024-01-22 10:55:09 -08:00
Kenneth Kehl
ed3a356ad1 merge from main and fix some tests 2024-01-19 08:58:24 -08:00
Kenneth Kehl
567dd390b4 fix personalisation 2024-01-18 10:03:35 -08:00
Kenneth Kehl
f9f1013f5b notify-api-742 don't write phone numbers to db 2024-01-16 11:21:24 -08:00
Kenneth Kehl
d710cdefd6 notify-api-634 2023-11-28 12:30:53 -08:00
Kenneth Kehl
9c841320ca fix tests 2023-11-03 08:28:21 -07:00
Kenneth Kehl
7d2dc776b9 merge from main 2023-11-03 07:10:06 -07:00
Andrew Shumway
948bb17a6c Removed history count from total count 2023-11-02 16:21:02 -04:00
Andrew Shumway
32dca0f5e0 Add notification history and notification to count 2023-11-02 16:21:02 -04:00
Andrew Shumway
db7aa969cd Added api endpoint for count 2023-11-02 16:21:00 -04:00
Andrew Shumway
c247891c97 Add initial steps to call api for count 2023-11-02 16:18:02 -04:00
Andrew Shumway
a346a734fc Removed/replaced retention redis count with notification count from db call 2023-11-02 16:16:08 -04:00
Kenneth Kehl
6d84ec64e5 notify-api-522 2023-10-24 11:35:00 -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
00fd3a72bb code review feedback, fix setup.cfg and reformat 2023-08-25 08:10:33 -07:00
Kenneth Kehl
026dc14021 notify-api-412 use black to enforce python style standards 2023-08-23 10:35:43 -07:00
Kenneth Kehl
2075d2821b try using vanilla sql for problematic query 2023-06-28 06:59:28 -07:00
Kenneth Kehl
6474e0ffa8 code review feedback 2023-06-27 14:45:48 -07:00
Kenneth Kehl
7105cf6ed8 try without weird SQLAlchemy flag 2023-06-27 14:39:17 -07:00
Kenneth Kehl
d7ad65ef89 remove autocommit and clean up some bad debug statements 2023-06-27 13:06:38 -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
a46bd94650 code review feedback 2023-06-19 07:55:48 -07:00
Kenneth Kehl
1abe645b48 more 2023-06-16 07:38:48 -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
651af48742 fix all inline statuses except delivered 2023-06-14 07:50:04 -07:00
Kenneth Kehl
e7196afde1 fix the inline display for Failed on the dashboard 2023-06-14 07:37:38 -07:00
Kenneth Kehl
008c3a8d68 initial 2023-06-13 12:57:51 -07:00
Kenneth Kehl
39707adf10 Merge branch 'main' of https://github.com/GSA/notifications-api into notify-260 2023-05-30 11:47:36 -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
359ac9d967 merge from main 2023-05-10 09:58:03 -07:00
Kenneth Kehl
08c1ad75c8 notify-260 remove server-side timezone handling 2023-05-10 08:39:50 -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
Steven Reilly
ff4190a8eb Remove letters-related code (#175)
This deletes a big ol' chunk of code related to letters. It's not everything—there are still a few things that might be tied to sms/email—but it's the the heart of letters function. SMS and email function should be untouched by this.

Areas affected:

- Things obviously about letters
- PDF tasks, used for precompiling letters
- Virus scanning, used for those PDFs
- FTP, used to send letters to the printer
- Postage stuff
2023-03-02 20:20:31 -05:00
Ryan Ahearn
041cd08097 Clean up more mmg and firetext references 2022-12-22 09:31:12 -05:00
Ryan Ahearn
45c3e3c277 Remove unused is_delivery_slow_for_providers method 2022-11-30 13:50:49 -05:00
stvnrlly
9e7ee1c0f8 migrate bst_date to local_date 2022-11-21 11:49:59 -05:00
stvnrlly
213f699c99 time adjustments in tests 2022-11-14 14:23:54 -05:00
stvnrlly
b50cb4712f tz utility swap and many test updates 2022-11-10 12:33:25 -05:00
stvnrlly
e9fdfd59f4 clean flake8 except provider code 2022-10-19 16:16:26 +00:00
jimmoffet
f1aec54665 clean up comments and method dupes 2022-09-15 15:48:37 -07:00
jimmoffet
b0f819dbd9 canada UK ses callbacks monster mash 2022-09-15 14:59:13 -07:00
Christa Hartsock
64b30feb08 Remove pytest from non-test file 2022-07-07 16:22:21 -07:00
Christa Hartsock
af6495cd4c Get tests passing locally
When we cloned the repository and started making modifications, we
didn't initially keep tests in step. This commit tries to get us to a
clean test run by skipping tests that are failing and removing some
that we no longer expect to use (MMG, Firetext), with the intention that
we will come back in future and update or remove them as appropriate.

To find all tests skipped, search for `@pytest.mark.skip(reason="Needs
updating for TTS:`. There will be a brief description of the work that
needs to be done to get them passing, if known. Delete that line to make
them run in a standard test run (`make test`).
2022-07-07 15:41:15 -07:00
Jim Moffet
aa4ec532a4 implement SNS 2022-06-17 11:16:23 -07:00
Ben Thorner
ed379a3724 Fix out-of-date rows in ft_notification_status
This can happen in the following scenario (primarily for letters):

1. A service has a mixture of "delivered" and "sending" letters,
which the status task aggregates into two rows:

  sending | 123
  delivered | 456

2. After the 7 day retention has passed, only the "delivered" letters
will be archived [^1].

3. The status task now looks at the history table [^2], which means
it only sees the "delivered" letters.

4. The "sending" letters are eventually "delivered" and archived (before
the 10 day aggregation cutoff).

5. But the status aggregation task doesn't run.

This commit fixes (5).

[^1]: https://github.com/alphagov/notifications-api/pull/3063
[^2]: f87ebb094d/app/dao/fact_notification_status_dao.py (L51)
2022-05-11 11:04:56 +01:00
Ben Thorner
7bffe9ee50 Log Service ID when we get a duplicate receipt
This will make it easier to group these logs if a service complains
about the issue.
2022-03-21 15:43:08 +00:00
Ben Thorner
966c4db8c6 Fix getting service IDs for status aggregation
Addresses [1].

Previously the query would always use UTC midnight, even after we
had switched to BST (+1h). We store timestamps as naive UTC in our
DB - without a timezone - but we want the query to work in terms
of GMT / BST so we adjust for that - BST midnight is 11PM in UTC.

[1]: https://github.com/alphagov/notifications-api/pull/3437#discussion_r791998690
2022-02-10 10:51:45 +00:00
Ben Thorner
7f4b140f97 Rename function to make it consistent
This is consistent with the new "on_date" function. It was going
off the edge of my screen before in some parts of the code.
2022-02-09 17:39:08 +00:00