Commit Graph

12518 Commits

Author SHA1 Message Date
karlchillmaid
fdc121d529 Bump date 2022-04-27 08:38:51 +01:00
karlchillmaid
ae2644b81c Update roadmap content 2022-04-26 16:20:29 +01:00
karlchillmaid
fa40c70267 Update dates 2022-04-26 12:21:40 +01:00
karlchillmaid
c63660d56d Merge pull request #4217 from alphagov/may-2022-price-changes
Announce May 2022 text message price increase
2022-04-22 15:20:56 +01:00
karlchillmaid
e1ff1bc4b2 Update date 2022-04-22 14:57:37 +01:00
Leo Hemsted
19d501e2aa Merge pull request #4214 from alphagov/0-free-allowance
Hide remaining free allowance if it starts at 0
2022-04-22 13:32:16 +01:00
Leo Hemsted
46658de009 Merge pull request #4219 from alphagov/enable-redis
remove redis_enabled flag
2022-04-22 13:04:43 +01:00
Leo Hemsted
3bda2aa36c remove redis_enabled flag
there's no reason we need to configure this per environment. You can
still use it as before for local development
2022-04-22 12:21:27 +01:00
Sakis
77a96b3e5f Merge pull request #4218 from alphagov/custom-prometheus-preparation
Use our own fork of gds_metrics_python and add shared auth token
2022-04-21 13:57:24 +01:00
sakisv
76b9e28d4d Use our own fork of gds_metrics_python and add shared auth token
This will allow both prometheis (the shared one and our own) to scrape
the /metrics endpoint, each with their own authentication

See alphagov/gds_metrics_python#1 for more details
2022-04-21 15:32:57 +03:00
Leo Hemsted
cc5af6fabb Merge pull request #4213 from alphagov/enable-redis
bind to notify-redis automatically
2022-04-20 11:52:51 +01:00
Ben Thorner
4a3ba97115 Remove redundant conditional for CF Redis
This is now used in all environments and we've removed support for
non-CF Redis [1].

[1]: https://github.com/alphagov/notifications-admin/pull/4213
2022-04-20 11:32:57 +01:00
Leo Hemsted
d4a58c706b bind to notify-redis automatically
this ensures that if we create a new version of the app, it'll connect
to redis properly (for example a UR prototype)
2022-04-20 11:32:28 +01:00
karlchillmaid
518ef0b272 Add announcement of text message price change 2022-04-20 11:30:22 +01:00
Chris Hill-Scott
d11beee5b6 Hide remaining free allowance if it starts at 0
If your free allowance starts a 0 (which we have done for some services
this year) it’s redundant to say ‘0 of 0 remaining’.
2022-04-20 10:53:05 +01:00
Ben Thorner
d636bd9ae0 Merge pull request #4211 from alphagov/remove-redundant-cf-code
Remove redundant CloudFoundry config code
2022-04-20 09:56:15 +01:00
Ben Thorner
be1fc9de79 Remove redundant CloudFoundry config code
These env vars can be set directly in the manifest, like we do for
Template Preview [^1].

[^1]: c08036189b/manifest.yml.j2 (L23-L26)
2022-04-13 14:45:29 +01:00
Ben Thorner
5f84ea938c Merge pull request #4210 from alphagov/paas-redis-migration-181796569
Prepare to switch to Redis on PaaS
2022-04-13 11:53:30 +01:00
Sakis
4b6b7efc6a Merge pull request #4208 from alphagov/add-internal-routes
Add internal routes
2022-04-13 08:54:15 +01:00
Ben Thorner
43a2f2f271 Fix rediss ssl eventlet sslerror bug
This is the same as [^1].

I did a test deploy to double check that Redis on PaaS doesn't work
without this.

[^1]: a2cbe20325
2022-04-12 17:46:51 +01:00
Ben Thorner
339ca93d9b Add support for migrating to Redis on PaaS
Similarly to https://github.com/alphagov/notifications-api/pull/3508
2022-04-12 17:46:45 +01:00
Leo Hemsted
1bed87b67d Merge pull request #4206 from alphagov/daily-sms-vols-reports
add new daily sms provider volumes report
2022-04-12 15:48:36 +01:00
Ben Thorner
ffd8bdac6c Merge pull request #4209 from alphagov/bump-utils-55-1-4
Bump utils to 55.1.4
2022-04-12 15:42:58 +01:00
Ben Thorner
9be800c263 Bump utils to 55.1.4
This required bumping the minimum version of boto3 with:

    pip-compile -P awscli requirements.in

I haven't looked into the awscli/boto3/botocore changes due to the
high churn on those libraries. Given they're minor changes we can
assume they are benign. s3transfer changes are also benign [^1]

[^1]: https://github.com/boto/s3transfer/blob/develop/CHANGELOG.rst
2022-04-12 14:14:42 +01:00
Sakis
4b33e1e090 Add internal routes
These will be used by prometheus to scrape the `/metrics` endpoint.
2022-04-12 13:12:36 +03:00
Leo Hemsted
971101d07c clean up test_platform_admin string concatenation
make it consistent - always use a + to concatenate strings, always have
that + at the end of the line.

(also remove a rogue "when" from some test names)
2022-04-11 14:55:58 +01:00
Ben Thorner
ce6329c191 Merge pull request #4205 from alphagov/admin-3-providers-181681739
Fix provider UI to cope with 1 or 3+ SMS providers
2022-04-11 14:53:36 +01:00
Leo Hemsted
c2472e55aa clean up info tables to not over-use safe markdown filter
the safe filter is quite dangerous - it allows HTML to be rendered as
passed through (the default action is to escape all html), so should
only be used with trusted input. Move it so we only apply it to fields
we specifically expect to have HTML in - in this case, some tables
contain links to other pages.

