cli
cli copied to clipboard
"storage-credential get" fails on Azure
Describe the issue
Executing databricks storage-credential get --debug
brings up the list of storage credentials, but fails after selection with 404 on Azure Databricks.
...
< "id": "cfc0ee29-e58e-4519-9895-9be37ca215a5",
...
12:54:00 DEBUG non-retriable error: Storage Credential 'cfc0ee29-e58e-4519-9895-9be37ca215a5' does not exist. pid=2421110 sdk=true
12:54:00 DEBUG GET /api/2.1/unity-catalog/storage-credentials/cfc0ee29-e58e-4519-9895-9be37ca215a5
Within WebUIs ajax-api
the .name
is used instead of the .id
.
GET https://<workspace-id>.azuredatabricks.net/ajax-api/2.1/unity-catalog/storage-credentials/identityName
Status 200
Steps to reproduce the behavior
Please list the steps required to reproduce the issue, for example:
- Run
databricks storage-credential get --debug
on a databricks azure workspace that has storage-credentials defined
Expected Behavior
The command should return the entity after selection.
Actual Behavior
The command errors.
OS and CLI version
Databricks CLI v0.210.2 Linux
Work-Around: use the name as arg
databricks storage-credentials list -o json | jq -r '.[].name'
to avoid the issue in https://github.com/databricks/cli/issues/1029
databricks storage-credentials get <name>
As you pointed out it's indeed required to pass the name and not the ID of the credentials.
When no arguments passed to databricks storage-credentials get
it prompts for available input but incorrectly uses id and not name later.
AI: either remove or fix the prompt