Commit Graph

78 Commits

Author SHA1 Message Date
Kenneth Kehl
e7183da117 code review feedback 2024-05-13 07:35:14 -07:00
Kenneth Kehl
bbd1fed737 fix flake8 2024-05-09 07:46:38 -07:00
Kenneth Kehl
51c90878a2 remove unnecessary debug stmts 2024-05-09 07:21:46 -07:00
Kenneth Kehl
252a5debbe change debug statement from info to debug 2024-05-09 07:20:28 -07:00
Carlo Costino
bf0f002e4f Remove debug lines in CSV processing
This changeset removes a couple of debug lines that we had in place from when we switched to processing CSVs for looking at phone numbers.  This has now been proven out, and the additional log entries make it difficult to troubleshoot other issues that may arise.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-03-15 14:26:18 -04:00
Kenneth Kehl
b777249b6f merge from main 2024-03-01 13:50:09 -08:00
Kenneth Kehl
f301c7a389 If a telephone number is unavailable, change text to 'Unavailable' 2024-02-23 11:07:13 -08:00
Kenneth Kehl
0010a431a6 merge from main again 2024-02-06 12:31:32 -08:00
Kenneth Kehl
3e6ea3aa2c merge from main 2024-02-02 10:44:29 -08:00
Kenneth Kehl
65bc37d203 fix fstring 2024-02-02 10:29:01 -08:00
Kenneth Kehl
82dd29d457 handle bom in phone number field 2024-02-01 12:01:29 -08:00
Kenneth Kehl
a028be238b notify-api-784 remove simulated numbers 2024-02-01 10:48:59 -08:00
Kenneth Kehl
31ff6a11ee merge from main 2024-02-01 08:06:10 -08:00
Kenneth Kehl
ab71ccde68 fix fstrings 2024-01-31 08:53:54 -08:00
Kenneth Kehl
aecff08d7a remove cache hit/miss writes to log 2024-01-31 08:20:12 -08:00
Kenneth Kehl
fa2b18d5b7 fix logic 2024-01-31 08:10:48 -08:00
Kenneth Kehl
277262ed69 handle error 2024-01-31 08:06:09 -08:00
Kenneth Kehl
363ecb33d5 add debug 2024-01-31 07:25:11 -08:00
Kenneth Kehl
c97be34b3b optimize personalisation lookup 2024-01-23 10:41:34 -08:00
Kenneth Kehl
0c15a65f40 remove print statement 2024-01-22 12:13:16 -08:00
Kenneth Kehl
4024c8f905 merge from main 2024-01-22 10:55:26 -08:00
Kenneth Kehl
a100f60369 code review feedback 2024-01-19 09:02:44 -08:00
Kenneth Kehl
ed3a356ad1 merge from main and fix some tests 2024-01-19 08:58:24 -08:00
Kenneth Kehl
510e67e20b code review feedback 2024-01-18 15:12:52 -08:00
Kenneth Kehl
797c9f5fc8 remove print statement 2024-01-18 14:06:32 -08:00
Kenneth Kehl
f9120e7d3e optimize how we look up phone numbers 2024-01-18 13:54:23 -08:00
Kenneth Kehl
7997d887c6 fix case sensitivity looking up phone number 2024-01-18 10:53:20 -08:00
Kenneth Kehl
4b98106037 debug 2024-01-18 10:16:14 -08:00
Kenneth Kehl
567dd390b4 fix personalisation 2024-01-18 10:03:35 -08:00
Kenneth Kehl
59e8c493e5 add stats for cache hits/misses and remove debug message 2024-01-12 07:30:19 -08:00
Kenneth Kehl
726e0b15fa code review feedback 2024-01-08 14:31:28 -08:00
Kenneth Kehl
a5f78224b2 remove print statements 2024-01-05 10:39:07 -08:00
Kenneth Kehl
88379c9e46 final 2024-01-05 10:35:14 -08:00
Kenneth Kehl
46b236ca35 initial 2023-11-09 08:46:53 -08:00
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Carlo Costino
6c14a12b0f Fix use of botocore Config object
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2023-08-11 16:24:46 -04:00
Carlo Costino
d4848a67b5 Switch to using FIPS-enabled endpoints
This changeset switches AWS service touchpoints to use their FIPS-enabled counterparts.  Note that S3 has some specific configuration associated with it.

This changeset also updates our allow ACLs to cover the FIPS-enabled endpoints.  We should investigate removing the non-FIPS endpoints as a part of this.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2023-08-11 16:24:45 -04:00
Kenneth Kehl
6f6061455c notify-162 delete incomplete s3 uploads (#276)
Co-authored-by: Kenneth Kehl <@kkehl@flexion.us>
2023-05-23 11:31:30 -04:00
Ryan Ahearn
e07b596857 Remove contact list db, dao, and s3 code 2023-04-12 15:01:24 -04:00
Ryan Ahearn
22aa7e2787 Remove default creds from s3 module 2023-03-03 16:01:12 -05:00
Ryan Ahearn
41a52daca0 Clean up bucket settings 2022-10-31 15:37:12 -04:00
stvnrlly
e9fdfd59f4 clean flake8 except provider code 2022-10-19 16:16:26 +00:00
Ryan Ahearn
538d2cbe4c Proactively specify aws region for s3 operations 2022-09-26 10:56:59 -04:00
Ryan Ahearn
8ede076708 Use correct access credentials for each bucket 2022-09-22 12:14:25 -04:00
Ben Thorner
ff7eebc90a Simplify deleting old letters
Previously we made a call to S3 to list objects for a letter, even
though we already had the precise key of the single object to hand.
This removes the one usage of "get_s3_bucket_objects" and uses the
filename directly in the call to remove the object.
2021-03-15 17:18:20 +00:00
Ben Thorner
a91fde2fda Run auto-correct on app/ and tests/ 2021-03-12 11:45:45 +00:00
Katie Smith
62b11bc61e Delete delete_dvla_response_files_older_than_seven_days task
This was not being used.
2020-04-02 14:49:47 +01:00
Chris Hill-Scott
4a6143aeb1 Remove the list from S3 once we don’t need it
Once a contact list is gone from the database there’s no way to
reference it again. Any jobs have made their own copy.

So we can clean it up, meaning we’re not storing personal data longer
than we need to.
2020-03-26 17:42:38 +00:00
David McDonald
dc9bf757a8 Change which letters we want to be sent to look at all days
Previously, when running the `collate_letter_pdfs_for_day` task, we
would only send letters that were created between 5:30pm yesterday and
5:30 today.

Now we send letters that were created before 5:30pm today and that are
still waiting to be sent. This will help us automatically attempt to
send letters that may have fallen through the gaps and not been sent the
previous day when they should have been.

Previously we solved the problem of letters that had fallen the gap by
having to run the task with a date parameter for example
`collate_letter_pdfs_for_day('2020-02-18'). We no longer need this date
parameter as we will always look back across previous days too for
letters that still need sending.

Note, we have to change from using the pagination `list_objects_v2` to
instead getting each individual notification from s3. We reduce load by
using `HEAD` rather than `GET` but this will still greatly increase the
number of API calls. We acknowledge there will be a small cost to this,
say 50p for 5000 letters and think this is tolerable. Boto3 also handles
retries itself so if when making one of the many HEAD requests, there is
a networking blip then it should be retried automatically for us.
2020-02-21 15:01:19 +00:00
David McDonald
7a0dca61da Remove unused argument 2020-02-21 15:01:19 +00:00