Also, clean up the variable names for some of these info tables, as they
didn't really make sense.
2022-04-11 14:40:32 +01:00
Leo Hemsted
ebc005005b refactor: DRY up billing api client test
at the same time add the new daily_sms_provider_volumes_report func to
the tests.
2022-04-11 14:40:32 +01:00
Leo Hemsted
b3f5bb6435 add new daily sms provider volumes report
nearly identical to the daily-volumes-report but sms only, and split up
by provider
2022-04-11 14:40:31 +01:00
Ben Thorner
355a74d202 Make SMS provider inputs easier to interpret
In response to: [^1].

[^1]: https://github.com/alphagov/notifications-admin/pull/4205#discussion_r847204574
2022-04-11 14:02:04 +01:00
Ben Thorner
9132004ea3 DRY-up creating provider fixtures 2022-04-07 14:05:10 +01:00
Ben Thorner
05c396434d Use fixtures for SMS provider test data
This avoids the need to manually copy psuedo fixture data to avoid
breaking other tests.
2022-04-07 14:05:09 +01:00
Ben Thorner
6d77ff54b1 Standardise provider psuedo fixture data
Previously it was hard to distinguish ids from identifiers from
display names (in the case of the email fixtures).

Using predictable attributes will also make it easier to convert
this dictionaries to proper fixtures.
2022-04-07 14:05:08 +01:00
Ben Thorner
efea27d433 Don't show priority for inactive providers
This is consistent with not being able to set it either. I think
it's OK to not have a test for this as it's purely cosmetic.
2022-04-07 14:05:07 +01:00
Ben Thorner
0437e4a248 Standardise appearance of missing data
This makes the rendering the same as for "created_by_name" when the
data isn't present. It's a bit more complicated for "updated_at" so
I checked that it's implicitly covered by the tests, which fail if I
remove the "if" conditional for any of these fields.
2022-04-07 14:05:06 +01:00
Ben Thorner
7f52e8dedf Add missing test for editing inactive providers 2022-04-07 14:05:05 +01:00
Ben Thorner
264bf8302f Remove redundant sorting when editing SMS ratios
This is irrelevant since we no longer pick a "first" provider.
2022-04-07 14:05:04 +01:00
Ben Thorner
dd0022968c Remove redundant constraint on multiple providers
We can now handle a single provider (with a priority of 100%).  I
don't think we need to handle the case of no providers.
2022-04-07 14:05:03 +01:00
Ben Thorner
c4e1f40b43 Add missing test for viewing SMS ratio edit page 2022-04-07 14:05:02 +01:00
Ben Thorner
55e89b3f12 Add validation for provider SMS percentages
We could alternatively put the "add up to 100%" error on the page
using form-level errors [^1] and a custom flash message. Putting
the error on each field is slightly simpler and does make it clear
the issue is with all of the fields together.

[^1]: 22636b55ed
2022-04-07 14:05:01 +01:00
Ben Thorner
7f333ba5fe Rewrite SMS ratio form to cope with 3 providers
This replaces the slider with an integer input for each provider.
Unfortunately showing a variable number of inputs isn't easy to
achieve in WTForms [^1], but we think this is the least worst way
to do it vs e.g. not using WTForms at all.

[^1]: https://github.com/wtforms/wtforms/issues/736
2022-04-07 14:05:00 +01:00
Ben Thorner
01389b5edf Rename provider tests to match endpoint under test
This makes it clearer which tests we have for what.
2022-04-07 14:04:59 +01:00
Ben Thorner
8655ab7dea Stop showing priorities for other provider types
This isn't used and showing priorities when we only have a single
provider or where they have no effect is unnecessarily confusing.
Removing the form makes it clearer that there's only one way to
adjust priorities for domestic SMS providers.

If we add another email or international SMS provider in future,
we would need to rewrite the form here anyway as the priorities
need to be adjusted in tandem, not individually.
2022-04-07 14:04:57 +01:00
Ben Thorner
25a26c0b4d Add caveat about provider version history
To go with https://github.com/alphagov/notifications-api/pull/3500
2022-04-07 13:43:57 +01:00
Ben Thorner
66335d20c2 Return to main provider page after editing ratio
Staying on the edit page is atypical behaviour for an edit form,
especially now it no longer shows the version history.
2022-04-07 13:43:56 +01:00
Ben Thorner
a3231effb1 Remove version history from provider ratio page
This doesn't work with 3 providers. You can still see the version
history for each provider on their dedicated page.
2022-04-07 13:43:54 +01:00
Katie Smith
770e8bd0a3 Merge pull request #4204 from alphagov/bump-deps
Unpin the prometheus-client and use the latest version
2022-04-06 16:13:18 +01:00
Katie Smith
31e287d039 Unpin prometheus-client and use the latest version
The prometheus-client was pinned to avoid installing version 0.10.0,
which removed support for `prometheus_multiproc_dir` and renamed the
variable `PROMETHEUS_MULTIPROC_DIR`. Version 0.10.1 reintroduced support
for the lowercase `prometheus_multiproc_dir` environment variable.
2022-04-06 14:57:56 +01:00
Katie Smith
b6b8b74035 Bump pyexcel-ods3 to 0.6.1 2022-04-06 13:42:20 +01:00