From adb701a1600e44096fa696daabadf912a4663752 Mon Sep 17 00:00:00 2001 From: Thomas Sundvoll <35451859+tsundvoll@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:26:53 +0100 Subject: [PATCH] Adjust inspection_result message to return just name of storage account instead of url. This also affects the config and must be considered when deploying the component and configuring environment variables. --- src/isar/config/settings.py | 4 +--- src/isar/storage/blob_storage.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/isar/config/settings.py b/src/isar/config/settings.py index bf6dd5e5..9185f305 100644 --- a/src/isar/config/settings.py +++ b/src/isar/config/settings.py @@ -144,9 +144,7 @@ def __init__(self) -> None: UPLOAD_INSPECTIONS_ASYNC: bool = Field(default=False) # URL to storage account for Azure Blob Storage - BLOB_STORAGE_ACCOUNT_URL: str = Field( - default="https://eqrobotdevstorage.blob.core.windows.net" - ) + BLOB_STORAGE_ACCOUNT: str = Field(default="eqrobotdevstorage") # Name of blob container in Azure Blob Storage [slimm test] BLOB_CONTAINER: str = Field(default="test") diff --git a/src/isar/storage/blob_storage.py b/src/isar/storage/blob_storage.py index 153ae104..2eee30dc 100644 --- a/src/isar/storage/blob_storage.py +++ b/src/isar/storage/blob_storage.py @@ -59,7 +59,7 @@ def _upload_file(self, path: Path, data: bytes) -> Union[str, dict]: absolute_inspection_path = { "source": "blob", - "blob_storage_account_url": settings.BLOB_STORAGE_ACCOUNT_URL, + "storage_account": settings.BLOB_STORAGE_ACCOUNT, "blob_container": settings.BLOB_CONTAINER, "blob_name": blob_client.blob_name, }