Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎨 notify frontend about current efs disk space #6520

Merged
merged 14 commits into from
Oct 29, 2024
Merged
1 change: 1 addition & 0 deletions services/efs-guardian/requirements/_base.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@

fastapi
packaging
python-socketio
151 changes: 82 additions & 69 deletions services/efs-guardian/requirements/_base.txt

Large diffs are not rendered by default.

76 changes: 42 additions & 34 deletions services/efs-guardian/requirements/_test.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
aiodocker==0.21.0
aiodocker==0.23.0
# via
# -c requirements/_base.txt
# -r requirements/_test.in
aiohttp==3.9.5
aiohappyeyeballs==2.4.3
# via
# -c requirements/_base.txt
# aiohttp
aiohttp==3.10.10
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
Expand All @@ -13,37 +17,37 @@ aiosignal==1.3.1
# aiohttp
antlr4-python3-runtime==4.13.2
# via moto
anyio==4.4.0
anyio==4.6.0
# via
# -c requirements/_base.txt
# httpx
asgi-lifespan==2.1.0
# via -r requirements/_test.in
attrs==23.2.0
attrs==24.2.0
# via
# -c requirements/_base.txt
# aiohttp
# jsonschema
# referencing
aws-sam-translator==1.89.0
aws-sam-translator==1.91.0
# via cfn-lint
aws-xray-sdk==2.14.0
# via moto
blinker==1.8.2
# via flask
boto3==1.34.106
boto3==1.34.131
# via
# -c requirements/_base.txt
# aws-sam-translator
# moto
botocore==1.34.106
botocore==1.34.131
# via
# -c requirements/_base.txt
# aws-xray-sdk
# boto3
# moto
# s3transfer
certifi==2024.2.2
certifi==2024.8.30
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
Expand All @@ -52,17 +56,17 @@ certifi==2024.2.2
# requests
cffi==1.17.1
# via cryptography
cfn-lint==1.10.3
cfn-lint==1.16.1
# via moto
charset-normalizer==3.3.2
charset-normalizer==3.4.0
# via
# -c requirements/_base.txt
# requests
click==8.1.7
# via
# -c requirements/_base.txt
# flask
coverage==7.6.1
coverage==7.6.2
# via
# -r requirements/_test.in
# pytest-cov
Expand All @@ -71,17 +75,17 @@ cryptography==43.0.1
# -c requirements/../../../requirements/constraints.txt
# joserfc
# moto
debugpy==1.8.5
debugpy==1.8.7
# via -r requirements/_test.in
deepdiff==8.0.1
# via -r requirements/_test.in
docker==7.1.0
# via
# -r requirements/_test.in
# moto
faker==29.0.0
faker==30.3.0
# via -r requirements/_test.in
fakeredis==2.24.1
fakeredis==2.25.1
# via -r requirements/_test.in
flask==3.0.3
# via
Expand All @@ -100,17 +104,17 @@ h11==0.14.0
# via
# -c requirements/_base.txt
# httpcore
httpcore==1.0.5
httpcore==1.0.6
# via
# -c requirements/_base.txt
# httpx
httpx==0.27.0
httpx==0.27.2
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
# -r requirements/_test.in
# respx
idna==3.7
idna==3.10
# via
# -c requirements/_base.txt
# anyio
Expand Down Expand Up @@ -141,7 +145,7 @@ jsonpath-ng==1.6.1
# via moto
jsonpointer==3.0.0
# via jsonpatch
jsonschema==4.22.0
jsonschema==4.23.0
# via
# -c requirements/_base.txt
# aws-sam-translator
Expand All @@ -158,28 +162,28 @@ lazy-object-proxy==1.10.0
# via openapi-spec-validator
lupa==2.2
# via fakeredis
markupsafe==2.1.5
markupsafe==3.0.1
# via
# jinja2
# werkzeug
moto==5.0.15
moto==5.0.16
# via -r requirements/_test.in
mpmath==1.3.0
# via sympy
multidict==6.0.5
multidict==6.1.0
# via
# -c requirements/_base.txt
# aiohttp
# yarl
networkx==3.3
networkx==3.4
# via cfn-lint
openapi-schema-validator==0.6.2
# via openapi-spec-validator
openapi-spec-validator==0.7.1
# via moto
orderly-set==5.2.2
# via deepdiff
packaging==24.0
packaging==24.1
# via
# -c requirements/_base.txt
# pytest
Expand All @@ -191,6 +195,10 @@ pluggy==1.5.0
# via pytest
ply==3.11
# via jsonpath-ng
propcache==0.2.0
# via
# -c requirements/_base.txt
# yarl
psutil==6.0.0
# via
# -c requirements/_base.txt
Expand All @@ -199,7 +207,7 @@ py-partiql-parser==0.5.6
# via moto
pycparser==2.22
# via cffi
pydantic==1.10.15
pydantic==1.10.18
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
Expand Down Expand Up @@ -230,7 +238,7 @@ python-dateutil==2.9.0.post0
# moto
python-dotenv==1.0.1
# via -r requirements/_test.in
pyyaml==6.0.1
pyyaml==6.0.2
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
Expand All @@ -239,7 +247,7 @@ pyyaml==6.0.1
# jsonschema-path
# moto
# responses
redis==5.0.4
redis==5.1.1
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
Expand All @@ -265,16 +273,16 @@ respx==0.21.1
# via -r requirements/_test.in
rfc3339-validator==0.1.4
# via openapi-schema-validator
rpds-py==0.18.1
rpds-py==0.20.0
# via
# -c requirements/_base.txt
# jsonschema
# referencing
s3transfer==0.10.1
s3transfer==0.10.3
# via
# -c requirements/_base.txt
# boto3
setuptools==74.0.0
setuptools==75.1.0
# via
# -c requirements/_base.txt
# moto
Expand All @@ -293,14 +301,14 @@ sortedcontainers==2.4.0
# via fakeredis
sympy==1.13.3
# via cfn-lint
typing-extensions==4.11.0
typing-extensions==4.12.2
# via
# -c requirements/_base.txt
# aiodocker
# aws-sam-translator
# cfn-lint
# faker
# pydantic
urllib3==2.2.1
urllib3==2.2.3
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
Expand All @@ -316,9 +324,9 @@ wrapt==1.16.0
# via
# -c requirements/_base.txt
# aws-xray-sdk
xmltodict==0.13.0
xmltodict==0.14.1
# via moto
yarl==1.9.4
yarl==1.14.0
# via
# -c requirements/_base.txt
# aiohttp
30 changes: 15 additions & 15 deletions services/efs-guardian/requirements/_tools.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
astroid==3.3.4
astroid==3.3.5
# via pylint
black==24.8.0
black==24.10.0
# via -r requirements/../../../requirements/devenv.txt
build==1.2.2
build==1.2.2.post1
# via pip-tools
bump2version==1.0.1
# via -r requirements/../../../requirements/devenv.txt
Expand All @@ -14,9 +14,9 @@ click==8.1.7
# -c requirements/_test.txt
# black
# pip-tools
dill==0.3.8
dill==0.3.9
# via pylint
distlib==0.3.8
distlib==0.3.9
# via virtualenv
filelock==3.16.1
# via virtualenv
Expand All @@ -36,7 +36,7 @@ mypy-extensions==1.0.0
# mypy
nodeenv==1.9.1
# via pre-commit
packaging==24.0
packaging==24.1
# via
# -c requirements/_base.txt
# -c requirements/_test.txt
Expand All @@ -53,38 +53,38 @@ platformdirs==4.3.6
# black
# pylint
# virtualenv
pre-commit==3.8.0
pre-commit==4.0.1
# via -r requirements/../../../requirements/devenv.txt
pylint==3.3.0
pylint==3.3.1
# via -r requirements/../../../requirements/devenv.txt
pyproject-hooks==1.1.0
pyproject-hooks==1.2.0
# via
# build
# pip-tools
pyyaml==6.0.1
pyyaml==6.0.2
# via
# -c requirements/../../../requirements/constraints.txt
# -c requirements/_base.txt
# -c requirements/_test.txt
# pre-commit
# watchdog
ruff==0.6.7
ruff==0.6.9
# via -r requirements/../../../requirements/devenv.txt
setuptools==74.0.0
setuptools==75.1.0
# via
# -c requirements/_base.txt
# -c requirements/_test.txt
# pip-tools
tomlkit==0.13.2
# via pylint
typing-extensions==4.11.0
typing-extensions==4.12.2
# via
# -c requirements/_base.txt
# -c requirements/_test.txt
# mypy
virtualenv==20.26.5
virtualenv==20.26.6
# via pre-commit
watchdog==5.0.2
watchdog==5.0.3
# via -r requirements/_tools.in
wheel==0.44.0
# via pip-tools
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from ..services.efs_manager_setup import setup as setup_efs_manager
from ..services.modules.rabbitmq import setup as setup_rabbitmq
from ..services.modules.redis import setup as setup_redis
from ..services.notifications._setup import setup_notifications
from ..services.process_messages_setup import setup as setup_process_messages
from .settings import ApplicationSettings

Expand Down Expand Up @@ -52,6 +53,8 @@ def create_app(settings: ApplicationSettings) -> FastAPI:
setup_background_tasks(app)
setup_process_messages(app)

setup_notifications(app)

# EVENTS
async def _on_startup() -> None:
print(APP_STARTED_BANNER_MSG, flush=True) # noqa: T201
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from ._setup import setup_notifications

__all__: tuple[str, ...] = ("setup_notifications",)
Loading
Loading