Skip to content

[KeyVault] Fix listPropertiesOfSecretVersions pagination in keyvault-secrets#22898

Merged
timovv merged 6 commits intoAzure:mainfrom
timovv:keyvault/22890-fix-listpropertiesofsecretversions
Aug 15, 2022
Merged

[KeyVault] Fix listPropertiesOfSecretVersions pagination in keyvault-secrets#22898
timovv merged 6 commits intoAzure:mainfrom
timovv:keyvault/22890-fix-listpropertiesofsecretversions

Conversation

@timovv
Copy link
Copy Markdown
Member

@timovv timovv commented Aug 15, 2022

Packages impacted by this PR

  • @azure/keyvault-secrets

Issues associated with this PR

Describe the problem that is addressed by this PR

Pagination for listPropertiesOfSecretVersions was not calling the appropriate method to get the next page. It looks like during the migration to Core v2, this change was missed. It was not picked up by the tests, since the tests did not enforce a maximum page size, which meant that the service only returned one page of results and the actual pagination logic was not covered.

This PR:

  • Fixes the underlying issue, changing the call from getSecretVersions (correct in Core v1, incorrect in Core v2) to getSecretVersionsNext (correct in Core v2)
  • Fixes pagination tests, limiting the max page size, to ensure full coverage. I will be going through the pagination tests for the other Key Vault libraries later today and will make a follow-up PR if needed.

@azure-sdk
Copy link
Copy Markdown
Collaborator

API change check

API changes are not detected in this pull request.

Copy link
Copy Markdown
Member

@xirzec xirzec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for debugging this one so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[KeyVault] listPropertiesOfSecretVersions failing from 2nd page

3 participants