Skip to content
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

iam_role_info jittered backoff #748

Merged
merged 4 commits into from
Oct 10, 2021

Conversation

marknet15
Copy link
Contributor

@marknet15 marknet15 commented Oct 8, 2021

SUMMARY

Sometimes some rate limiting exceptions on the lookups still cause failures, I've switched the iam_role_info to jittered_backoff in a similar vein to:
#324

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

iam_role_info

@marknet15 marknet15 marked this pull request as ready for review October 8, 2021 17:26
@ansibullbot
Copy link

@ansibullbot ansibullbot added bug This issue/PR relates to a bug community_review module module needs_triage plugins plugin (any type) labels Oct 8, 2021
Comment on lines 217 to 219
@AWSRetry.jittered_backoff()
def _list_policies(connection):
paginator = connection.get_paginator('list_policies')
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately the decorator needs to stay outside the function here. (but switching to jittered_backoff is generally a good idea)

The retry decorator we use isn't clever enough to delve into the innards or build_full_results and do what you'd expect with aws_retry. (I did look into it it's a rather complex web of calls deep in boto3

plugins/modules/iam_role_info.py Show resolved Hide resolved
plugins/modules/iam_role_info.py Show resolved Hide resolved
@tremble tremble added the gate label Oct 10, 2021
Copy link
Contributor

@ansible-zuul ansible-zuul bot left a comment

Choose a reason for hiding this comment

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

LGTM!

@ansible-zuul ansible-zuul bot merged commit e42b0d9 into ansible-collections:main Oct 10, 2021
@marknet15 marknet15 deleted the iam-backoff branch October 10, 2021 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants