Commit Graph

2185 Commits

Author SHA1 Message Date
Chris Hill-Scott
e507fed152 Quietly ignore extra personalisation
> If a user makes an API request with additional personalisation fields,
> we should simply discard any fields that the template doesn't have.
>
> This gives a couple of related advantages:
>
> - modifying template parameters no longer requires downtime for
>   clients - as they can pass in extra new parameters before a template
>   change, or continue passing in old unused parameters after removing
>   them from a template
>
> - services can pass in large user objects, for example, and then play
>   around with templates adding and removing fields at will
>
> we should make sure we still return an error if a user doesn't pass in
> a required parameter.

– https://www.pivotaltracker.com/story/show/140774195
2017-03-07 16:09:17 +00:00
bandesz
b0d5def289 Increase memory for PaaS 2017-03-06 14:48:27 +00:00
Andras Ferencz-Szabo
b89923c525 Merge pull request #850 from alphagov/paas_redis_config
Get Redis config from PaaS
2017-03-03 12:41:50 +00:00
bandesz
271b664a7e Log SNS subscription URL 2017-03-03 12:17:53 +00:00
bandesz
e8bf03c7e1 Get Redis config from PaaS 2017-03-03 11:35:51 +00:00
Leo Hemsted
b10d7ecb92 Merge pull request #849 from alphagov/reply-to-address
add letter_contact_block text field to service
2017-03-03 10:51:06 +00:00
Leo Hemsted
f5511a19a2 add letter_contact_block text field to service 2017-03-02 16:42:06 +00:00
Rebecca Law
1e2432ac06 Merge pull request #848 from alphagov/add-dvla-provider
Added the provider details for DVLA.
2017-03-02 12:21:54 +00:00
Rebecca Law
6386cb968a Fix tests.
Fix copy/paste error in the history table
2017-03-02 12:12:01 +00:00
Rebecca Law
a63b30aba9 Merge pull request #847 from alphagov/remove-unused-code-lines
Query enhancement
2017-03-02 11:44:53 +00:00
Rebecca Law
beb7fda32b Added the provider details for DVLA.
The rates are a bogus number.
2017-03-02 11:42:37 +00:00
Rebecca Law
d36eec652d Removed unused code in services_dao, which led to looking some of the queries.
By removing the join to services for the fetch_stats_by_date_range_for_all_services and dao_fetch_todays_stats_for_all_services
queries we get a 30% and 25% performance improvement.
2017-03-01 17:12:29 +00:00
bandesz
652f76eaf6 Increase default memory to 512M for delivery PaaS workers 2017-02-28 18:54:57 +00:00
bandesz
a079897bd1 Ignore docker pull errors 2017-02-28 18:27:04 +00:00
bandesz
b453dd59d0 Add termination timeout to run_app_paas.sh 2017-02-28 17:39:04 +00:00
Rebecca Law
70a239b023 Merge pull request #846 from alphagov/fix-failed-login-count
Fix failed login count
2017-02-28 16:24:46 +00:00
Rebecca Law
fd0bfbe2f6 If user account is locked return 404 even if the code is correct.
Update user.failed_login_count = 0 if code is correct.
New endpoint to reset the failed_login_count
2017-02-28 14:28:33 +00:00
bandesz
3a8e4499dc Fix __pycache__ exclude 2017-02-28 13:18:25 +00:00
bandesz
1e83f7d8e2 Remove Docker commands for CF, clean up artifact creation 2017-02-28 12:32:01 +00:00
Rebecca Law
fb61b4528b Remove resetting the failed_login_count to zero in the api. The admin app will deal with doing that. 2017-02-28 11:21:47 +00:00
Andras Ferencz-Szabo
98ec147aae Merge pull request #845 from alphagov/remove_jenkinsfiles
Remove Jenkinsfiles, add PaaS build/upload artifact tasks
2017-02-28 10:57:40 +00:00
bandesz
34f1eff84d Remove Jenkinsfiles, add PaaS build/upload artifact tasks 2017-02-28 10:47:11 +00:00
Chris Hill-Scott
f947679881 Merge pull request #843 from alphagov/quis-patch-1
Add Coveralls badge
2017-02-27 16:41:25 +00:00
imdadahad
f4be099533 Merge pull request #824 from alphagov/feat-switch-providers-on-slow-delivery
Auto-switch providers on slow delivery of notifications
2017-02-27 16:25:15 +00:00
Imdad Ahad
d7e4ca2a43 Remove created notification - not needed for test 2017-02-27 15:01:44 +00:00
Imdad Ahad
ed65150f3b Update set primary sms helper to use compulsory identifier 2017-02-27 13:45:53 +00:00
Imdad Ahad
d805985a4e Refactor tests to use cleaner fixture and be more verbose in tests 2017-02-27 13:18:42 +00:00
Imdad Ahad
17b6c13c46 Small updates:
* Make config use new provider sms template id
* create_notification to account for created status
* Small robustness addition to test
2017-02-27 13:16:48 +00:00
Andras Ferencz-Szabo
53b4ea836f Merge pull request #844 from alphagov/cf-deploy
Add Jenkinsfile for separate deployment
2017-02-27 11:30:36 +00:00
bandesz
9d704d505c Add Jenkinsfile for separate deployment 2017-02-27 10:19:56 +00:00
Chris Hill-Scott
0791c87b1e Add Coveralls badge
We should be proud 😎

