-
Notifications
You must be signed in to change notification settings - Fork 119
Update comments for AWS SDK logging and retryer #1303
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -61,29 +61,28 @@ type Config struct { | |||||||||||||||||
| // certificate chain and host name | ||||||||||||||||||
| InsecureSkipTLSVerify bool `bson:"insecureSkipTLSVerify" json:"insecureSkipTLSVerify" yaml:"insecureSkipTLSVerify"` | ||||||||||||||||||
|
|
||||||||||||||||||
| // DebugLogLevels enables AWS SDK debug logging (sub)levels. Available options: | ||||||||||||||||||
| // LogDebug, Signing, HTTPBody, RequestRetries, RequestErrors, EventStreamBody | ||||||||||||||||||
| // | ||||||||||||||||||
| // Any sub levels will enable LogDebug level accordingly to AWS SDK Go module behavior | ||||||||||||||||||
| // https://pkg.go.dev/github.com/aws/aws-sdk-go@v1.40.7/aws#LogLevelType | ||||||||||||||||||
| // DebugLogLevels enables AWS SDK logging levels. Available options: | ||||||||||||||||||
| // Signing, Retries, Request, RequestWithBody, Response, ResponseWithBody, DeprecatedUsage, RequestEventMessage | ||||||||||||||||||
| // and deprecated: LogDebug, HTTPBody, RequestRetries, RequestErrors, EventStreamBody | ||||||||||||||||||
| // Above values are translated to match the AWS SDK V2: | ||||||||||||||||||
|
||||||||||||||||||
| // Above values are translated to match the AWS SDK V2: | |
| // Values are parsed into AWS SDK v2 ClientLogMode; deprecated names are mapped | |
| // to the corresponding v2 flags for backward compatibility: |
Copilot
AI
Apr 8, 2026
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.
The Retryer field comment states "it's implemented with standard retryable, and delay behavior" and links to a specific aws-sdk-go-v2 GitHub tag. In this codebase the implementation is NewCustomRetryer (wrapping retry.NewStandard and enforcing a minimum backoff) and the pinned SDK version may differ over time, so the hardcoded GitHub URL/tag can become stale. Please reword to describe the local implementation (and/or link to aws/retry docs) without tying the comment to a specific upstream tag.
| // Retryer is a configuration for aws.Retryer | |
| // https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Retryer | |
| // it's implemented with standard retryable, and delay behavior | |
| // see also: https://github.com/aws/aws-sdk-go-v2/blob/v1.41.5/aws/retry/standard.go | |
| // Retryer configures the aws.Retryer used by the local custom retryer implementation. | |
| // https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Retryer | |
| // The implementation wraps the AWS SDK standard retryer behavior and applies the | |
| // configured retry delay settings, including enforcing a minimum retry delay. |
Copilot
AI
Apr 8, 2026
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.
NumMaxRetries comment uses Markdown formatting ("additional") and has an extra space after the field name. Go doc comments are rendered as plain text; please drop Markdown emphasis and keep formatting consistent (e.g., "NumMaxRetries is the number of additional retry attempts"), matching the NewCustomRetryer behavior of MaxAttempts = numMaxRetries + 1.
| // NumMaxRetries is the number of **additional** max attempts that should be made | |
| // NumMaxRetries is the number of additional retry attempts that should be made |
Copilot
AI
Apr 8, 2026
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.
The MaxRetryDelay comment is misleading: it currently reads as if this value is "the duration between retried attempts", but the implementation passes it as retry.StandardOptions.MaxBackoff (a maximum cap on the computed exponential-jitter backoff). Please update the comment to reflect that it is a maximum backoff / maximum retry delay cap, not a fixed delay between attempts.
| // MaxRetryDelay is the duration between retried attempts (using ExponentialJitterBackoff) | |
| // MaxRetryDelay is the maximum backoff / retry delay cap for retried attempts (using ExponentialJitterBackoff) |
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.
The DebugLogLevels comment lists supported values, but it omits
ResponseEventMessage, which is accepted bytoClientLogMode(and defined inSDKDebugLogLevel). Please update the comment to includeResponseEventMessageso configuration docs match actual behavior.