Commit Graph

6148 Commits

Author SHA1 Message Date
Leo Hemsted
329fa9ba0d Merge pull request #2421 from alphagov/inbound-retention
make inbound sms page respect data retention
2019-03-28 14:28:54 +00:00
Leo Hemsted
493da7ef88 add test for inbound sms older than a week 2019-03-28 14:00:10 +00:00
Leo Hemsted
97110e293b make inbound sms page respect data retention
also, it should default to last 7 days, not last 6 days. also change
count_inbound_sms to have the days passed in, so that it's more
explicit at the endpoint that we only return 7 days regardless of your
service's data retention
2019-03-27 17:47:26 +00:00
Rebecca Law
b764eae738 Merge pull request #2420 from alphagov/change-pyup-to-create-weekly-updates
Add pyup configuration so that we only get one PR per week.
2019-03-27 15:26:47 +00:00
Rebecca Law
818ffe11b9 Merge pull request #2419 from alphagov/split-task
Split task for updating letters
2019-03-27 15:26:34 +00:00
Rebecca Law
b75b3e21f9 Add pyup configuration so that we only get one PR per week. 2019-03-27 14:58:13 +00:00
Rebecca Law
cb94f949a1 New command to iterate through the files on S3 and call record_daily_sorted_counts.
There are many files from early on that have not had the sorted counts recorded.
2019-03-26 15:49:21 +00:00
Chris Hill-Scott
a469bfd892 Merge pull request #2418 from alphagov/retry-migration-283
Retry making services created by platform admin users not counted in the list of live services
2019-03-26 13:32:25 +00:00
Chris Hill-Scott
6c20e510e8 Merge pull request #2416 from alphagov/pyup-update-pytest-mock-1.10.1-to-1.10.2
Update pytest-mock to 1.10.2
2019-03-26 09:37:37 +00:00
Chris Hill-Scott
b26c835818 Merge pull request #2406 from alphagov/pyup-update-coveralls-1.6.0-to-1.7.0
Update coveralls to 1.7.0
2019-03-26 09:37:30 +00:00
Chris Hill-Scott
853314efe9 Retry making services created by platform admin users not counted in the list of live services
The previous migration didn’t work because the `created_by_id` column
in services references the user who created the _version_ of the
service, not who created the service originally.

This commit runs another migration to wipe all the data, and replace it
using an operation that looks at the first version of the service in the
history table, which will reference the user who actually created the
service.
2019-03-25 17:31:52 +00:00
Chris Hill-Scott
133db85bc1 Merge pull request #2417 from alphagov/add-count-as-live-flag
Allow excluding services from live services count
2019-03-25 15:45:33 +00:00
Rebecca Law
4105f6638e Split the update letter statuses from counting the daily sorted/unsorted numbers.
We need to back fill the daily_sorted_count tables, so we need to iterate through all the files. No need to update the notification status. So this task has been separated out.
2019-03-25 15:30:48 +00:00
Chris Hill-Scott
1f12da3d04 Migrate existing platform admin services to not be counted
If a service has been created by someone on our team, it’s probably a
test service, which shouldn’t be included in the count of live services.

This commit adds a migration to do this for existing services.
2019-03-25 13:30:54 +00:00
Chris Hill-Scott
eb41ce7304 Make service created by platform admin non-counted
If a service has been created by someone on our team, it’s probably a
test service, which shouldn’t be included in the count of live services.
2019-03-25 13:30:13 +00:00
Chris Hill-Scott
b3008ee210 Allow excluding services from live services count
Sometimes we have to make a few services for what really is one
service, for example GOV.UK Pay and GOV.UK Pay Direct Debit. We also
have our own test services which aren’t included in the count of live
services. We currently count these as one service by not including them
in the beta partners spreadsheet.

This adds a column to mark such services as ‘not counted’, which can
later be used to exclude them from reporting.
2019-03-25 13:28:31 +00:00
pyup-bot
528275546a Update pytest-mock from 1.10.1 to 1.10.2 2019-03-25 12:28:14 +00:00
Chris Hill-Scott
0927a2e731 Merge branch 'master' into pyup-update-coveralls-1.6.0-to-1.7.0 2019-03-25 11:27:36 +00:00
Chris Hill-Scott
34bcb806ff Merge pull request #2415 from alphagov/fix-branding-association
Fix automatic inheritance of org’s branding
2019-03-22 16:07:21 +00:00
Chris Hill-Scott
6dff916e95 Merge pull request #2407 from alphagov/return-domains-for-org
Return an organisation’s domains and fix a bug where the domains were getting wiped when updating other attributes
2019-03-22 16:07:15 +00:00
Chris Hill-Scott
ef515400f3 Fix automatic inheritance of org’s branding
When creating a service it should inherit it’s organisation’s branding,
if that organisation has branding.

