From e8e0eabb9931a82482abdcff3098c91da2e56ca9 Mon Sep 17 00:00:00 2001 From: tronikos Date: Sun, 5 Oct 2025 00:35:50 -0700 Subject: [PATCH] Double max retries in Google Drive (#153717) --- homeassistant/components/google_drive/api.py | 2 ++ tests/components/google_drive/snapshots/test_backup.ambr | 2 ++ 2 files changed, 4 insertions(+) diff --git a/homeassistant/components/google_drive/api.py b/homeassistant/components/google_drive/api.py index c21d42e0f3a..2a96b5e09a0 100644 --- a/homeassistant/components/google_drive/api.py +++ b/homeassistant/components/google_drive/api.py @@ -22,6 +22,7 @@ from homeassistant.exceptions import ( from homeassistant.helpers import config_entry_oauth2_flow _UPLOAD_AND_DOWNLOAD_TIMEOUT = 12 * 3600 +_UPLOAD_MAX_RETRIES = 20 _LOGGER = logging.getLogger(__name__) @@ -150,6 +151,7 @@ class DriveClient: backup_metadata, open_stream, backup.size, + max_retries=_UPLOAD_MAX_RETRIES, timeout=ClientTimeout(total=_UPLOAD_AND_DOWNLOAD_TIMEOUT), ) _LOGGER.debug( diff --git a/tests/components/google_drive/snapshots/test_backup.ambr b/tests/components/google_drive/snapshots/test_backup.ambr index 891eb0e1cbe..55791e385f8 100644 --- a/tests/components/google_drive/snapshots/test_backup.ambr +++ b/tests/components/google_drive/snapshots/test_backup.ambr @@ -154,6 +154,7 @@ 987, ), dict({ + 'max_retries': 20, 'timeout': dict({ 'ceil_threshold': 5, 'connect': None, @@ -226,6 +227,7 @@ 987, ), dict({ + 'max_retries': 20, 'timeout': dict({ 'ceil_threshold': 5, 'connect': None,