Commit Graph

842 Commits

Author SHA1 Message Date
Rebecca Law
d0da4e1ef2 Merge branch 'master' into email-failures 2016-05-17 15:41:00 +01:00
Rebecca Law
281a93b32d Update ses callback to interpret hard and soft bounces.
If the notification has a status == sending then update the status otherwise do not update the status.
In other words do not change the status more than once.
2016-05-17 15:38:49 +01:00
Adam Shimali
d5c4af957c Merge pull request #320 from alphagov/fix-reply-to
Was incorrectly setting from not reply to
2016-05-17 14:50:08 +01:00
Adam Shimali
e1685d6a45 Was incorrectly setting from not reply to 2016-05-17 14:31:33 +01:00
Chris Hill-Scott
9a195dbac2 Merge pull request #319 from alphagov/utils-bump
Bump utils version
2016-05-17 14:03:04 +01:00
Rebecca Law
4762aef1aa Merge pull request #318 from alphagov/tech-failures
New notification status types
2016-05-17 13:50:57 +01:00
Chris Hill-Scott
0cd01f831c Bump utils version
Includes:

- https://github.com/alphagov/notifications-utils/pull/33
  Ensure email header is full width
- https://github.com/alphagov/notifications-utils/pull/32
  Handle CSV files with blank column headers
2016-05-17 13:24:08 +01:00
Adam Shimali
f432ca33c5 Merge pull request #317 from alphagov/send-using-reply-to
Send using reply to
2016-05-17 13:06:52 +01:00
Rebecca Law
191a79f27b Add new failure status for notifications. 2016-05-17 13:06:08 +01:00
Adam Shimali
3812dac3fe Missing mock 2016-05-17 12:49:37 +01:00
Adam Shimali
642fb6f68b Process job for email uses reply to if present 2016-05-17 12:41:13 +01:00
Rebecca Law
8be3997bcf Merge branch 'master' into tech-failures 2016-05-17 12:05:48 +01:00
Rebecca Law
49db4e81d5 Add new notification status types for technical_failure, temporary_failure, permanent_failure 2016-05-17 11:46:28 +01:00
Adam Shimali
91c92ad524 Merge pull request #316 from alphagov/save-reply-to
[WIP] save reply to email address on service
2016-05-17 11:40:32 +01:00
Adam Shimali
682ea55d9e [WIP] save reply to email address on service 2016-05-17 10:56:02 +01:00
Rebecca Law
74df271739 Merge pull request #313 from alphagov/fix-missing-created_by_id
There is a problem where columns on the templates table were not set.
2016-05-16 17:51:50 +01:00
Rebecca Law
992f9d78f9 There is a problem where columns on the templates table were not set.
It is also discovered that columns that have a default value and use the version mixin must set the value when creating the db object before the insert otherwise the history table will be missing the default value.
Updated the templates_history.created_by_id with a value where missing, using the current version of the template for this value.
Update templates_history.archived to false. This is okay as we do not yet have a way to set this value to true.
Removed the versions attribute from the TemplateSchema, there is not a need for this column.
2016-05-16 16:16:14 +01:00
minglis
3c751d94a4 Merge pull request #309 from alphagov/statsd-integration
Statsd integration
2016-05-16 12:29:14 +01:00
Rebecca Law
5a38aa5819 Merge pull request #310 from alphagov/add-template-version
Add template version for jobs and notifications
2016-05-16 12:20:46 +01:00
Martyn Inglis
503ae80ece Dev config does not send statsd 2016-05-16 12:05:26 +01:00
Martyn Inglis
785def9117 Timed the tasks - how long to process a task / a sms-send / a email-send 2016-05-16 11:55:00 +01:00
Rebecca Law
a346eb2b19 Add a update query to fix templates_history where the created_by_id is missing. 2016-05-16 09:55:11 +01:00
Martyn Inglis
a60e11a1b6 Fixed test bug due to pluralisation typo 2016-05-13 17:25:34 +01:00
Martyn Inglis
a520dcef47 Fixed some more pep8 2016-05-13 17:22:03 +01:00
Martyn Inglis
829d862739 Fixed pep8 issues and hostname in the test environment. 2016-05-13 17:20:29 +01:00
Martyn Inglis
3f7559b286 Added statsd integration into the API
- new client for statsd, follows conventions used elsewhere for configuration
- client wraps underlying library so we can use a config property to send/not send statsd

