Commit Graph

391 Commits

Author SHA1 Message Date
Ryan Ahearn
6868daad90 Replace direct access of os.environ with getenv() 2022-11-01 11:44:30 -04:00
Ryan Ahearn
b4256d0a6c Properly set database connection string in cloud.gov 2022-11-01 11:34:00 -04:00
Ryan Ahearn
41a52daca0 Clean up bucket settings 2022-10-31 15:37:12 -04:00
Ryan Ahearn
7aafdd7bac Clean up config settings 2022-10-31 13:25:59 -04:00
Steven Reilly
d37c2a53b8 Merge branch 'main' into stvnrlly-remove-broadcasts 2022-10-25 10:17:49 -04:00
stvnrlly
d4e156e8ae Merge branch 'main' into stvnrlly-remove-broadcasts 2022-10-20 19:44:20 -04:00
stvnrlly
e9fdfd59f4 clean flake8 except provider code 2022-10-19 16:16:26 +00:00
jimmoffet
863dfe39ba config flag for turning off inbound SMS replies 2022-10-07 17:25:31 -07:00
stvnrlly
53204c307b tests are, uh, mostly passing 2022-10-05 01:12:35 +00:00
jimmoffet
4feaa06f5d fix migrations 2022-10-04 17:42:04 -07:00
stvnrlly
57f4df8ed1 remove broadcast-related code, except migrations 2022-10-04 15:28:27 +00:00
jimmoffet
c7ccc3b0dd fix conflict 2022-10-03 09:14:04 -07:00
jimmoffet
8cb6f60f04 modify inbound notif processing 2022-10-03 09:05:34 -07:00
Jim Moffet
d0bba8a8bd Merge branch 'main' into jim/091422/deliverycallbacks 2022-09-30 11:21:46 -04:00
Ryan Ahearn
e3ad01119d Replace celery[sqs] with celery[redis] 2022-09-29 08:59:17 -04:00
Ryan Ahearn
538d2cbe4c Proactively specify aws region for s3 operations 2022-09-26 10:56:59 -04:00
Ryan Ahearn
8ede076708 Use correct access credentials for each bucket 2022-09-22 12:14:25 -04:00
Ryan Ahearn
e9815a6f8e Create s3 buckets via terraform and bind to app 2022-09-21 11:22:55 -04:00
Ryan Ahearn
cb4036b1b0 Disable letter-based S3 buckets 2022-09-21 11:22:55 -04:00
jimmoffet
a03de0dd56 remove outdated validatesns library and replace with maintainable code 2022-09-20 20:11:09 -07:00
Jim Moffet
38a6ea4de4 Merge pull request #29 from 18F/jim/082622/deukifying
de-UKify service and template
2022-08-30 11:14:21 -07:00
jimmoffet
0adc0618b9 comment 2022-08-30 11:05:38 -07:00
jimmoffet
2382846622 fix domain config 2022-08-30 10:58:23 -07:00
jimmoffet
51d31600e5 notify email domain 2022-08-30 09:39:53 -07:00
jimmoffet
181ae4c60f deukify service and template 2022-08-29 19:10:56 -07:00
Ryan Ahearn
3c035531aa Clean up and validate low static-scan findings 2022-08-19 14:32:11 +00:00
jimmoffet
ed8b7fe724 temporarily disable redis for tests 2022-08-02 16:26:37 -07:00
Jim Moffet
b860f9e55a Merge branch 'main' into ch/run-tests-on-ci 2022-08-02 15:29:21 -07:00
James Moffet
18a04fd719 configs 2022-07-25 15:19:05 -07:00
Christa Hartsock
2e6f622ace Do not care about admin base url in test 2022-07-07 15:41:16 -07:00
Christa Hartsock
bf21aa882b Run tests in CI 2022-07-07 15:41:15 -07:00
Jim Moffet
3ac3dcd09d config detect-secrets 2022-06-29 08:47:36 -07:00
Jim Moffet
2047cec495 Merge branch 'main' into jim/062522/configupdates 2022-06-25 18:37:13 -07:00
Jim Moffet
ac8d8d3c29 clean up config 2022-06-25 18:36:39 -07:00
Jim Moffet
2bcae20441 initial sms provider cleanup 2022-06-25 13:05:10 -07:00
Christa Hartsock
e773f937ed WIP: local deployment 2022-06-23 13:39:05 -07:00
Jim Moffet
4030f9c8d7 config buckets 2022-06-23 13:05:09 -07:00
Jim Moffet
aa4ec532a4 implement SNS 2022-06-17 11:16:23 -07:00
Jim Moffet
79ba6cc1d1 disable cache persistence & env updates 2022-06-13 21:42:36 -07:00
Jim Moffet
60262d6031 config formatting 2022-06-13 13:45:07 -07:00
Jim Moffet
59b72f4853 add devcontainer configs and docker network orchestration 2022-06-13 13:16:32 -07:00
David McDonald
f000e5a52b Adjust resting priorities for SMS providers 2022-05-10 15:07:25 +01:00
Ben Thorner
c27107fa74 Remove support for Reach provider
This provider was never active and support was never completed, so
there's little value in keeping all this potentially confusing code.
2022-04-29 12:28:08 +01:00
Leo Hemsted
ae896c9880 remove REDIS_ENABLED flag from creds
you can still use this flag locally but we have it enabled for all
environments and it doesn't need to be toggleable from credentials as it
isn't a secret value.

