Commit Graph

4406 Commits

Author SHA1 Message Date
Richard Chapman
89116d683b Merge pull request #1542 from alphagov/rc-sqlalchemy-config-updates
Moved the SQL Alchemy config from staging to all environments
2018-01-05 14:18:48 +00:00
Rebecca Law
ab96932ca0 Merge branch 'master' into rc-sqlalchemy-config-updates 2018-01-05 13:26:34 +00:00
Chris Hill-Scott
01fd43d64d Merge pull request #1541 from alphagov/pyup-update-pytest-3.3.1-to-3.3.2
Update pytest to 3.3.2
2018-01-05 12:46:49 +00:00
Richard Chapman
b90ee832a7 Moved the SQL Alchemy config from staging to all environments
During database upgrades and database fail overs there has been errors
because the database connection stays open, when a query is run the
query fails and the connection is re-established. To avoid these errors
shorter timeouts have been used to keep the connections from getting
stale.

-  SQLALCHEMY_POOL_TIMEOUT timeout idle connections after 30 secs
- Updated SQLALCHEMY_POOL_RECYCLE to recycle the connection every 5 mins

See guide on optimistic disconnect handling - using the pool recycle
as a way to manage this:
http://docs.sqlalchemy.org/en/latest/core/pooling.html#disconnect-handling-optimistic
2018-01-05 05:53:40 +00:00
pyup-bot
4ef287e8b2 Update pytest from 3.3.1 to 3.3.2 2018-01-05 00:00:16 +00:00
Rebecca Law
8ace370765 Merge pull request #1540 from alphagov/fix-reply-to
Fix the schema for reply_to and added reply_to_text.
2018-01-04 16:18:31 +00:00
Rebecca Law
0c5625fb8b Fix the schema for reply_to and added reply_to_text. 2018-01-04 15:56:58 +00:00
Rebecca Law
d9668974ae Merge pull request #1539 from alphagov/update_template_schema
Update template schema to return the contact block
2018-01-04 12:21:36 +00:00
Rebecca Law
6e6f388f88 Merge branch 'master' into update_template_schema 2018-01-04 11:45:36 +00:00
Rebecca Law
6a3831eace Added a boolean column to templates called is_letter_contact_blank.
If is_letter_contact_blank then the user has set the letter contact block to be blank on purpose
ELSE IF is_letter_contact_blank is false THEN use the template default
IF template default is blank THEN the service_letter_contact is blank use the service default
2018-01-04 11:33:10 +00:00
Katie Smith
9b18afc314 Merge pull request #1506 from alphagov/remove-delivery-receipt-callback-for-letters
Remove the delivery receipt callback for letters
2018-01-03 17:05:24 +00:00
Katie Smith
83711a9a0d Remove the delivery receipt callback for letters
This has been removed because the services only see one status.

Pivotal story: https://www.pivotaltracker.com/story/show/153674962
2018-01-03 16:41:10 +00:00
Sakis
5301a7198d Merge pull request #1532 from alphagov/clean-makefile
Clean makefile
2018-01-03 16:05:16 +00:00
Athanasios Voutsadakis
39181ba5b3 Merge branch 'master' into clean-makefile 2018-01-03 15:58:30 +00:00
Rebecca Law
33e8e55dc6 Update the tests and revert adding the service_letter_contact_id 2018-01-03 15:30:26 +00:00
Rebecca Law
8732506138 Add reply_to in the template schema 2018-01-03 15:10:16 +00:00
Athanasios Voutsadakis
48c37dcaee Merge branch 'master' into clean-makefile 2018-01-03 13:48:34 +00:00
Katie Smith
2e7f1579bb Merge pull request #1536 from alphagov/group-letters-into-max-number-of-files
Group letters into a max number of files for sending to DVLA
2018-01-03 13:27:32 +00:00
Katie Smith
440012288d Add test for max file size and file count when grouping letters 2018-01-03 11:31:22 +00:00
Katie Smith
644b110a8d Group letters into a max number of files for sending to DVLA
Grouping the letters into a maximum number of files is necessary because
the SQS task needs to be under a certain size. We also compress the task
when sending.
2018-01-03 11:31:22 +00:00
Chris Hill-Scott
609fabe206 Merge pull request #1515 from alphagov/custom-invite-urls
Allow admin to specify domain to use for invite links
2018-01-03 11:28:08 +00:00
Chris Hill-Scott
a6a44987a1 Allow admin to domain to use for invite links
When we’re doing user research we often:
- start the task by inviting the participant to a service on Notify
- have them use a prototype version of the admin app, hosted on a
  different domain

Currently we can’t do both of these things together, because the invite
emails always send people to `notifications.service.gov.uk` (because
it’s the API that sends the emails, and the prototype admin app points
at the production API).

This commit changes the API to optionally allow an instance of the admin
app to specify which domain should be used when generating invite links.
2018-01-03 10:47:16 +00:00
Alexey Bezhan
713b1eaf35 Merge pull request #1505 from alphagov/set-sms-sender-to-international-format
Set SMS sender to international format
2018-01-03 10:41:01 +00:00
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
Athanasios Voutsadakis
2470faf04b Remove unused scripts
These were referenced by appspec and have not been used since we
migrated to paas, so they can be removed.
2018-01-02 14:25:40 +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
Athanasios Voutsadakis
806e880ec2 Fix .PHONY reference 2017-12-28 18:29:31 +00:00
Athanasios Voutsadakis
e06b15aa3b Remove unused cf-build and cf-build-with-docker
We are using the non-cf versions of these commands
2017-12-28 18:28:51 +00:00
Athanasios Voutsadakis
4cc8bfb174 Remove unused DNS_NAME variable 2017-12-28 18:28:02 +00:00
Athanasios Voutsadakis
d487d57509 Remove targets related to AWS deployments
Also remove checks for unused variables
2017-12-28 18:24:36 +00:00
Athanasios Voutsadakis
2b829e1f17 Remove upload-codedeploy-artifact target 2017-12-28 18:21:39 +00:00
Athanasios Voutsadakis
a833bbf6d5 Remove build-codedeploy-artifact target
Also remove appspec files that are not used in the paas world.
2017-12-28 18:18:32 +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