Added statsd metrics for:
- count of API successful calls SMS/Email
- count of successful task execution for SMS/Email
- count of errors from Client libraries
- timing of API calls to third party clients
- timing of how long messages live on the SQS queue
2016-05-13 17:15:39 +01:00
Rebecca Law
894ec80e0e fix db migration to use the right previous version 2016-05-13 16:44:06 +01:00
Rebecca Law
faff5fff55 Merge branch 'master' into add-template-version 2016-05-13 16:32:57 +01:00
Rebecca Law
917110870d Use the template version at the time the notification is created or at the time the job is created.
Update notifications/sms|email endpoint to send the template version to the queue.
Update the process_job celery talk to send the template version to the queue.
When the send_sms|send_email task runs it will get the template by id and version.

Created a data migration script to add the template_vesion column for jobs and notifications.
The existing jobs and notifications are given the template_version of the current template.
There is a chance this is the wrong template version, but deemed okay since the application is not live.

Create unit test for the dao_get_template_versions method.
Rename /template/<id>/version to /template/<id>/versions which returns all versions for that template id and service id.
2016-05-13 16:25:05 +01:00
minglis
3c8e45093c Merge pull request #305 from alphagov/record-request-time
Log start of request so requests can be timed
2016-05-13 08:59:50 +01:00
Martyn Inglis
b12918d3ea Merge branch 'master' into record-request-time
Conflicts:
	requirements.txt
2016-05-12 16:39:20 +01:00
Martyn Inglis
9fb3569291 bumped request version 2016-05-12 16:37:01 +01:00
Chris Hill-Scott
3cf2e12d95 Merge pull request #302 from alphagov/govuk-email-footer
Make email template more GOV.UK-y
2016-05-12 16:34:23 +01:00
Martyn Inglis
19d65772c7 Log start of request so requests can be timed 2016-05-12 13:56:27 +01:00
minglis
d302b6f234 Merge pull request #304 from alphagov/loadtest-provider-3
Load testing client added
2016-05-12 11:00:08 +01:00
Martyn Inglis
06bfe81329 Load testing client added 2016-05-12 10:46:35 +01:00
Rebecca Law
c8c0f95dd2 Merge branch 'master' into add-template-version
Conflicts:
	tests/app/dao/test_notification_dao.py
2016-05-12 09:49:35 +01:00
Rebecca Law
cc9fcb42d9 Migration script to add template version to jobs and notifications. 2016-05-12 09:22:35 +01:00
Rebecca Law
f223da04df [WIP] Fix for dao test 2016-05-12 09:20:49 +01:00
Chris Hill-Scott
b2f15314cd Make email template more GOV.UK-y
Implements https://github.com/alphagov/notifications-utils/pull/30
2016-05-12 09:03:52 +01:00
Rebecca Law
f72f5aba05 [WIP]
Start to add template_version to jobs and notification
2016-05-11 17:04:51 +01:00
minglis
52c627c6f1 Merge pull request #295 from alphagov/primary-provider
Primary provider
2016-05-11 16:37:56 +01:00
Martyn Inglis
b22c52131d Fixing up a couple of pull request comments
- python style if
- renamed the relationships
2016-05-11 15:36:17 +01:00
Martyn Inglis
668f311a1a Merge branch 'primary-provider' of github.com:alphagov/notifications-api into primary-provider 2016-05-11 15:26:21 +01:00
Martyn Inglis
5c0dae9586 Added twilio into rebuilding the provider enum 2016-05-11 15:25:45 +01:00
Rebecca Law
5858861bb2 Remove constraints from downgrade so that it will work. 2016-05-11 14:15:53 +01:00
Martyn Inglis
09b3313ce3 Merge branch 'master' into primary-provider
Conflicts:
	tests/app/dao/test_provider_rates_dao.py
2016-05-11 14:04:15 +01:00
Martyn Inglis
42c42bfdc9 Added tests to ensure pick correct provider from the database in the celery tasks. 2016-05-11 14:03:12 +01:00
Martyn Inglis
6493e4db9c Made the downgrades work 2016-05-11 12:56:28 +01:00
Adam Shimali
ba874cfd43 Only trigger dependent build for master, staging and live 2016-05-11 12:39:39 +01:00