[![Coverage Status](https://coveralls.io/repos/alphagov/notifications-api/badge.svg?branch=master&service=github)](https://coveralls.io/github/alphagov/notifications-api?branch=master)
2017-02-24 16:56:01 +00:00
Leo Hemsted
da63cf38b7 Merge pull request #842 from alphagov/verify-email-shouldnt-login
dont set session_id or logged_in_at if user provides email code
2017-02-24 16:41:33 +00:00
Leo Hemsted
8bad5926ab dont set session_id or logged_in_at if user provides email code 2017-02-24 15:14:47 +00:00
Leo Hemsted
3d8a58deab Merge pull request #837 from alphagov/session-id
Add current_session_id to the user model, update on login
2017-02-24 13:50:46 +00:00
Leo Hemsted
2cc7a684e2 Merge pull request #840 from alphagov/xpass
make xpass fail the test run
2017-02-24 13:50:31 +00:00
Imdad Ahad
204d72830f Update switch task to use sent_at and newer db helpers 2017-02-24 13:41:32 +00:00
Imdad Ahad
eafe8269ef Simplify dao method and update tests and fixtures 2017-02-24 13:39:58 +00:00
Imdad Ahad
ec65575f50 Set provider switch task to run on prod according to functional tests service 2017-02-24 12:23:39 +00:00
Imdad Ahad
73d5ce4f8b Add tests to verify correctness of the switching provider task 2017-02-24 12:23:39 +00:00
Imdad Ahad
d058626119 Add task to run every minute that will switch provider on slow delivery notifications 2017-02-24 12:23:39 +00:00
Imdad Ahad
60f63a30db Add dao method to get count of slow delivery notifications by provider 2017-02-24 12:23:39 +00:00
imdadahad
374272de9a Merge pull request #839 from alphagov/revert-831-feat-install-all-wheels-offline
Revert "Ensure all wheels are installed offline from the wheelhouse directory"
2017-02-23 17:44:37 +00:00
imdadahad
2548deaae2 Merge pull request #841 from alphagov/fix-update-boto3
Update boto3
2017-02-23 17:31:35 +00:00
Imdad Ahad
9ab6d4c68b Update boto3 2017-02-23 17:21:15 +00:00
Leo Hemsted
b296bcaf34 make xpass fail the test run 2017-02-23 16:50:04 +00:00
imdadahad
4ac6043701 Revert "Ensure all wheels are installed offline from the wheelhouse directory" 2017-02-23 16:43:09 +00:00
imdadahad
1254008e2e Merge pull request #831 from alphagov/feat-install-all-wheels-offline
Ensure all wheels are installed offline from the wheelhouse directory
2017-02-23 15:58:12 +00:00
Andras Ferencz-Szabo
d30d0ede1e Merge pull request #838 from alphagov/fix_api_host_name
Remove explicit api_host_name vars from the envs
2017-02-23 11:34:21 +00:00
bandesz
e3cb908c1a Remove explicit api_host_name vars from the envs 2017-02-23 11:22:58 +00:00
Leo Hemsted
a47672f7e3 Add current_session_id to the user model, update on login
when we change the last logged in time, set the current session id to
a random uuid

this way, we can compare it to the cookie a user has, and if they
differ then we can log them out

also update user.logged_in_at at 2FA rather than password check, since
that feels more accurate
2017-02-22 17:30:55 +00:00