If we wish to turn redis off for a specific environment we can create a
PR to change the config.
2022-04-22 12:05:19 +01:00
Pea Tyczynska
61b6e45da5 Merge pull request #3510 from alphagov/nhs_branding_default_for_nhs_org
When creating a new NHS org, set default email branding to NHS
2022-04-19 15:33:03 +01:00
Pea Tyczynska
b1ed722252 When creating a new NHS org, set default email branding to NHS
This is more appropriate default for that org than gov.uk branding
and will help us with our work to make setting the branding more
self-service.
2022-04-12 17:24:32 +01:00
Ben Thorner
3f5a811e8f Further tweaks to SMS provider resting points 2022-04-11 10:44:57 +01:00
Ben Thorner
a8ce4cabc3 Adjust resting positions for SMS providers
It's worth noting this will break the Admin page to edit provider
priorities, which currently works in units of 10. We already have
work planned to fix this [^1] and it's not an immediate problem.

The automatic adjustment algorithm will continue to work properly
as it can cope with increments smaller than 10 [^2].

[^1]: https://www.pivotaltracker.com/story/show/181681739
[^2]: b145a29935/app/dao/provider_details_dao.py (L122)
2022-04-06 10:35:21 +01:00
Ben Thorner
015152bab2 Add boilerplate for sending SMS via Reach
This works in conjunction with the new SMS provider stub [^1].

Local testing:

- Run the migrations to add Reach as an inactive provider.
- Activate the Reach provider locally and deactivate the others.

      update provider_details set priority = 100, active = false where notification_type = 'sms';
      update provider_details set active = true where identifier = 'reach';

- Tweak your local environment to point at the SMS stub.

      export REACH_URL="http://host.docker.internal:6300/reach"

- Start / restart Celery to pick up the config change.
- Send a SMS via the Admin app and see the stub log it.
- Reset your environment so you can send normal SMS.

      update provider_details set active = true where notification_type = 'sms';
      update provider_details set active = false where identifier = 'reach';

[^1]: https://github.com/alphagov/notifications-sms-provider-stub/pull/10
2022-03-30 13:38:46 +01:00
Ben Thorner
3fab7a0ca9 Fix letter functional tests to work in Docker
Currently "test_send_letter_notification_via_api" fails at the final
stage in create-fake-letter-response-file [^1]:

        requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=6011): Max retries exceeded with url: /notifications/letter/dvla (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffff95ffc460>: Failed to establish a new connection: [Errno 111] Connection refused'))

This only applies when running in Docker so the default should still
be "localhost" for the Flask app itself.

[^1]: 5093064533/app/celery/research_mode_tasks.py (L57)
2022-03-09 11:07:50 +00:00