Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions sdk/ml/azure-ai-ml/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

### Bugs Fixed

- Skip _list_secrets for identity-based datastores to prevent noisy telemetry traces.

### Other Changes


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from azure.ai.ml.constants._common import SHORT_URI_FORMAT, STORAGE_ACCOUNT_URLS
from azure.ai.ml.entities import Environment
from azure.ai.ml.entities._assets._artifacts.artifact import Artifact, ArtifactStorageInfo
from azure.ai.ml.entities._credentials import AadCredentialConfiguration, NoneCredentialConfiguration
from azure.ai.ml.entities._datastore._constants import WORKSPACE_BLOB_STORE
from azure.ai.ml.exceptions import ErrorTarget, MlException, ValidationException
from azure.ai.ml.operations._datastore_operations import DatastoreOperations
Expand Down Expand Up @@ -106,8 +107,12 @@ def get_datastore_info(
)

try:
credential = operations._list_secrets(name=name, expirable_secret=True)
datastore_info["credential"] = credential.sas_token
if isinstance(datastore.credentials, (NoneCredentialConfiguration, AadCredentialConfiguration)):
module_logger.debug("Identity-based datastore detected. Skipping _list_secrets call")
datastore_info["credential"] = operations._credential
else:
credential = operations._list_secrets(name=name, expirable_secret=True)
datastore_info["credential"] = credential.sas_token
except HttpResponseError:
datastore_info["credential"] = operations._credential

Expand Down