-
Notifications
You must be signed in to change notification settings - Fork 191
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
Detect wrapped url error timeout #473
Conversation
@@ -137,7 +137,11 @@ func (e *EncodingStreamer) Start(ctx context.Context) error { | |||
// ignore canceled errors because canceled encoding requests are normal | |||
continue | |||
} | |||
e.logger.Error("error processing encoded blobs", "err", err) | |||
if strings.Contains(err.Error(), "too many requests") { | |||
e.logger.Warn("error processing encoded blobs", "err", err) |
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.
downgraded this case as it happens quite often and it's safe to ignore
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.
Maybe remove error
from the Warning message. So what is the source of too many requests
? Are we being rate limited when this occurs?
@@ -137,7 +137,11 @@ func (e *EncodingStreamer) Start(ctx context.Context) error { | |||
// ignore canceled errors because canceled encoding requests are normal | |||
continue | |||
} | |||
e.logger.Error("error processing encoded blobs", "err", err) | |||
if strings.Contains(err.Error(), "too many requests") { | |||
e.logger.Warn("error processing encoded blobs", "err", err) |
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.
Maybe remove error
from the Warning message. So what is the source of too many requests
? Are we being rate limited when this occurs?
if strings.Contains(err.Error(), "too many requests") { | ||
e.logger.Warn("error processing encoded blobs", "err", err) | ||
} else { | ||
e.logger.Error("error processing encoded blobs", "err", err) |
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.
I feel like it could be confusing to use the same message for a Warning (which is safe to ignore) vs Error which are not safe to ignore. Can we change the error message in a way that is more provocative call to action.
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.
Updated the message for warning
5daa375
to
3dd2f17
Compare
Why are these changes needed?
Current way of detecting url error with type assertion doesn't work if the
err
being matched is wrapping url error.This PR updates it so that it matches a url error from the error tree and then calling
Timeout
from the matched instance.playground: https://goplay.tools/snippet/reDY2KH7bUD
Checks