Commit Graph

255 Commits

Author SHA1 Message Date
Kenneth Kehl
2788c21420 change page size 2025-05-21 13:44:14 -07:00
Carlo Costino
419d6cee69 Update the flask-socketio config to play more nicely:
* Reverts run commands to what they previously were
* Addresses some outstanding linting/formatting
* Accounts for proper config initialization (CORS, Redis)
* Updates dependencies and pulls in latest changes from main

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2025-04-16 17:43:10 -04:00
Beverly Nguyen
f8726ca6b7 socket io setup 2025-04-09 16:56:42 -07:00
Beverly Nguyen
16c68e06b9 initial test socket io setup 2025-03-27 09:51:22 -07:00
Kenneth Kehl
fa0d308eff fix werkzeug server header 2025-02-03 14:38:43 -08:00
Kenneth Kehl
8a70e728f2 try to fix dynamic scan warnings 2025-02-03 08:08:47 -08:00
Kenneth Kehl
ec02da930b try to fix dynamic scan warnings 2025-02-03 07:56:30 -08:00
Kenneth Kehl
2770f76431 cleanup 2025-01-09 11:14:51 -08:00
Kenneth Kehl
6aae2c7aae fix db connection pool 2025-01-09 10:53:33 -08:00
Kenneth Kehl
a45e411094 stop workers from propagating logs 2024-12-18 11:59:30 -08:00
Cliff Hill
5a9b867d7a Sticking the job cache into the flask app's config, in an effort to
improve/fix things.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
2024-11-05 17:21:14 -05:00
Kenneth Kehl
97cecd8569 add initial phone validation ability 2024-09-12 10:31:01 -07:00
Kenneth Kehl
64a85868a3 code review feedback and merge from main 2024-09-11 09:39:18 -07:00
Kenneth Kehl
c0ab7c8a68 more exc_info 2024-08-15 11:07:36 -07:00
Kenneth Kehl
875d378b3d fix ExpiringDict caching solution 2024-07-19 13:58:23 -07:00
Kenneth Kehl
22ffc56520 remove v2 2024-05-30 12:27:07 -07:00
Carlo Costino
99edc88197 Localize notification_utils to the API
This changeset pulls in all of the notification_utils code directly into the API and removes it as an external dependency.  We are doing this to cut down on operational maintenance of the project and will begin removing parts of it no longer needed for the API.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
2024-05-16 10:17:45 -04:00
Kenneth Kehl
ebdb78e52e reformat up to latest version of black 2024-04-01 15:12:33 -07:00
Kenneth Kehl
abce798f5b remove celery from notifications-utils (notify-api-130) 2024-03-04 10:32:19 -08:00
Kenneth Kehl
00fd3a72bb code review feedback, fix setup.cfg and reformat 2023-08-25 08:10:33 -07:00
Kenneth Kehl
026dc14021 notify-api-412 use black to enforce python style standards 2023-08-23 10:35:43 -07:00
Kenneth Kehl
1765dba476 fix references to gds 2023-08-17 09:01:53 -07:00
Carlo Costino
574e0b92fc Merge pull request #404 from GSA/notify-api-391
notify-api-391 increase code coverage to 95%
2023-08-16 16:40:33 -04:00
Kenneth Kehl
b9ba7d018b more tests 2023-08-14 15:32:22 -07:00
Kenneth Kehl
8d74a46d7c add noqa for some db methods 2023-08-08 11:57:57 -07:00
Kenneth Kehl
abd1898150 fix code for vulture 2023-08-08 11:48:19 -07:00
Kenneth Kehl
4940d5e93b notify-api-332 rename organisation 2023-07-10 11:06:29 -07:00
Kenneth Kehl
b59e4df06d code review feedback 2023-05-05 08:09:15 -07:00
Kenneth Kehl
3fb113a83e notify-152 sms delivery receipts 2023-05-04 07:56:24 -07:00
Kenneth Kehl
001954538e notify-243 remove statsd 2023-04-25 07:50:56 -07:00
Ryan Ahearn
db62e318ca Address moderate and low owasp findings
* CORS headers removed because browsers should not interact with API directly
* Updated error handling to return expected content-type for JSON error messages
2023-04-19 09:27:24 -04:00
Steven Reilly
ff4190a8eb Remove letters-related code (#175)
This deletes a big ol' chunk of code related to letters. It's not everything—there are still a few things that might be tied to sms/email—but it's the the heart of letters function. SMS and email function should be untouched by this.

Areas affected:

- Things obviously about letters
- PDF tasks, used for precompiling letters
- Virus scanning, used for those PDFs
- FTP, used to send letters to the printer
- Postage stuff
2023-03-02 20:20:31 -05:00
Ryan Ahearn
d1c03e5e8c Get SES config from VCAP_SERVICES 2023-01-31 17:27:17 -05:00
Ryan Ahearn
7878316790 Remove placeholder sms callback comments 2023-01-03 10:23:14 -05:00
Ryan Ahearn
0ed7a31765 Merge pull request #126 from GSA/open-api
Add OpenAPI spec for selected api endpoints
2022-11-30 13:30:26 -05:00
Ryan Ahearn
286400aa18 Use only stdout logging in cloud.gov 2022-11-22 12:11:11 -05:00
Ryan Ahearn
7c611e993f Read openapi schema for the owasp scan 2022-11-16 15:50:08 -05: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
stvnrlly
57f4df8ed1 remove broadcast-related code, except migrations 2022-10-04 15:28:27 +00:00
jimmoffet
c04d1df6b3 fixing tests 2022-10-03 17:16:59 -07:00
jimmoffet
b0f819dbd9 canada UK ses callbacks monster mash 2022-09-15 14:59:13 -07:00
Ryan Ahearn
806e2ad2dc Review and update uses of PRNG 2022-08-19 15:26:12 +00:00
Ryan Ahearn
a6669501cc Upgrade pip packages 2022-08-12 15:22:01 -04:00
Jim Moffet
aa4ec532a4 implement SNS 2022-06-17 11:16:23 -07: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
Katie Smith
badd0e0894 Bump Flask and itsdangerous
This bumps Flask to version 2.1.0, which requires some minor changes to
the app code and itsdangerous to also be bumped.
2022-04-05 17:06:08 +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
528223ed61 Use central NotifyCelery base class in utils
Note that the new base class doesn't include a bespoke feature we
had here: 'log_on_worker_shutdown'. We've agreed it's reasonable
to remove it for now as it was introduced many years ago and its
use case is unclear - we can always add it back if needed.
2021-11-16 13:58:12 +00:00