diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cf9a145b6..7e8d2bc9e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -62,7 +62,6 @@ jobs: NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }} - REDIS_ENABLED: 1 with: cf_username: ${{ secrets.CLOUDGOV_USERNAME }} cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} @@ -76,7 +75,6 @@ jobs: --var NEW_RELIC_LICENSE_KEY="$NEW_RELIC_LICENSE_KEY" --var NOTIFY_E2E_TEST_EMAIL="$NOTIFY_E2E_TEST_EMAIL" --var NOTIFY_E2E_TEST_PASSWORD="$NOTIFY_E2E_TEST_PASSWORD" - --var REDIS_ENABLED="$REDIS_ENABLED" - name: Check for changes to egress config id: changed-egress-config diff --git a/app/config.py b/app/config.py index 61feb6ae7..49cbd89c0 100644 --- a/app/config.py +++ b/app/config.py @@ -89,7 +89,7 @@ class Config(object): PAGE_SIZE = 50 API_PAGE_SIZE = 250 REDIS_URL = cloud_config.redis_url - REDIS_ENABLED = getenv("REDIS_ENABLED", "0") == "1" + REDIS_ENABLED = getenv("REDIS_ENABLED", "1") == "1" EXPIRE_CACHE_TEN_MINUTES = 600 EXPIRE_CACHE_EIGHT_DAYS = 8 * 24 * 60 * 60 diff --git a/deploy-config/demo.yml b/deploy-config/demo.yml index aede2dcc2..38e238c30 100644 --- a/deploy-config/demo.yml +++ b/deploy-config/demo.yml @@ -6,4 +6,5 @@ worker_memory: 512M scheduler_memory: 256M public_api_route: notify-api-demo.app.cloud.gov admin_base_url: https://notify-demo.app.cloud.gov +redis_enabled: 1 default_toll_free_number: "+18337581259" diff --git a/deploy-config/production.yml b/deploy-config/production.yml index cbbd0f514..2152eae42 100644 --- a/deploy-config/production.yml +++ b/deploy-config/production.yml @@ -6,4 +6,5 @@ worker_memory: 512M scheduler_memory: 256M public_api_route: notify-api.app.cloud.gov admin_base_url: https://beta.notify.gov +redis_enabled: 1 default_toll_free_number: "+18447952263" diff --git a/deploy-config/sandbox.yml b/deploy-config/sandbox.yml index 64a652b44..d94339837 100644 --- a/deploy-config/sandbox.yml +++ b/deploy-config/sandbox.yml @@ -6,6 +6,7 @@ worker_memory: 512M scheduler_memory: 256M public_api_route: notify-api-sandbox.app.cloud.gov admin_base_url: https://notify-sandbox.app.cloud.gov +redis_enabled: 1 default_toll_free_number: "+18885989205" ADMIN_CLIENT_SECRET: sandbox-notify-secret-key DANGEROUS_SALT: sandbox-notify-salt diff --git a/deploy-config/staging.yml b/deploy-config/staging.yml index f6a2de501..c338e7bb1 100644 --- a/deploy-config/staging.yml +++ b/deploy-config/staging.yml @@ -6,4 +6,5 @@ worker_memory: 512M scheduler_memory: 256M public_api_route: notify-api-staging.app.cloud.gov admin_base_url: https://notify-staging.app.cloud.gov +redis_enabled: 1 default_toll_free_number: "+18556438890" diff --git a/docs/all.md b/docs/all.md index 37a133b36..c74b11af3 100644 --- a/docs/all.md +++ b/docs/all.md @@ -993,6 +993,8 @@ Once you have a number, it must be set in the app in one of two ways: * +18447342791 * +18447525067 +For a full list of phone numbers in trial and production, team members can access a [tracking list here](https://docs.google.com/spreadsheets/d/1lq3Wi_up7EkcKvmwO3oTw30m7kVt1iXvdS3KAp0smh4/edit#gid=0). + Data Storage Policies & Procedures ================================== diff --git a/manifest.yml b/manifest.yml index eb78a7dc1..eb42d7a74 100644 --- a/manifest.yml +++ b/manifest.yml @@ -40,6 +40,7 @@ applications: NEW_RELIC_ENVIRONMENT: ((env)) NEW_RELIC_LICENSE_KEY: ((NEW_RELIC_LICENSE_KEY)) + REDIS_ENABLED: ((redis_enabled)) NOTIFY_ENVIRONMENT: ((env)) API_HOST_NAME: https://((public_api_route)) ADMIN_BASE_URL: ((admin_base_url)) diff --git a/poetry.lock b/poetry.lock index 4352df3d6..8002e254e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1822,13 +1822,13 @@ trio = ["async_generator", "trio"] [[package]] name = "jinja2" -version = "3.1.2" +version = "3.1.3" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, + {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, + {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, ] [package.dependencies] @@ -2207,22 +2207,22 @@ files = [ [[package]] name = "marshmallow" -version = "3.20.1" +version = "3.20.2" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." optional = false python-versions = ">=3.8" files = [ - {file = "marshmallow-3.20.1-py3-none-any.whl", hash = "sha256:684939db93e80ad3561392f47be0230743131560a41c5110684c16e21ade0a5c"}, - {file = "marshmallow-3.20.1.tar.gz", hash = "sha256:5d2371bbe42000f2b3fb5eaa065224df7d8f8597bc19a1bbfa5bfe7fba8da889"}, + {file = "marshmallow-3.20.2-py3-none-any.whl", hash = "sha256:c21d4b98fee747c130e6bc8f45c4b3199ea66bc00c12ee1f639f0aeca034d5e9"}, + {file = "marshmallow-3.20.2.tar.gz", hash = "sha256:4c1daff273513dc5eb24b219a8035559dc573c8f322558ef85f5438ddd1236dd"}, ] [package.dependencies] packaging = ">=17.0" [package.extras] -dev = ["flake8 (==6.0.0)", "flake8-bugbear (==23.7.10)", "mypy (==1.4.1)", "pre-commit (>=2.4,<4.0)", "pytest", "pytz", "simplejson", "tox"] -docs = ["alabaster (==0.7.13)", "autodocsumm (==0.2.11)", "sphinx (==7.0.1)", "sphinx-issues (==3.0.1)", "sphinx-version-warning (==1.1.2)"] -lint = ["flake8 (==6.0.0)", "flake8-bugbear (==23.7.10)", "mypy (==1.4.1)", "pre-commit (>=2.4,<4.0)"] +dev = ["pre-commit (>=2.4,<4.0)", "pytest", "pytz", "simplejson", "tox"] +docs = ["alabaster (==0.7.15)", "autodocsumm (==0.2.12)", "sphinx (==7.2.6)", "sphinx-issues (==3.0.1)", "sphinx-version-warning (==1.1.2)"] +lint = ["pre-commit (>=2.4,<4.0)"] tests = ["pytest", "pytz", "simplejson"] [[package]] @@ -2501,26 +2501,40 @@ files = [ [[package]] name = "newrelic" -version = "9.3.0" +version = "9.4.0" description = "New Relic Python Agent" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ - {file = "newrelic-9.3.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:f25980a8c86bda75344b5b22edd5d6ad41777776e1ed8a495eb6e38e9813b02c"}, - {file = "newrelic-9.3.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:adefb6620c5a5d75b4bf3ec565cc4d91abcb5cc4e5569f5f82ab29fa3d5aa2d9"}, - {file = "newrelic-9.3.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:27056ab8a3cf39787fc1f93f55243749dd25786f65b15032b6fbb3e8534f4c2a"}, - {file = "newrelic-9.3.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:663fa1c074661f93abf681c8f6028de64744c67f004b722835de1372b6bc4d19"}, - {file = "newrelic-9.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:83346c8f0bcb8f07f74c88f6073e4d44a2e2b3eeec5b2ebe8c450ae695d02b88"}, - {file = "newrelic-9.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2187078d7b0054b30f39dbf891cb2caa71a7046f6d0258fb8c0fcfce70777774"}, - {file = "newrelic-9.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe0f5edd4eba3d62742b3b0730bb4f826be015dd7fbb9c455b01c410421661a2"}, - {file = "newrelic-9.3.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8577a0f733174bee70a147f71aa061fb44a593a1be841feffe12dff480c6e02e"}, - {file = "newrelic-9.3.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:234594655ac0fbe938d34ce5d5d38549d0f5cc11d0552170903ad09574bb4499"}, - {file = "newrelic-9.3.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ce38949404e974b566b21487394f5ea36a1fb80ba36cc4a6e8fb968d2e150ab"}, - {file = "newrelic-9.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a750ffed8aedacdafcb548b3d3f45630a96862db630c9f72520ebbfe91e4e9e0"}, - {file = "newrelic-9.3.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d01d0f0c22b1290dbd2756ef120cfbe154179aae35e1dfc579f8bfd574066105"}, - {file = "newrelic-9.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:53e860c6eacfdef879f23fbbf7d76d8bbb90b725a1c422f62439c6edfceebc21"}, - {file = "newrelic-9.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4caad3017cc978f3130fe2f3933f233c214a4850a595458b733282b3b7f7e886"}, - {file = "newrelic-9.3.0.tar.gz", hash = "sha256:c2dd685527433f6b6fbffe58f83852b46c24b9713ebb8ee7af647e04c2de3ee4"}, + {file = "newrelic-9.4.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:ed7a8ab3fb4425d7d55c44517f24f5259eab2045d4b24a21cf9439d9a6f53ffd"}, + {file = "newrelic-9.4.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:3d1253c67bc371f8eca386a8d96e0ae29861359ca5b62e7e5c4f87083b8a8930"}, + {file = "newrelic-9.4.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:04e055c3a4a9b2b2719bc83e5e2935f700f3943025d169873b8952b9576d3962"}, + {file = "newrelic-9.4.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:1f28ef38aed097600e149755b4b102edcb18e9b4e270d415154699cec2cb1a05"}, + {file = "newrelic-9.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f177f27cfbcd3673359ce0d80f8e418fc706b019ba936bbba9aa08585dff5f0"}, + {file = "newrelic-9.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d3d4902431de420baf1c9801c17adb8d6accb01704a6206dcdbb3ab6cc83ca8"}, + {file = "newrelic-9.4.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:66df7709bc8da0a79aea34eaf3f38410eeed2b84abb53fcac78130a0f4fb7eb4"}, + {file = "newrelic-9.4.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:89329509f6c37f444eedd4a6abc8e569c0faa74e42538e31288e75610ae5fb4e"}, + {file = "newrelic-9.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3ec7da405d968b4f31103d6db407e409ad1cda1403efb22862bdefdd44a9742a"}, + {file = "newrelic-9.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3183168cc1a7d79b2b0be147ea657105a83c631e33edef5a17c469052f9ae944"}, + {file = "newrelic-9.4.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:dcd592bb0115694ca4c8e4b9264ffc05af10c365dfd95c0b8bc10b89c03bb282"}, + {file = "newrelic-9.4.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0f74d88c1b279ffadae325ecebe35a3dab662ae074f868a03cfdc5be5214b3d3"}, + {file = "newrelic-9.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d61eb8972323d57919cefef8ba1faad325a7818939d00ee2bc9698f96a880ca8"}, + {file = "newrelic-9.4.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72267bf3c2ab493813d7f5fb084a722c52da1493b376c56ff1d6a637dc451bed"}, + {file = "newrelic-9.4.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:78567ccedf2bdb75dc567bec318e221dcfab4681bd05babc398ce1b78d60f67b"}, + {file = "newrelic-9.4.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:7a0fcbe0a581bea77346e291a0329fe7fce5226252c69d41fd4d91ba4d7c5493"}, + {file = "newrelic-9.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a9162bf466d8ed7c973a597115434855f4e37888c2350d56b25f9b11875d20f2"}, + {file = "newrelic-9.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5d9e8f0f9ef0920dfad046e70dd91fcecab225d1ea5c09369a701c24e622c69"}, + {file = "newrelic-9.4.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6b63ad134842b92521845864cbc47a7559d189cf8a706220a90974ad2a9510da"}, + {file = "newrelic-9.4.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:895bfa0e1497dc061139b83dd4a5ff7b40b3eafa62a2e54c5bce2e616c72c762"}, + {file = "newrelic-9.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b40049de63700f518a9ee4e2b97881c5796e8a72fe9684bd0ae8e11d1ec17755"}, + {file = "newrelic-9.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eb1a8571d0434d62eac401797e835feed1b39a918434ab1e72e486b39bc0e87"}, + {file = "newrelic-9.4.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:195bc995b227ed0cdbe2c95dc27ae057002432a7c84532e72ba57a430265054a"}, + {file = "newrelic-9.4.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:895d0e78da2b3d5abbde7e8856692944ada2b744b26cdb339d5cbfa4461e9acb"}, + {file = "newrelic-9.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d11de77ba0e9e7921b21385f8300172248e865cd38c16165ee48adc9af35c746"}, + {file = "newrelic-9.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3f71b218febb7a48a8df048a7248025e1bd86c76a3144602e56d2a9f7d1740d"}, + {file = "newrelic-9.4.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f5cecccf3e85dccfa6b5ad7be21ae8940c46c579e2979890d84969546322d715"}, + {file = "newrelic-9.4.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f9fa697c355790b52e3180044349bbc2822230ca6f98d6292df4142080cd20de"}, + {file = "newrelic-9.4.0.tar.gz", hash = "sha256:84437107e0d47be070a17b31f48b54abea7d4951b5ca89f5c2416a2fa6ab42b8"}, ] [package.extras] @@ -4692,4 +4706,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "a70284fcacadde70db3cf216efc388de74fb67c1f00085abcaee37b52ff6eedd" +content-hash = "b24b3ba1e6c3daf354471c796ba6f996cf24426c956ce6e860286d3de5c7bf90" diff --git a/pyproject.toml b/pyproject.toml index 469f2b35e..37f761c0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ gunicorn = {version = "==21.2.0", extras = ["eventlet"]} iso8601 = "==2.1.0" jsonschema = {version = "==4.20.0", extras = ["format"]} lxml = "==5.1.0" -marshmallow = "==3.20.1" +marshmallow = "==3.20.2" marshmallow-sqlalchemy = "==0.29.0" newrelic = "*" notifications-python-client = "==8.2.0"