Skip to content

Commit af7197b

Browse files
fix: move google.auth.exceptions import into try/except block for graceful degradation
Co-Authored-By: AJ Steers <aj@airbyte.io>
1 parent bb88ac5 commit af7197b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

airbyte_cdk/cli/airbyte_cdk/_secrets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
from pathlib import Path
3737
from typing import Any, cast
3838

39-
import google.auth.exceptions
4039
import requests
4140
import rich_click as click
4241
import yaml
@@ -62,10 +61,12 @@
6261
logger = logging.getLogger("airbyte-cdk.cli.secrets")
6362

6463
try:
64+
import google.auth.exceptions
6565
from google.cloud import secretmanager_v1 as secretmanager
6666
from google.cloud.secretmanager_v1 import Secret
6767
except ImportError:
6868
# If the package is not installed, we will raise an error in the CLI command.
69+
google = None # type: ignore
6970
secretmanager = None # type: ignore
7071
Secret = None # type: ignore
7172

0 commit comments

Comments
 (0)