Reduce Boto3 retrial attempts to 1 #48
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
. Usingsys.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.