Commit Graph

3797 Commits

Author SHA1 Message Date
Rebecca Law
b1b231ba90 Merge branch 'master' into sms_sender_id-for-post-notfications 2017-10-30 15:20:39 +00:00
Rebecca Law
db6668eb61 Added the notification_to_sms_sender mapping table to the purge notifications query 2017-10-30 15:17:01 +00:00
Rebecca Law
0887910b1b Get the sms sender from the notificaiton_sms_sender mapping table if that does not exist get the default sms sender to pass on to the sms provider. 2017-10-30 14:55:44 +00:00
Richard Chapman
50f6cddc5a Merge pull request #1353 from alphagov/add-task-for-ses-results-queue
Retry in only certain scenarios
2017-10-30 14:02:44 +00:00
Richard Chapman
d85a71758c Retry in only certain scenarios
Instead of retrying if there are genuine errors, only retry if there are
errors which are unexpected as otherwise the retries will happen and
fail for the same reason e.g. that the message has changed format and
will require a code update.

- Updated process_ses_results to only retry if there in an unknown
exception
- Update test and assert that there is a retry there is a unknown
exception
2017-10-30 13:43:23 +00:00
Rebecca Law
4eec11b633 Added an optional parameter in the form for POST /v2/notifications/sms and /service/<service_id>/send-notification to pass in the SMS sender id.
The send_sms_to_provider still needs to use the SMS sender being passed in to the POST.

As part of https://www.pivotaltracker.com/story/show/152106587
2017-10-30 13:36:49 +00:00
Venus Bailey
dd4554fad2 Merge pull request #1342 from alphagov/vb-free-sms-limit-history
Free sms limit by service and year
2017-10-30 10:14:21 +00:00
venusbb
b648c2e632 Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-free-sms-limit-history 2017-10-30 09:34:23 +00:00
Rebecca Law
f66b7f0a5d Merge pull request #1350 from alphagov/update-page-counts-for-letters
Update page count when processing response file for letters
2017-10-27 16:21:28 +01:00
Rebecca Law
ca10c72fe6 Fix typo 2017-10-27 16:00:07 +01:00
kentsanggds
ab66296b3c Merge pull request #1349 from alphagov/ken-add-service-email-reply-to
Add notification email reply_to script
2017-10-27 15:39:24 +01:00
Ken Tsang
8a4c8802ef Add notification email reply_to script 2017-10-27 15:11:35 +01:00
Leo Hemsted
830b26313e Merge pull request #1346 from alphagov/email-auth
add new email_auth service permission
2017-10-27 14:51:34 +01:00
Leo Hemsted
46f5896b3b add new email_auth service permission 2017-10-27 14:28:20 +01:00
Rebecca Law
76c8b15f59 Update the billable units with the page count from the response file for letter notifications. 2017-10-27 13:53:55 +01:00
venusbb
6f02ee516c Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-free-sms-limit-history 2017-10-27 10:47:20 +01:00
Rebecca Law
43843eb5d1 Merge pull request #1344 from alphagov/notification_to_sms_sender
Create a new table to map a notification to a SMS sender.
2017-10-27 09:51:27 +01:00
venusbb
c991df3209 Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-free-sms-limit-history 2017-10-26 20:47:18 +01:00
venusbb
eca93a5a24 added a new end point current-year and tests 2017-10-26 17:21:35 +01:00
Rebecca Law
b048b2c3bf DB update script for new table 2017-10-26 16:40:38 +01:00
Rebecca Law
c9909a4216 Merge pull request #1343 from alphagov/improve-get-services
Improve get services
2017-10-26 15:28:56 +01:00
Rebecca Law
4f65ca5447 Create a new table to map a notification to a SMS sender.
There is also some minor db model updates here so that the python db model match the db
2017-10-26 15:25:38 +01:00
venusbb
8dd86d433e Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-free-sms-limit-history 2017-10-26 15:02:41 +01:00
Richard Chapman
91b721da4b Merge pull request #1340 from alphagov/add-task-for-ses-results-queue
Add task for SES results queue
2017-10-26 13:40:07 +01:00
venusbb
c10cde6b22 modified serialized method and schema 2017-10-26 13:25:11 +01:00
Richard Chapman
14cbdb28a5 Deleted Local Test Files
Deleted files which are not required and were duplicated from the main
test files.
2017-10-26 12:44:03 +01:00
Richard Chapman
e55bf470f3 Merge branch 'add-task-for-ses-results-queue' of https://github.com/alphagov/notifications-api into add-task-for-ses-results-queue 2017-10-26 12:25:31 +01:00
Richard Chapman
d6cff97b7b Review Changes
- Updated the retry and max_retries of the process_ses_results celery
task to be the same as other retry strategies in that file
- Provided a message with the 200 to be similar to how other responses
are handled
2017-10-26 12:23:19 +01:00
Richard Chapman
c2f2d39d22 Retry process_ses_results if it fails
If the SES task fails retry every 5 mins for an hour.

