-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cloudfront_info pagination bug #780
Fix cloudfront_info pagination bug #780
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for digging into this.
I really like the use of boto3's pagination rather than something home-brew, however the decorator won't be able to do its thing without a minor tweak to the approach.
By catching ClientError and BotoCoreError within the methods the jittered backoff decorator never sees the rate limiting exceptions and thus can't retry the calls. To work around this I usually move just the pagination into a dedicated method, which can be wrapped, and the rest of the function (exception handling and all) can be done similar to the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor nit in the changelog, but otherwise LGTM
Co-authored-by: Mark Chappell <mchappel@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
SUMMARY
Currently the
cloudfront_info
module is using a bespoke paginator function, which is causing some issues when over 100 distributions exist (see linked issue), when in fact it can be easily switched to a nativeboto3
paginator that would fix the bug reported in the linked issue.Fixes #769
ISSUE TYPE
COMPONENT NAME
cloudfront_info
ADDITIONAL INFORMATION
Pagination docs: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudfront.html#paginators
Tests following steps from linked issue:
ran a ansible task:
Results: