PagedIterable<T> KeyVault Certificate listPropertiesOfCertificates does not honor the includePending optional parameter after the first page #42988
Labels
Client
This issue points to a problem in the data-plane of the library.
KeyVault
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
The call to fetch the first page sets the appropriate query parameters based on the input parameter value:
azure-sdk-for-java/sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/CertificateClient.java
Lines 988 to 994 in 8409111
But subsequent pages do not have that value set. That means, if the includePending param is set to true, it will not return all the certificates (including pending ones), if the pending certificate happens to be listed in a page other than the first.
Here's the swagger (not sure if this requires some fix to the swagger):
https://github.com/Azure/azure-rest-api-specs/blob/4a4acecea9901c29e19ba50f2d4cf65b20115b69/specification/keyvault/data-plane/Microsoft.KeyVault/stable/7.5/certificates.json#L30-L83
Sample repro:
The issue is pervasive across all the
PagedIterable<T>
methods that follow this pattern within the KeyVault SDKs, butlistPropertiesOfCertificates
andlistDeletedCertificates
(along with maybelistRoleDefinitions
in KeyVault Administration) seem to be the only ones that have optional parameters which are settable by the SDK methods (unlike maxResults) and hence have an actual behavioral bug here.It's possible that some other service SDKs have similar concerns here, but newer SDKs
PagedIterable
pattern, set the optional parameters appropriately in both the first and subsequent pages:azure-sdk-for-java/sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/TableClient.java
Lines 1039 to 1046 in 8409111
Related issues in other languages:
Azure/azure-sdk-for-net#47202
Azure/azure-sdk-for-cpp#6235
Azure/azure-sdk-for-python#38589
Azure/azure-sdk-for-go#23772
Azure/azure-sdk-for-js#31803
#42988
The text was updated successfully, but these errors were encountered: