diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d98118b3a600650d927676fae6160aad47bc61b1..fc02d001d17a83acc9a54da74dfb01b129a65622 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,13 +31,13 @@ repos: files: app args: [-c] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.6.1 + rev: v1.7.0 hooks: - id: mypy files: app args: [--config=pyproject.toml] additional_dependencies: - - boto3-stubs-lite[s3] + - boto3-stubs-lite[s3]>=1.29.0,<1.30.0 - sqlalchemy>=2.0.0,<2.1.0 - - pydantic>=2.4.0,<2.5.0 + - pydantic>=2.5.0,<2.6.0 - types-requests diff --git a/Dockerfile-Gunicorn b/Dockerfile-Gunicorn index 64c2d08e3a2ab2e2f746e0562b1c252008f2cfaa..79f82be9b4fa45d10d66ed9256a5d9f97337a34a 100644 --- a/Dockerfile-Gunicorn +++ b/Dockerfile-Gunicorn @@ -4,7 +4,7 @@ ENV PORT=8000 RUN pip install --no-cache-dir httpx[cli] -HEALTHCHECK --interval=35s --timeout=4s CMD httpx http://localhost:$PORT/health || exit 1 +HEALTHCHECK --interval=30s --timeout=4s CMD httpx http://localhost:$PORT/health || exit 1 COPY ./scripts/prestart.sh /app/prestart.sh COPY ./requirements.txt /app/requirements.txt diff --git a/app/api/endpoints/buckets.py b/app/api/endpoints/buckets.py index 4b255de3bd15abb208e044890468b4927f371011..eaad0ef07c1eb9e2f4e7d19432a3e7b4849961fc 100644 --- a/app/api/endpoints/buckets.py +++ b/app/api/endpoints/buckets.py @@ -92,14 +92,14 @@ async def list_buckets( All the buckets for which the user has READ permissions. """ current_span = trace.get_current_span() - if user is not None: + if user is not None: # pragma: no cover current_span.set_attribute("uid", user) current_span.set_attribute("bucket_type", bucket_type.name) await authorization("list_all" if user is None or current_user.uid != user else "list") if user is None: buckets = await CRUDBucket.get_all(db) else: - buckets = await CRUDBucket.get_for_user(db, current_user.uid, bucket_type) + buckets = await CRUDBucket.get_for_user(db, user, bucket_type) def map_buckets(bucket: Bucket) -> BucketOutSchema: # define function to fetch objects only one time for each bucket diff --git a/requirements-dev.txt b/requirements-dev.txt index 33c6b6ffa22dfacd5a5efe22bade7b6e11c0f4e2..92dafe2c693d59f5b84875e735a803dc0d3c7c22 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -7,9 +7,9 @@ coverage[toml]>=7.3.0,<7.4.0 ruff>=0.1.0,<0.2.0 black>=23.11.0,<23.12.0 isort>=5.12.0,<5.13.0 -mypy>=1.6.0,<1.7.0 +mypy>=1.7.0,<1.8.0 # stubs for mypy -boto3-stubs-lite[s3]>=1.28.0,<1.29.0 +boto3-stubs-lite[s3]>=1.29.0,<1.30.0 types-requests # Miscellaneous pre-commit>=3.5.0,<3.6.0 diff --git a/requirements.txt b/requirements.txt index 03e1aa635fa6cf9d3158c0a4cb0b52d7861977d7..9629ad6960b4def1a316dd63df9107ef088f7a5b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,8 +4,8 @@ clowmdb>=2.2.0,<2.3.0 # Webserver packages anyio>=3.7.0,<4.0.0 fastapi>=0.104.0,<0.105.0 -pydantic>=2.4.0,<2.5.0 -pydantic-settings>=2.0.0,<2.1.0 +pydantic>=2.5.0,<2.6.0 +pydantic-settings>=2.1.0,<2.2.0 uvicorn>=0.24.0,<0.25.0 # Database packages PyMySQL>=1.1.0,<1.2.0 @@ -14,7 +14,7 @@ aiomysql>=0.2.0,<0.3.0 # Security packages authlib>=1.2.0,<1.3.0 # Ceph and S3 packages -boto3>=1.28.0,<1.29.0 +boto3>=1.29.0,<1.30.0 rgwadmin>=2.4.0,<2.5.0 # Miscellaneous tenacity>=8.2.0,<8.3.0