Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion airflow/providers/microsoft/azure/secrets/key_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ def build_path(path_prefix: str, secret_id: str, sep: str = '-') -> str:
:param secret_id: Name of the secret
:param sep: Separator used to concatenate path_prefix and secret_id
"""
path = f'{path_prefix}{sep}{secret_id}'
# When an empty prefix is given, do not add a separator to the secret name
if path_prefix == "":
path = f'{secret_id}'
else:
path = f'{path_prefix}{sep}{secret_id}'
return path.replace('_', sep)

def _get_secret(self, path_prefix: str, secret_id: str) -> str | None:
Expand Down