From 6f02388a7322907fe92bb6a077afe61d3f1c362c Mon Sep 17 00:00:00 2001 From: Giancarlo Romeo Date: Wed, 20 Nov 2024 10:17:58 +0100 Subject: [PATCH 1/2] fix urls --- services/agent/tests/conftest.py | 2 +- services/agent/tests/unit/test_services_backup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/agent/tests/conftest.py b/services/agent/tests/conftest.py index f421258fd77..14e8cd1d9e3 100644 --- a/services/agent/tests/conftest.py +++ b/services/agent/tests/conftest.py @@ -48,7 +48,7 @@ def mock_environment( "LOGLEVEL": "DEBUG", "SC_BOOT_MODE": BootModeEnum.DEBUG, "AGENT_VOLUMES_CLEANUP_TARGET_SWARM_STACK_NAME": swarm_stack_name, - "AGENT_VOLUMES_CLEANUP_S3_ENDPOINT": mocked_s3_server_url, + "AGENT_VOLUMES_CLEANUP_S3_ENDPOINT": f"{mocked_s3_server_url}", "AGENT_VOLUMES_CLEANUP_S3_ACCESS_KEY": "xxx", "AGENT_VOLUMES_CLEANUP_S3_SECRET_KEY": "xxx", "AGENT_VOLUMES_CLEANUP_S3_BUCKET": bucket, diff --git a/services/agent/tests/unit/test_services_backup.py b/services/agent/tests/unit/test_services_backup.py index 67a1203ea79..c986550da51 100644 --- a/services/agent/tests/unit/test_services_backup.py +++ b/services/agent/tests/unit/test_services_backup.py @@ -77,7 +77,7 @@ async def test_backup_volume( expected_files = _FILES_TO_CREATE_IN_VOLUME * len(VOLUMES_TO_CREATE) - async with session.client("s3", endpoint_url=settings.AGENT_VOLUMES_CLEANUP_S3_ENDPOINT) as s3_client: # type: ignore + async with session.client("s3", endpoint_url=f"{settings.AGENT_VOLUMES_CLEANUP_S3_ENDPOINT}") as s3_client: # type: ignore list_response = await s3_client.list_objects_v2( Bucket=settings.AGENT_VOLUMES_CLEANUP_S3_BUCKET, Prefix=f"{swarm_stack_name}/{project_id}/{node_id}/{run_id}", From b357b8830fa8c93f42170eb644ef4417271f44a9 Mon Sep 17 00:00:00 2001 From: Giancarlo Romeo Date: Wed, 20 Nov 2024 10:50:36 +0100 Subject: [PATCH 2/2] fix re-import --- .../models-library/src/models_library/rest_pagination_utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/models-library/src/models_library/rest_pagination_utils.py b/packages/models-library/src/models_library/rest_pagination_utils.py index 65c89131fe5..1bd952cfd12 100644 --- a/packages/models-library/src/models_library/rest_pagination_utils.py +++ b/packages/models-library/src/models_library/rest_pagination_utils.py @@ -2,7 +2,6 @@ from typing import Any, Protocol, runtime_checkable from pydantic import AnyHttpUrl, TypeAdapter -from pydantic import TypeAdapter from typing_extensions import ( # https://docs.pydantic.dev/latest/api/standard_library_types/#typeddict TypedDict, )