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

Remove deprecated AWSRetry.backoff usage #1386

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changelogs/fragments/946-retries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
minor_changes:
- acm_certificate_info - Move to jittered backoff (https://github.com/ansible-collections/amazon.aws/pull/946).
- acm_certificate - Move to jittered backoff (https://github.com/ansible-collections/amazon.aws/pull/946).
- api_gateway_domain - Move to jittered backoff (https://github.com/ansible-collections/community.aws/pull/1386).
- waf_condition - Move to jittered backoff (https://github.com/ansible-collections/amazon.aws/pull/946).
- waf_info - Move to jittered backoff (https://github.com/ansible-collections/amazon.aws/pull/946).
- waf_rule - Move to jittered backoff (https://github.com/ansible-collections/amazon.aws/pull/946).
- waf_web_acl - Move to jittered backoff (https://github.com/ansible-collections/amazon.aws/pull/946).
8 changes: 4 additions & 4 deletions plugins/modules/acm_certificate_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
description:
- If provided, the results will be filtered to show only the certificate with this ARN.
- If no certificate with this ARN exists, this task will fail.
- If a certificate with this ARN exists in a different region, this task will fail
- If a certificate with this ARN exists in a different region, this task will fail.
aliases:
- arn
- arn
type: str
domain_name:
description:
Expand All @@ -43,8 +43,8 @@
author:
- Will Thames (@willthames)
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.aws
- amazon.aws.ec2
'''

EXAMPLES = r'''
Expand Down
16 changes: 8 additions & 8 deletions plugins/modules/api_gateway_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,20 +229,20 @@ def delete_domain(module, client):
return camel_dict_to_snake_dict(result)


retry_params = {"tries": 10, "delay": 5, "backoff": 1.2}
retry_params = {"delay": 5, "backoff": 1.2}


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def get_domain_name(client, domain_name):
return client.get_domain_name(domainName=domain_name)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def get_domain_mappings(client, domain_name):
return client.get_base_path_mappings(domainName=domain_name, limit=200).get('items', [])


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def create_domain_name(module, client, domain_name, certificate_arn, endpoint_type, security_policy):
endpoint_configuration = {'types': [endpoint_type]}

Expand All @@ -263,12 +263,12 @@ def create_domain_name(module, client, domain_name, certificate_arn, endpoint_ty
)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def add_domain_mapping(client, domain_name, base_path, rest_api_id, stage):
return client.create_base_path_mapping(domainName=domain_name, basePath=base_path, restApiId=rest_api_id, stage=stage)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def update_domain_name(client, domain_name, **kwargs):
patch_operations = []

Expand All @@ -281,12 +281,12 @@ def update_domain_name(client, domain_name, **kwargs):
return client.update_domain_name(domainName=domain_name, patchOperations=patch_operations)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def delete_domain_name(client, domain_name):
return client.delete_domain_name(domainName=domain_name)


@AWSRetry.backoff(**retry_params)
@AWSRetry.jittered_backoff(**retry_params)
def delete_domain_mapping(client, domain_name, base_path):
return client.delete_base_path_mapping(domainName=domain_name, basePath=base_path)

Expand Down