- Updated the process_ses_results task to retry
- Added tests to check for retry
2017-10-26 12:23:19 +01:00
Richard Chapman
0494ef3ea7 Removed the HTTP error and arguments from notification_ses_callback.py
In preparation for moving the SNS notification to an SES queue remove
the HTTP errors codes and arguments as the method will now be run by
a celery task. Also made the callback http method return more generic
codes as this will be removed in the longer term.

- Removed errors and arguments returned from process_ses_response
- Updated tests
2017-10-26 12:23:19 +01:00
Athanasios Voutsadakis
46144708cb Fix tests 2017-10-26 12:22:15 +01:00
Athanasios Voutsadakis
dada25beb1 Update tests 2017-10-26 12:18:39 +01:00
Athanasios Voutsadakis
f10893d383 Allow for both an endpoint callback and SQS consumption 2017-10-26 12:17:35 +01:00
Rebecca Law
1998034b52 Refactored the get_detailed_services to stop using marshmallow.
Also removed an extra query to services.
The query has been refactored to use an outer join to services on the notifications or notification_history table.
The expectation is that this change will improve the performance of the trial/live-services pages for platform admins.
2017-10-26 12:15:52 +01:00
Athanasios Voutsadakis
3443dcea53 Temporary test fix
This should be removed when the SES endpoint is removed
2017-10-26 12:14:33 +01:00
Athanasios Voutsadakis
263131f6ba Fix tests 2017-10-26 12:14:33 +01:00
Athanasios Voutsadakis
644b31ba75 Update tests 2017-10-26 12:14:33 +01:00
Athanasios Voutsadakis
892eaede13 We no longer have guaranteed access to a request context 2017-10-26 12:14:33 +01:00
Athanasios Voutsadakis
865cb6656e Allow for both an endpoint callback and SQS consumption 2017-10-26 12:14:33 +01:00
Richard Chapman
9293a949ea Merge branch 'master' of https://github.com/alphagov/notifications-api 2017-10-26 12:11:48 +01:00
Richard Chapman
9c9581e808 Review Changes
- Updated the retry and max_retries of the process_ses_results celery
task to be the same as other retry strategies in that file
- Provided a message with the 200 to be similar to how other responses
are handled
2017-10-26 12:09:14 +01:00
venusbb
e88b311c8e Merge branch 'master' of https://github.com/alphagov/notifications-api into vb-free-sms-limit-history 2017-10-26 11:56:14 +01:00
venusbb
9aa7489655 incorporate reviewers comments 2017-10-26 11:49:56 +01:00
kentsanggds
d39bf96324 Merge pull request #1333 from alphagov/ken-handle-dvla-response-file
Handle DVLA response file
2017-10-26 11:09:09 +01:00
Rebecca Law
61a68a2d13 [WIP] 2017-10-25 16:47:39 +01:00
Rebecca Law
4304aad9fc Merge branch 'master' into improve-get-services 2017-10-25 16:11:35 +01:00
Ken Tsang
204f170de2 Use NOTIFICATION_TECHNICAL_FAILURE not NOTIFICATION_FAILED 2017-10-25 15:39:54 +01:00
Ken Tsang
b40cab0c5d Refactored models to make const consistent 2017-10-25 15:38:58 +01:00
Rebecca Law
515a69e8d9 Merge pull request #1339 from alphagov/pyup-update-psycopg2-2.7.3.1-to-2.7.3.2
Update psycopg2 to 2.7.3.2
2017-10-25 15:23:45 +01:00
Rebecca Law
fbc0b69685 Merge pull request #1336 from alphagov/pyup-update-marshmallow-sqlalchemy-0.13.1-to-0.13.2
Update marshmallow-sqlalchemy to 0.13.2
2017-10-25 15:22:31 +01:00