-
Notifications
You must be signed in to change notification settings - Fork 398
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
Add AWSRetry.jittered_backoff to rds_instance_info #1026
Add AWSRetry.jittered_backoff to rds_instance_info #1026
Conversation
recheck |
Hey @kteague-tasktop at the moment as there are no set tests for the module plugin, the whole test suite is running covering all modules. If it's not too much trouble you could create a test target here for to create a RDS instance then a call to |
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 this. At the least we need some minimal integration tests.
Would you be able to update tests/integration/targets/rds_instance/ to include some basic tests of the _info module? they're just playbooks/roles that run in the CI account to test the functionality of modules
ac7eb57
to
f7b7045
Compare
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.
In the interest of getting this (good) extra feature merged, I've tweaked the PR to include fixes for @marknet15's comment.
@tremble @marknet15 can we merge this now? |
Backport to stable-3: 💚 backport PR created✅ Backport PR branch: Backported as #1213 🤖 @patchback |
Add AWSRetry.jittered_backoff to rds_instance_info SUMMARY Add AWSRetry.jittered_backoff to the rds_instance_info module. When calling rds_instance_info we have been seeing API rate limit errors from AWS. When calling this module, it usually runs to about 90-150 times in a minute before we get rate limited. Using jittered_backoff should significantly decrease the number of times we see API rate limits here. 02:20:36 An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded 02:20:36 fatal: [polaris -> localhost]: FAILED! => {"boto3_version": "1.20.22", "botocore_version": "1.23.22", "changed": false, "error": {"code": "Throttling", "message": "Rate exceeded", "type": "Sender"}, "msg": "Couldn't get instance information: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded", "response_metadata": {"http_headers": {"connection": "close", "content-length": "254", "content-type": "text/xml", "date": "Tue, 15 Mar 2022 09:20:34 GMT", "x-amzn-requestid": "5de8131e-3f59-4b04-af25-5f7083ee09b9"}, "http_status_code": 400, "max_attempts_reached": true, "request_id": "5de8131e-3f59-4b04-af25-5f7083ee09b9", "retry_attempts": 4}} ISSUE TYPE Bugfix Pull Request COMPONENT NAME rds_instance_info ADDITIONAL INFORMATION Decorated rds_instance_info with AWSRetry.jittered_backoff Reviewed-by: Mark Woolley <[email protected]> Reviewed-by: Mark Chappell <None> (cherry picked from commit 6a2793a)
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
[PR #1026/6a2793af backport][stable-3] Add AWSRetry.jittered_backoff to rds_instance_info This is a backport of PR #1026 as merged into main (6a2793a). SUMMARY Add AWSRetry.jittered_backoff to the rds_instance_info module. When calling rds_instance_info we have been seeing API rate limit errors from AWS. When calling this module, it usually runs to about 90-150 times in a minute before we get rate limited. Using jittered_backoff should significantly decrease the number of times we see API rate limits here. 02:20:36 An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded 02:20:36 fatal: [polaris -> localhost]: FAILED! => {"boto3_version": "1.20.22", "botocore_version": "1.23.22", "changed": false, "error": {"code": "Throttling", "message": "Rate exceeded", "type": "Sender"}, "msg": "Couldn't get instance information: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded", "response_metadata": {"http_headers": {"connection": "close", "content-length": "254", "content-type": "text/xml", "date": "Tue, 15 Mar 2022 09:20:34 GMT", "x-amzn-requestid": "5de8131e-3f59-4b04-af25-5f7083ee09b9"}, "http_status_code": 400, "max_attempts_reached": true, "request_id": "5de8131e-3f59-4b04-af25-5f7083ee09b9", "retry_attempts": 4}} ISSUE TYPE Bugfix Pull Request COMPONENT NAME rds_instance_info ADDITIONAL INFORMATION Decorated rds_instance_info with AWSRetry.jittered_backoff Reviewed-by: Markus Bergholz <[email protected]>
…ns#1026) Add AWSRetry.jittered_backoff to rds_instance_info SUMMARY Add AWSRetry.jittered_backoff to the rds_instance_info module. When calling rds_instance_info we have been seeing API rate limit errors from AWS. When calling this module, it usually runs to about 90-150 times in a minute before we get rate limited. Using jittered_backoff should significantly decrease the number of times we see API rate limits here. 02:20:36 An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded 02:20:36 fatal: [polaris -> localhost]: FAILED! => {"boto3_version": "1.20.22", "botocore_version": "1.23.22", "changed": false, "error": {"code": "Throttling", "message": "Rate exceeded", "type": "Sender"}, "msg": "Couldn't get instance information: An error occurred (Throttling) when calling the DescribeDBInstances operation (reached max retries: 4): Rate exceeded", "response_metadata": {"http_headers": {"connection": "close", "content-length": "254", "content-type": "text/xml", "date": "Tue, 15 Mar 2022 09:20:34 GMT", "x-amzn-requestid": "5de8131e-3f59-4b04-af25-5f7083ee09b9"}, "http_status_code": 400, "max_attempts_reached": true, "request_id": "5de8131e-3f59-4b04-af25-5f7083ee09b9", "retry_attempts": 4}} ISSUE TYPE Bugfix Pull Request COMPONENT NAME rds_instance_info ADDITIONAL INFORMATION Decorated rds_instance_info with AWSRetry.jittered_backoff Reviewed-by: Mark Woolley <[email protected]> Reviewed-by: Mark Chappell <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections@6a2793a
…ons#1026) inventory/aws_ec2: allow multi-entries for one host Depends-On: ansible-collections#1066 Add an option to allow multiple duplicated entries for one single instance. Closes: ansible-collections#950 Reviewed-by: Alina Buzachis <None> Reviewed-by: Jill R <None> Reviewed-by: Gonéri Le Bouder <[email protected]> Reviewed-by: Markus Bergholz <[email protected]>
SUMMARY
Add AWSRetry.jittered_backoff to the rds_instance_info module.
When calling
rds_instance_info
we have been seeing API rate limit errors from AWS. When calling this module, it usually runs to about 90-150 times in a minute before we get rate limited.Using jittered_backoff should significantly decrease the number of times we see API rate limits here.
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
Decorated rds_instance_info with AWSRetry.jittered_backoff