This wasn’t working because we were referring to the ID of the branding
when making the association, not the branding itself.
2019-03-22 15:57:20 +00:00
Katie Smith
9866a38133 Merge pull request #2409 from alphagov/update-dependencies
Update dependencies
2019-03-22 15:00:10 +00:00
Katie Smith
e15884f633 Merge pull request #2413 from alphagov/make-invited-users-folder-permissions-non-nullable
Make invited_users folder_permissions column non-nullable
2019-03-22 15:00:01 +00:00
Leo Hemsted
b4deedd8a9 Merge pull request #2414 from alphagov/unsorted-case
ignore case in the cost_threshold in dvla response files
2019-03-22 14:12:46 +00:00
Leo Hemsted
9da9968028 downgrade error to info 2019-03-22 14:06:45 +00:00
Katie Smith
9b739aaa1c Upgrade flask-marshmallow from 0.9.0 to 0.10.0 2019-03-22 13:43:36 +00:00
Katie Smith
60be63133c Upgrade marshmallow from 2.18.1 to 2.19.1 2019-03-22 13:43:36 +00:00
Katie Smith
5d03b92993 Upgrade marshmallow-sqlalchemy from 0.16.0 to 0.16.1 2019-03-22 13:43:36 +00:00
Katie Smith
05ab6ceeef Upgrade jsonschema from 3.0.0b3 to 3.0.1
Running `make freeze-requirements` causes Werkzeug to be updated from
0.14.1 to 0.15.1, which means that we need to change the message of 1
test.
2019-03-22 13:43:26 +00:00
Leo Hemsted
6fa7f0290d ignore case in the cost_threshold in dvla response files
we failed when we received UNSORTED instead of Unsorted
2019-03-22 12:07:08 +00:00
Katie Smith
8f5b5d636e Make invited_users folder_permissions column non-nullable
Now that notifications-admin is always sending through
folder_permissions, the folder_permissions column of the invited_user
table can be made non-nullable. The migration also backfills the column
(to []) to account for existing null values.
2019-03-22 10:49:45 +00:00
Katie Smith
8eb3e6d4b1 Merge pull request #2398 from alphagov/add-folder-permissions-to-invited-users
Add folder permissions to invited users
2019-03-22 10:48:07 +00:00
Katie Smith
dc5f1035ed Merge pull request #2411 from alphagov/pyup-update-pytest-xdist-1.26.1-to-1.27.0
Update pytest-xdist to 1.27.0
2019-03-22 10:47:35 +00:00
Katie Smith
2aa14bc41c Set folder permissions when adding a user to a service
This sets the folder permissions for a user when adding them to a
service. If a user is being added to a service after accepting an
invite, we need to account for the possibility that the folders we are
trying to add them to have been deleted before they accepted the invite.
2019-03-22 09:30:39 +00:00
Katie Smith
b0d3bd9046 Update add_user_to_service endoint to only handle new data format
Updated the add_user_to_service endpoint to only handle data in the
'new' format (`{"permissions": [...]}` instead of `[permission_1, permission_2]`)
since Admin has been updated to send data the new way.

This change means that we no longer need the Marshmallow Permission
schema, so it can be deleted.
2019-03-22 09:30:39 +00:00
Katie Smith
31ddd36e2c Update invited user tests to take folder_permissions into account 2019-03-22 09:30:39 +00:00
Katie Smith
3e70407981 Migration to add folder_permissions to invited_users table
Added a new JSONB column, folder_permissions, to the invited_users table
to store a list of folders that an invited user can see. This is
nullable for now, but will be changed to be non-nullable and
back-populated later.
2019-03-22 09:30:39 +00:00
Leo Hemsted
ba49b84677 Merge pull request #2412 from alphagov/hash-filename
add a hash of letter filenames to the dvla zip file name
2019-03-21 15:49:59 +00:00
Leo Hemsted
b288031adb add a hash of letter filenames to the dvla zip file name
if we partially retry a day, we would create new zip files, containing
different letters (if some were processed succesfully). We need these
files to have different filenames to earlier zip files so that we can
avoid overwriting log data in zips_sent.

Hashing the filename means that we'll only overwrite if it was the same
file containing the same content.
2019-03-21 15:40:24 +00:00
pyup-bot
365abd9a98 Update pytest-xdist from 1.26.1 to 1.27.0 2019-03-21 13:26:54 +00:00
Leo Hemsted
31d4bfed84 Merge pull request #2405 from alphagov/dvla-filename
pass upload filename to notify-ftp
2019-03-21 11:45:37 +00:00
Chris Hill-Scott
b3976c360a Add test for updating default branding 2019-03-20 14:14:19 +00:00
Chris Hill-Scott
9783ab56b7 Don’t wipe domains when updating other attributes
The domains for an organisation should only be updated (or wiped) if a
new list is explicitly passed in by the admin app.
2019-03-20 12:21:25 +00:00
Leo Hemsted
334eb473ed separate batch num from date
DVLA don't care about the naming conventions of zip files, other than
it must start with `NOTIFY.` and end with `.ZIP`. So lets format the
date in a more readable way, and separate it from the batch number
2019-03-20 12:15:25 +00:00
Chris Hill-Scott
28ea75728c Return domains in get organisation response
We need this so we can disply them in the admin app.
2019-03-20 11:56:17 +00:00
pyup-bot
99781c1a19 Update coveralls from 1.6.0 to 1.7.0 2019-03-20 03:25:08 +00:00
Pea (Malgorzata Tyczynska)
a46e7d62f2 Merge pull request #2404 from alphagov/test-managing-multiple-folder-users-simultaneously
Test update_template_folder can manage multiple users at once
2019-03-19 14:11:41 +00:00
Leo Hemsted
1a4baf4283 pass upload filename to notify-ftp
previously ftp would name the files itself by giving them a timestamp
when uploading. we ran into issues with tasks being picked up multiple
times and as such, uploading duplicate files. By naming the file before
creating the task, we can avoid this issue.

Files are now named `NOTIFY.YYYYMMDD######.ZIP` where the number is a
counter that increments with each task we've issued in that run of
collate-letter-pdfs-for-day
2019-03-19 13:48:17 +00:00
Pea Tyczynska
09731c109e Test update_template_folder can manage multiple users at once 2019-03-19 11:48:37 +00:00
Pea (Malgorzata Tyczynska)
7b8a478b7a Merge pull request #2401 from alphagov/update-folder-viewing-permissions
Update folder viewing permissions when updating a folder
2019-03-19 10:59:58 +00:00