Skip to content

Reduce Boto3 retrial attempts to 1 #48

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Reduce Boto3 retrial attempts to 1 #48

wants to merge 3 commits into from

Conversation

tfcerda
Copy link

@tfcerda tfcerda commented Jan 13, 2023

Reducing Boto3 retrial attempts to at most 1. This is to prevent unnecessary ConfigureAgent invocations when facing 429 responses.

Unfortunately Boto3 does not allow customizing the retrial strategy for a specific operation and specific error, as the Java SDK allows. This means that the PostAgentProfile call is also affected by this retrial reduction. I believe this is acceptable. Worst case scenario some 5 minutes profiles will be delayed or dropped.

Also removing Ubuntu when building Python 3.6. Unfortunately this does not work anymore. See issue actions/setup-python#544 and broken build https://github.com/aws/amazon-codeguru-profiler-python-agent/actions/runs/3910603314/jobs/6682991145.

I also had to update a test as it does not work anymore with latest Python versions. The integer value was too big and runs into error: ValueError: Exceeds the limit (4300) for integer string conversion; use sys.set_int_max_str_digits() to increase the limit. Using sys.set_int_max_str_digits() failed as well. I chose to use a CPU consuming loop to test this.

Finally, I removed Python 3.6 as one the Lambda layers we release. Python 3.6 is not supported anymore by Lambda. See https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@tfcerda tfcerda requested a review from PapaPedro January 13, 2023 11:40
@tfcerda tfcerda self-assigned this Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant