Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v15] Fix list all access list members/reviews pagination. (#37673)
* Fix list all access list members pagination. Two things were happening that was preventing the cache of access list members from initializing if the number of members was greater than the default page size of 200: 1. The incorrect page token was being used in the ListAllAccessListMembers call. 2. The pagination key for listing all of these members was incorrect due to the use of sub-prefixes. Both issues have been corrected. The ListAllAccessListMembers call in the access list service now uses its own custom pagination logic. * Realized reviews suffer from the same problem. * Simplify nextKey calc. * Use a function that returns the next element and allow the caller to construct their own next key. * Use *T instead of making Resource comparable. * Cleanup code, use nils instead of named return, eliminate named returns to avoid confusion.
- Loading branch information
Showing
4 changed files
with
196 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters