Leo Hemsted
1a03248317
temp fix to sort out circular imports
2017-07-12 13:02:19 +01:00
Martyn Inglis
0e9e8955f7
Finished celery refactor - set up config for queue prefix
...
LEO notes: Also made sure the Test BROKER_URL is preserved so that
tests warn you when celery isn't mocked out
2017-07-12 12:37:18 +01:00
Martyn Inglis
786adb5d71
Move Queuenames in with the celery code, revamp config to allow move to celery 4.x
2017-07-12 12:01:52 +01:00
Martyn Inglis
e0106eb1be
hacked celery4.0.2 in. Runs and works
...
- note though this version of master I branched had split head on sqlalchemey. This needs a new master merge to fix
2017-07-12 11:58:04 +01:00
Rebecca Law
a01163d719
Merge pull request #1077 from alphagov/drop-template_stats-table
...
Remove the archived table template_statistics.
2017-07-12 10:41:32 +01:00
Leo Hemsted
19481cda02
Merge pull request #1081 from alphagov/ip-fix
...
don't store non-strings to os.environ
2017-07-11 16:10:17 +01:00
Leo Hemsted
7f883f1355
don't store non-strings to os.environ
...
in tests, we were replacing os.environ with a basic dict so that
we didn't overwrite the contents of the real environment during tests.
However, os.environ doesn't accept non-str values, so this commit
changes the fixture so that it asserts all values set are strings.
We needed to change how we store ip whitelist stuff in the env because
of this.
2017-07-11 15:41:44 +01:00
Venus Bailey
2fde4b2c80
Merge pull request #1079 from alphagov/sms_whitelist
...
retrieve sms ip whitelist from credentials on paas
2017-07-11 14:05:52 +01:00
venusbb
d3db4a6a01
Added a unit test to validate traffic from more than 3 hops
2017-07-11 09:59:41 +01:00
venusbb
5d57189187
changed name of test fixture
2017-07-11 09:50:09 +01:00
venusbb
6b650c6d96
changed name of test fixture
2017-07-11 09:33:56 +01:00
venusbb
226ae5784b
reading ip address 3rd from the back rather than the first one
2017-07-10 17:33:13 +01:00
venusbb
50d01d18c5
reading ip address 3rd from the back rather than the first one
2017-07-10 17:25:38 +01:00
venusbb
5089a4d53b
retrieve sms ip whitelist from credentials on paas
2017-07-10 17:03:43 +01:00
Imdad Ahad
c0af82ebcb
Merge pull request #1065 from alphagov/revert-1064-revert-1057-imdad-feat-stop-updating-old-noti-status
...
2/3 Stop updating old Notification status column
2017-07-10 16:39:48 +01:00
Imdad Ahad
44c5831f3d
Remove old status schema references
2017-07-10 15:50:57 +01:00
Rebecca Law
9bf1efd16a
Fix merge conflict with db migration script
2017-07-10 15:44:01 +01:00
Rebecca Law
53507314ea
Merge branch 'master' into drop-template_stats-table
2017-07-10 15:35:49 +01:00
Rebecca Law
8a01a76e33
Remove the archived table template_statistics. The last time the table we updated was August 30 2016, it's safe to say we are done with it.
...
I updated the InboundSms and TemplateRedacted model to include an index in the db.
Dropped service_permissions.updated_at column since we are not auditting the table
2017-07-10 14:43:46 +01:00
Imdad Ahad
a9c1338873
Remove Notification, NotificationHistory status labels:
...
Replace labels by adding a key kwarg in the model for status.
We still need this as sqlalchemy attmempts to look for `notification_status`
on the model (Notification/NotificationHistory). To achieve true ORM mapping
(map status -> notification_status) we need the key kwarg.
More here:
http://docs.sqlalchemy.org/en/latest/core/metadata.html#sqlalchemy.schema.Column#key
2017-07-10 14:09:30 +01:00
Imdad Ahad
c8c47f44a9
Don't update older status in timeout notifications task
2017-07-10 14:09:30 +01:00
Imdad Ahad
ac9eb29707
Revert "Revert "1/4 Stop updating old Notification status column""
2017-07-10 14:09:30 +01:00
Imdad Ahad
4b2388acaa
Merge pull request #1076 from alphagov/imdad-migration-make-old-notification-status-nullable
...
1/3 Make Notification._status_enum and NotificationHistory._status_enum nullable
2017-07-10 13:47:31 +01:00
Imdad Ahad
ae388a3cfc
Make Noti and NotiHis status column nullable:
...
This is in preparation for deprecating this old column
2017-07-10 12:09:02 +01:00
Rebecca Law
2aba819cb6
Merge pull request #1072 from alphagov/update-utils
...
Update the notifications-utils version.
2017-07-10 11:23:36 +01:00
Rebecca Law
50dbfec383
Merge pull request #1059 from alphagov/update-purge_function
...
Refactor order of delete statements
2017-07-07 15:32:29 +01:00
Rebecca Law
f77c062d86
Update the notifications-utils version.
2017-07-07 15:22:02 +01:00
Chris Hill-Scott
ce96d59cf4
Add OPG to letter organisations
...
Logo was added here:
https://github.com/alphagov/notifications-template-preview/pull/19
2017-07-06 12:31:02 +01:00
Ken Tsang
8b04039a5a
Refactor to abstract inbound_sms perms check
2017-07-06 12:31:02 +01:00
Ken Tsang
3372fe6b18
Refactored test
2017-07-06 12:31:01 +01:00
Ken Tsang
5efe4d59ec
Improved test to include check on log
2017-07-06 12:31:01 +01:00
Ken Tsang
f028dab252
Removed firetext params
2017-07-06 12:31:01 +01:00
Ken Tsang
e96a67c59b
Firetext tests
2017-07-06 12:31:01 +01:00
Ken Tsang
5a82fe0a70
Add inbound sms permission check
2017-07-06 12:31:01 +01:00
venusbb
b1a7ed46eb
syntax changes
2017-07-06 12:31:01 +01:00
venusbb
1d8d6b1ef1
Add list of IP address that X-Forwarded-For return to add more visibility to the traffic
2017-07-06 12:31:00 +01:00
venusbb
39a8e1cfed
IP address in config file uses comma rather than full stops
2017-07-06 12:30:54 +01:00
Imdad Ahad
6ce93e0cf4
Add len(results)
2017-07-06 12:30:09 +01:00
Imdad Ahad
ea9fc2f81f
Use max in select
2017-07-06 12:30:09 +01:00
Imdad Ahad
12800f7cbf
Add a script to correct out-of-sync notifications
2017-07-06 12:30:09 +01:00
venusbb
a307fa6dcd
Check ip unit test and modify ways to parse IP address
2017-07-06 12:30:09 +01:00
venusbb
c182ceca90
Check ip unit test and modify ways to parse IP address
2017-07-06 12:30:08 +01:00
venusbb
2ff9204a61
modified the parsing of return ip address
2017-07-06 12:30:08 +01:00
venusbb
0c8e5394a1
modified the parsing of return ip address
2017-07-06 12:30:08 +01:00
Imdad Ahad
f0ffbad77d
Fix syncing issue with Notification statuses:
...
The timeout_notifications job runs daily and does not correctly
update both the status fields to keep them in sync.
2017-07-06 12:30:08 +01:00
Imdad Ahad
b94a463911
Revert "1/4 Stop updating old Notification status column"
2017-07-06 12:30:08 +01:00
Imdad Ahad
c7ea6ba116
Update tests to use set() otherwise is possible to fail
2017-07-06 12:30:07 +01:00
Imdad Ahad
28b17b7716
Cleanup/remove unncessary tests
2017-07-06 12:30:07 +01:00
Imdad Ahad
cd36d7b77c
Stop updating old column and return new column for .status
2017-07-06 12:30:07 +01:00
Leo Hemsted
38bb4ad6c2
notification.personalisation now always returns an empty dict
...
There are a variety of ways a notification can be created - via the
API, via CSV, via one-off messages, via the same but sent as a test -
the point is, there are lots of entry points, and lots of inconsistency
about how personalisation may be sent in. If there are no
personalisation options in the template, we may get either `None` or
`{}` - if the value is None, to avoid an error in our encryption lib,
we just store None in the database.
THIS ENDS NOW!
We've had some problems on the front-end that is caused by
notifications having the `None` value. This commit changes the
personalisation property getter and setter to store/return `{}`
rather than None.
2017-07-06 12:30:07 +01:00