Alexey Bezhan
7df9fdf42a
Normalize outbound SMS sender number in notifications API
...
Some of the tests don't set up a service sms_sender, so we need to
check if it's None before trying to format the number.
2018-01-03 10:32:34 +00:00
Alexey Bezhan
d5b6bd85fe
Normalize outbound SMS sender number in one off notifications
2018-01-03 10:32:34 +00:00
Alexey Bezhan
545ff7dda6
Normalize outbound SMS number for job notifications
...
Replaces 0 with 44 in UK SMS sender number to make it possible to
respond to the SMS from an international number.
2018-01-03 10:32:34 +00:00
Chris Hill-Scott
577fe623b0
Merge pull request #1535 from alphagov/markdown-links-emails
...
Enable Markdown links in emails
2018-01-02 12:20:09 +00:00
Chris Hill-Scott
45c9c084e7
Enable Markdown links in emails
...
Brings in:
- [ ] https://github.com/alphagov/notifications-utils/pull/293
2018-01-02 11:22:18 +00:00
kentsanggds
f4796f39b0
Merge pull request #1510 from alphagov/collate-letter-pdfs-for-day
...
add collate-letter-pdfs task
2018-01-02 10:56:18 +00:00
Leo Hemsted
9debc96c8c
exclude non-pdfs from collate task
...
and fix celery kwargsg
2018-01-02 10:39:21 +00:00
Leo Hemsted
309b4d7d33
add collate-letter-pdfs task
...
add collate-letter-pdfs task (name pending). This retrieves a list of
letter pdf files (just the metadata, not the actual data) from s3, and
loops through them, calling the ftp task zip-and-send-letter-pdfs. It
groups them up by adding them to lists while counting the total
filesize, if it gets over a certain filesize (currently set to 500mb)
it breaks at that chunk, sends off that list of files to the ftp app,
and then starts building up a new list.
DVLA have a hard 2gb limit on how big the zip files we can send is -
however we're going to be limited by the amount of memory on the ftp
app well before we get around to handling 2gb of pdf data - so the
limit is 500mb for now. We'll adjust it after we see how ftp performs.
2018-01-02 10:39:21 +00:00
Leo Hemsted
360fa787f9
Merge pull request #1531 from alphagov/reqs-txt
...
update requirements.txt
2017-12-28 11:25:38 +00:00
Leo Hemsted
d2080d754f
update requirements.txt
2017-12-28 10:58:15 +00:00
Rebecca Law
c54e0d322b
A little clean up
2017-12-28 10:58:15 +00:00
Richard Chapman
91e8a6df9a
Merge pull request #1525 from alphagov/rc_add_sqlalchemy_config_staging
...
Add back in SQLALCHEMY config changes on staging
2017-12-22 09:14:54 +00:00
Richard Chapman
20d5a946f6
Add back in SQLALCHEMY config changes on staging
...
SQL Alchemy config changes were made to decrease the downtime of the
application. The last test only had 1 min of downtime in the upgrade
period i.e. 40 mins. Tested without the config changes to double
check the change had the desired effect. Adding back in so we can test
the changes under load and performance test outside of upgrade.
2017-12-22 08:21:53 +00:00
kentsanggds
4b90e57a66
Merge pull request #1521 from alphagov/ken-update-letters-pdf-bucket-name
...
Change live-letters-pdf to production-letters-pdf
2017-12-21 15:53:59 +00:00
Ken Tsang
3ca97f67c9
Change live-letters-pdf to production-letters-pdf
2017-12-21 14:57:37 +00:00
Richard Chapman
212476b6c7
Merge pull request #1520 from alphagov/rc_remaove_staging_sqlalchemy_config
...
Revert the SQLALCHEMY config changes on staging
2017-12-21 11:44:25 +00:00
Richard Chapman
66ae4ea9f2
Revert the SQLALCHEMY config changes on staging
...
SQL Alchemy config changes were made to decrease the downtime of the
application. The last test only had 1 min of downtime in the upgrade
period i.e. 40 mins. Reverting the changes so that the same process
can be followed to ensure the changes had the desired effect.
2017-12-21 11:31:38 +00:00
Richard Chapman
c9b3439923
Merge pull request #1514 from alphagov/rc_database_connection_settings
...
Added SQLALCHEMY settings to staging for db connections
2017-12-21 09:10:57 +00:00
Richard Chapman
018d342408
Merge branch 'master' into rc_database_connection_settings
2017-12-20 15:59:07 +00:00
Leo Hemsted
20cd2c5376
Merge pull request #1473 from alphagov/auth-err-logging
...
log auth errors from the v2 api
2017-12-20 15:02:54 +00:00
Leo Hemsted
e8967c5b05
tweak log output
2017-12-20 14:40:07 +00:00
Richard Chapman
145274b7ed
Merge branch 'rc_database_connection_settings' of https://github.com/alphagov/notifications-api into rc_database_connection_settings
2017-12-20 14:23:16 +00:00
Richard Chapman
2bc4c8ac39
Added SQLALCHEMY settings to staging for db connections
...
- Updated SQLALCHEMY_POOL_TIMEOUT timeout idle connections after 30 secs
- Updated SQLALCHEMY_POOL_RECYCLE to receyle the connection every 5 mins
2017-12-20 14:22:23 +00:00
Leo Hemsted
a0b87396ef
change token expiry err msg for clarity
2017-12-20 13:57:34 +00:00
Leo Hemsted
9297c6d430
log user agents on api call auth.
...
this'll be useful for trying to figure out which services are using what
2017-12-20 13:57:34 +00:00
Leo Hemsted
32a6f44d3a
update tests to use new response messages
...
while it doesn't strictly make sense for the error situations, these
are not typical end user errors - they're about malformed requests.
The typical use case is "api key was revoked" or similar - so that
should be the default error message
2017-12-20 13:57:34 +00:00
Leo Hemsted
687cf8526b
log service id and api key id during auth
...
example log line:
```
API AuthError: AuthError({'token': ['Invalid token: signature, api token is not valid']}, 403, service_id=3e1ed7ea-8a05-4b4e-93ec-d7bebfea6cae, api_key_id=None)"
```
2017-12-20 13:57:34 +00:00
Leo Hemsted
e0c73256a6
log auth errors from the v2 api
...
(will help with tracking down client problems)
2017-12-20 13:57:12 +00:00
Rebecca Law
5c1ab3f0c4
Merge pull request #1499 from alphagov/populate-monthly-letter-usages
...
Populate monthly letter usages
2017-12-20 11:46:06 +00:00
Richard Chapman
15b157c553
Added SQLALCHEMY settings to staging for db connections
...
- Updated SQLALCHEMY_POOL_TIMEOUT timeout idle connections after 30 secs
- Updated SQLALCHEMY_POOL_RECYCLE to receyle the connection every 5 mins
2017-12-20 11:38:47 +00:00
Rebecca Law
6fcfea7fce
Merge branch 'master' of github.com:alphagov/notifications-api into populate-monthly-letter-usages
2017-12-20 09:59:30 +00:00
Venus Bailey
67b6ac54eb
Merge pull request #1503 from alphagov/vb-remove-ip-whitelist
...
remove ip whitelist inbound sms codes
2017-12-19 17:14:02 +00:00
Rebecca Law
9051061519
Merge branch 'master' into populate-monthly-letter-usages
2017-12-19 16:55:22 +00:00
Venus Bailey
f0ea47aa05
Merge branch 'master' into vb-remove-ip-whitelist
2017-12-19 16:47:51 +00:00
Venus Bailey
10afdde847
Merge pull request #1511 from alphagov/vb-turn-on-mmg-blocking
...
Enable MMG inbound sms blocking based on bearer tokens
2017-12-19 16:04:09 +00:00
Venus Bailey
56722c104c
Merge branch 'master' into vb-remove-ip-whitelist
2017-12-19 15:33:28 +00:00
venusbb
a35b04f5e7
Enable MMG inbound blocking
2017-12-19 15:00:51 +00:00
Rebecca Law
a559338fe9
Merge branch 'master' into populate-monthly-letter-usages
2017-12-19 14:25:43 +00:00
kentsanggds
4e548b2203
Merge pull request #1507 from alphagov/ken-add-run-letter-pdfs
...
Add trigger letter pdfs for day
2017-12-19 14:20:25 +00:00
Rebecca Law
cdbf34eddb
Change order of query
2017-12-19 13:50:21 +00:00
Rebecca Law
e599db2684
Update the query
2017-12-19 13:47:24 +00:00
Rebecca Law
c5c40a0866
Merge branch 'master' into populate-monthly-letter-usages
2017-12-19 13:28:00 +00:00
Ken Tsang
8103540261
Renamed run-letter-pdfs to trigger-letter-pdfs-for-day
...
- also set optional date_to_process argument for dao_get_count_of_letters_to_process_for_date to None, so it's set in the code instead
2017-12-19 13:23:55 +00:00
Ken Tsang
b70bf1b541
Add letter tasks to manifest and queue name to config test
2017-12-19 13:23:55 +00:00
Ken Tsang
3a4b8673bc
Update upload_letters_pdf to use config setting for letter processing deadline
2017-12-19 13:23:55 +00:00
Ken Tsang
88f3c17463
Trigger collate-letter-pdfs-for-day task if notis to process
2017-12-19 13:23:55 +00:00
Ken Tsang
441651bbd1
Add get_count_of_letters_to_process to notifications_dao
...
- will get the letter notifications from day before >= letter processing deadline (17:30)
- letters_as_pdf permission is required in the service
2017-12-19 13:23:55 +00:00
Alexey Bezhan
4db698b175
Merge pull request #1500 from alphagov/notification-reply-to-text-from-template
...
Notification reply to text from template
2017-12-19 11:06:42 +00:00
Venus Bailey
6fb1e3ce96
Merge branch 'master' into vb-remove-ip-whitelist
2017-12-19 10:24:46 +00:00
Alexey Bezhan
87b56567b2
Set job notifications reply_to_text from the template.reply_to
...
When creating notification objects from the job sets the reply_to_text
from template's reply_to if it's present. Otherwise uses the service
default.
2017-12-19 10:23:24 +00:00