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

Reduce Retry Time And Add imds Fallback Client #62

Merged

Conversation

sethAmazon
Copy link

Description:
Reduce imds retry time to match downstream.

Link to tracking Issue:
N/A

Testing:
Tested downstream retry. This code is copied.

Documentation:
N/A

@sethAmazon sethAmazon requested a review from jefchien July 27, 2023 22:36
@sethAmazon sethAmazon marked this pull request as draft July 27, 2023 23:05
@sethAmazon sethAmazon marked this pull request as ready for review July 27, 2023 23:38
@sethAmazon sethAmazon marked this pull request as draft July 27, 2023 23:58
@sethAmazon sethAmazon changed the title Reduce Retry Time Reduce Retry Time And Add imds Fallback Client Jul 28, 2023
@sethAmazon sethAmazon marked this pull request as ready for review July 28, 2023 00:21
okankoAMZ
okankoAMZ previously approved these changes Jul 28, 2023
Add A Zap Logger To Imds Retryer And Reduce Retry Time

Add Fallback Imds Client
@sethAmazon
Copy link
Author

sethAmazon commented Jul 28, 2023

hostInfo.EC2Hostname = ec2HostnameInner
} else {
logger.Warn("Failed to get EC2 hostname", zap.Error(err))
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to change the datadog exporter?
Do we somehow rely on code from this exporter in ours?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we do not. I just did a search for where imds was called and added the code there. I can remove this if need be, but I think it is fine to keep it.

@@ -33,28 +34,28 @@ import (
var IMDSRetryer request.Retryer = newIMDSRetryer()

const (
TimePerCall = 2 * time.Minute
TimePerCall = 30 * time.Second

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the context for reducing this TimePerCall?
Business decision?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a flaky test for 2 minutes in the private. I changed it to 30 seconds there so I changed it to 30 seconds here to match.

@sethAmazon sethAmazon merged commit d1a9d11 into amazon-contributing:aws-cwa-dev Jul 28, 2023
72 of 73 checks passed
@sethAmazon sethAmazon deleted the reduce-retry-time branch July 28, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants