runtime.Pager KeyVault Certificate NewListCertificatePropertiesPager does not honor the IncludePending optional parameter after the first page #23772
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
Service Attention
Workflow: This issue is responsible by Azure service team.
The call to fetch the first page sets the appropriate query parameters based on the input parameter value:
azure-sdk-for-go/sdk/security/keyvault/azcertificates/client.go
Lines 742 to 768 in 3199096
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.
azure-sdk-for-go/sdk/security/keyvault/azcertificates/options.go
Lines 76 to 81 in 3199096
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
runtime.Pager
methods that follow this pattern within the KeyVault SDKs, butNewListCertificatePropertiesPager
andNewListDeletedCertificatePropertiesPager
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
runtime.Pager
pattern, that don't useFetcherForNextLink
might work correctly:azure-sdk-for-go/sdk/data/aztables/client.go
Lines 180 to 183 in 3199096
Related issues in other languages:
Azure/azure-sdk-for-net#47202
Azure/azure-sdk-for-cpp#6235
Azure/azure-sdk-for-python#38589
#23772
Azure/azure-sdk-for-js#31803
Azure/azure-sdk-for-java#42988
The text was updated successfully, but these errors were encountered: