Paginate ListHostedZones when listing hosted zones - #4892
Paginate ListHostedZones when listing hosted zones#4892shashankvarma499 wants to merge 1 commit into
Conversation
listHostedZones called ListHostedZones once with no pagination. The AWS API returns at most 100 zones per page, so accounts with more than 100 hosted zones silently dropped zones beyond the first page. GetHostedZoneID then reported "no hosted zone found" for valid domains whose parent zone landed on a later page. Loop over pages using IsTruncated/NextMarker until all zones are listed. Fixes kubernetes-sigs#4832 Signed-off-by: Shashank Varma <324153016+shashankvarma499@users.noreply.github.com>
|
Invalid commit message issues detected Invalid commit messagesKeywords which can automatically close issues and hashtag(#) mentions are not allowed.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: shashankvarma499 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @shashankvarma499! |
|
Hi @shashankvarma499. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What this PR does
Fixes #4832.
listHostedZonescalledListHostedZonesonce with no pagination. The AWS API returns at most 100 zones per page, so accounts with more than 100 hosted zones silently dropped zones beyond the first page.GetHostedZoneIDthen reported "no hosted zone found" for valid domains whose parent zone landed on a later page (e.g. a sub-subdomain whosedomain.tldzone was on page 2).Changes
Loop over pages using
IsTruncated/NextMarkeruntil all zones are listed.Verification
go test ./pkg/aws/services/... -count=1passes. (listHostedZonesuses a concrete*route53.Client, so the pagination path isn't unit-tested with the current mock infra — happy to add a mock-transport test if maintainers prefer.)