[2.12] Handle pagination in EKS AWS ListRoles request #13730
Merged
+71
−63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #11554
Occurred changes and/or fixed issues
This PR updates aws api calls made in the EKS provisioning form to account for pagination. The instance type api call already handled pagination.
describeKeyPairs
anddescribeSecurityGroups
are not paginated.Technical notes summary
DescribeAddonVersions
ListRoles
DescribeLaunchTemplates
DescribeKeyPairs - not paginated
ListKeys
DescribeVpcs
DescribeSubnets
DescribeSecurityGroups - not paginated
Areas or cases that should be tested
We have too few of most types of resources to get paginated responses from aws by default. I found the easiest way to test pagination was to alter the dashboard code to lower the number of items returned in a response. Different API calls use a different parameter to do that: describeX calls accept
MaxIResults
whileListRoles
acceptsMaxItems
andListKeys
acceptsLimit
egconst addons = await this.$store.dispatch('aws/depaginateList', { client: eksClient, cmd: 'describeAddonVersions', opt:{MaxResults: 3} });
To verify pagination, you may set a limit on the number of items returned per request, then watch the network tab and verify that multiple requests are made to fetch all items
Checklist