Skip to content

Commit

Permalink
Add retries to elb / target group info modules (#1113)
Browse files Browse the repository at this point in the history
SUMMARY

Currently there is backoff retries applied with 10 attempts overall, but due to the pagination its defaulting back to 4

ISSUE TYPE

    Bugfix Pull Request

COMPONENT NAME

elb_application_lb_info
elb_target_group_info

ADDITIONAL INFORMATION
  • Loading branch information
marknet15 authored May 17, 2022
1 parent 9f3eb48 commit 8794784
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/1113-up-pagainated-retries-alb-info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bugfixes:
- elb_application_lb_info - Up default value AWS backoff retries for paginated calls. (https://github.com/ansible-collections/community.aws/pull/1113).
- elb_target_group_info - Up default value AWS backoff retries for paginated calls. (https://github.com/ansible-collections/community.aws/pull/1113).
2 changes: 1 addition & 1 deletion plugins/modules/elb_application_lb_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry, boto3_tag_list_to_ansible_dict


@AWSRetry.jittered_backoff()
@AWSRetry.jittered_backoff(retries=10)
def get_paginator(connection, **kwargs):
paginator = connection.get_paginator('describe_load_balancers')
return paginator.paginate(**kwargs).build_full_result()
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/elb_target_group_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry, boto3_tag_list_to_ansible_dict


@AWSRetry.jittered_backoff()
@AWSRetry.jittered_backoff(retries=10)
def get_paginator(**kwargs):
paginator = client.get_paginator('describe_target_groups')
return paginator.paginate(**kwargs).build_full_result()
Expand Down

0 comments on commit 8794784

Please sign in to comment.