diff --git a/integration_v3/test_backup_v4.py b/integration_v3/test_backup_v4.py index e8663bc1f..2a3ba0ceb 100644 --- a/integration_v3/test_backup_v4.py +++ b/integration_v3/test_backup_v4.py @@ -130,7 +130,7 @@ def test_create_and_restore_backup_with_waiting(client: weaviate.WeaviateClient) # check create status create_status = client.backup.get_create_status(backup_id, BACKEND) assert create_status.status == BackupStatus.SUCCESS - assert create_status.path == backup_id + assert create_status.backup_id == backup_id # remove existing class client.collections.delete("Article") diff --git a/weaviate/backup/backup.py b/weaviate/backup/backup.py index b0cd256a0..9d65dda46 100644 --- a/weaviate/backup/backup.py +++ b/weaviate/backup/backup.py @@ -16,7 +16,11 @@ BackupFailedException, EmptyResponseException, ) -from weaviate.util import _capitalize_first_letter, _decode_json_response_dict, _decode_json_response_list +from weaviate.util import ( + _capitalize_first_letter, + _decode_json_response_dict, + _decode_json_response_list, +) STORAGE_NAMES = { "filesystem", @@ -360,9 +364,7 @@ async def get_restore_status( """ return await self.__get_restore_status(backup_id, backend) - async def __cancel_backup( - self, backup_id: str, backend: BackupStorage - ) -> bool: + async def __cancel_backup(self, backup_id: str, backend: BackupStorage) -> bool: backup_id, backend = _get_and_validate_get_status( backup_id=backup_id, backend=backend, @@ -381,9 +383,7 @@ async def __cancel_backup( else: return False # did not exist - async def cancel_backup( - self, backup_id: str, backend: BackupStorage - ) -> bool: + async def cancel_backup(self, backup_id: str, backend: BackupStorage) -> bool: """ Cancels a running backup. diff --git a/weaviate/collections/backups/backups.py b/weaviate/collections/backups/backups.py index 96d6dcb96..9190f29c4 100644 --- a/weaviate/collections/backups/backups.py +++ b/weaviate/collections/backups/backups.py @@ -59,7 +59,9 @@ async def create( create = await self._backup.create( backup_id, backend, [self._name], None, wait_for_completion, config ) - return BackupStatusReturn(error=create.error, status=create.status, path=create.path, id=backup_id) + return BackupStatusReturn( + error=create.error, status=create.status, path=create.path, id=backup_id + ) async def restore( self, @@ -97,7 +99,9 @@ async def restore( restore = await self._backup.restore( backup_id, backend, [self._name], None, wait_for_completion, config ) - return BackupStatusReturn(error=restore.error, status=restore.status, path=restore.path, id=backup_id) + return BackupStatusReturn( + error=restore.error, status=restore.status, path=restore.path, id=backup_id + ) async def get_create_status(self, backup_id: str, backend: BackupStorage) -> BackupStatusReturn: """Check if a started backup job has completed.