Skip to content

Commit

Permalink
Fixed UnknownHostException on the specified KeyVault
Browse files Browse the repository at this point in the history
Fix #3090
  • Loading branch information
nfx committed Oct 30, 2024
1 parent 1ad3649 commit f130cf1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/databricks/labs/ucx/assessment/secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re

from databricks.sdk import WorkspaceClient
from databricks.sdk.errors import NotFound
from databricks.sdk.errors import NotFound, InvalidState

logger = logging.getLogger(__name__)

Expand All @@ -24,6 +24,10 @@ def _get_secret_if_exists(self, secret_scope, secret_key) -> str | None:
except NotFound:
logger.warning(f'removed on the backend: {secret_scope}/{secret_key}')
return None
except InvalidState as e:
# see https://github.com/databrickslabs/ucx/issues/3090
logger.warning(f'Invalid Azure Key Vault for {secret_scope}/{secret_key}: {e}')
return None
except UnicodeDecodeError:
logger.warning(
f"Secret {secret_scope}/{secret_key} has Base64 bytes that cannot be decoded to utf-8 string."
Expand Down

0 comments on commit f130cf1

Please sign in to comment.