Azure / Azure/azure-cli

az keyvault secret list very slow with large numbers of secrets

Open
#27,746 6 comments 0 reactions 1 assignee Claimed by @evelyn-ys View on GitHub
act-identity-squad Auto-Assign Auto-Resolve customer-reported KeyVault question Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

"az keyvault secret list" is very slow (approx 1 min for 350 secrets) which is unexpected but not a problem in itself, however when deleting 349 of those secrets into the soft delete bin and re-running "az keyvault secret list" the time to retrieve one secret is still the same indicating that it is enumerating the soft delete items as well when it doesn't need to and they are not returned by the list operation.

Get/Set of a single secret by ID doesn't display the same issue.

### Related command

az keyvault secret list

### Errors

No errors, but very slow performance to return non deleted secrets

### Issue script & Debug output

az keyvault secret list --id

### Expected behavior

When returning the non-deleted secrets it is not expected to take the time for the deleted secrets

### Environment Summary

azure-cli 2.35.0 *

core 2.35.0 *
telemetry 1.0.6 *

Dependencies:
msal 1.17.0
azure-mgmt-resource 20.0.0

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.