-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add debug logging messages on retry #549
Conversation
Let's see if CI likes it: bors try |
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.
LGTM!
ok great! I think we should probably first review/merge #548, then merge this on top. |
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.
bors r+
Merge conflict. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
952895b
to
f5c8cc7
Compare
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.
bors r+
549: Add debug logging messages on retry r=mattBrzezinski a=ericphanson Closes #514 Based on #548 The logging messages are structured so the string is a human-readable summary of the message, and then the fields are more structured for later analysis, e.g. `retry::Bool`, `reason::String`, etc. Additionally, the id of the log message will be useful for aggregation. Co-authored-by: Eric Hanson <[email protected]> Co-authored-by: Matt Brzezinski <[email protected]>
Build failed: |
bors r+ |
549: Add debug logging messages on retry r=mattBrzezinski a=ericphanson Closes #514 Based on #548 The logging messages are structured so the string is a human-readable summary of the message, and then the fields are more structured for later analysis, e.g. `retry::Bool`, `reason::String`, etc. Additionally, the id of the log message will be useful for aggregation. Co-authored-by: Eric Hanson <[email protected]> Co-authored-by: Matt Brzezinski <[email protected]>
@@ -110,6 +110,19 @@ function _http_request(backend::DownloadsBackend, request::Request, response_str | |||
return nothing | |||
end | |||
|
|||
check = (s, e) -> begin |
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.
[JuliaFormatter] reported by reviewdog 🐶
check = (s, e) -> begin | |
check = | |
(s, e) -> begin |
src/utilities/downloads_backend.jl
Outdated
@@ -110,6 +110,19 @@ function _http_request(backend::DownloadsBackend, request::Request, response_str | |||
return nothing | |||
end | |||
|
|||
check = (s, e) -> begin | |||
if isa(e, HTTP.StatusError) && AWS._http_status(e) >= 500 | |||
@debug "AWS.jl Downloads inner retry for status >= 500" retry=true reason="status >= 500" status=_http_status(e) exception=e |
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.
[JuliaFormatter] reported by reviewdog 🐶
@debug "AWS.jl Downloads inner retry for status >= 500" retry=true reason="status >= 500" status=_http_status(e) exception=e | |
@debug "AWS.jl Downloads inner retry for status >= 500" retry = true reason = "status >= 500" status = _http_status( | |
e | |
) exception = e |
@debug "AWS.jl Downloads inner retry for status >= 500" retry=true reason="status >= 500" status=_http_status(e) exception=e | ||
return true | ||
elseif isa(e, Downloads.RequestError) | ||
@debug "AWS.jl Downloads inner retry for Downloads.RequestError" retry=true reason="Downloads.RequestError" exception=e |
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.
[JuliaFormatter] reported by reviewdog 🐶
@debug "AWS.jl Downloads inner retry for Downloads.RequestError" retry=true reason="Downloads.RequestError" exception=e | |
@debug "AWS.jl Downloads inner retry for Downloads.RequestError" retry = | |
true reason = "Downloads.RequestError" exception = e |
@debug "AWS.jl Downloads inner retry for Downloads.RequestError" retry=true reason="Downloads.RequestError" exception=e | ||
return true | ||
else | ||
@debug "AWS.jl Downloads inner retry declined" retry=false reason="Exception passed onwards" exception=e |
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.
[JuliaFormatter] reported by reviewdog 🐶
@debug "AWS.jl Downloads inner retry declined" retry=false reason="Exception passed onwards" exception=e | |
@debug "AWS.jl Downloads inner retry declined" retry = false reason = "Exception passed onwards" exception = | |
e |
check = (s, e) -> begin | ||
# Pass on non-AWS exceptions. | ||
if !(e isa AWSException) | ||
@debug "AWS.jl declined to retry non-AWSException" retry=false reason="Non-AWSException" exception=e | ||
return false | ||
end |
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.
[JuliaFormatter] reported by reviewdog 🐶
check = (s, e) -> begin | |
# Pass on non-AWS exceptions. | |
if !(e isa AWSException) | |
@debug "AWS.jl declined to retry non-AWSException" retry=false reason="Non-AWSException" exception=e | |
return false | |
end | |
check = | |
(s, e) -> begin | |
# Pass on non-AWS exceptions. | |
if !(e isa AWSException) | |
@debug "AWS.jl declined to retry non-AWSException" retry = false reason = "Non-AWSException" exception = | |
e | |
return false | |
end |
if isa(e, error) | ||
@debug "AWS.jl HTTP inner retry for $error" retry = true reason = "$error" exception = | ||
e | ||
return true |
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.
[JuliaFormatter] reported by reviewdog 🐶
return true | |
) exception = e | |
return true |
src/utilities/request.jl
Outdated
end | ||
if (isa(e, HTTP.StatusError) && _http_status(e) >= 500) | ||
@debug "AWS.jl HTTP inner retry for status >= 500" retry = true reason = "status >= 500" status = AWS._http_status( |
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.
[JuliaFormatter] reported by reviewdog 🐶
end | |
if (isa(e, HTTP.StatusError) && _http_status(e) >= 500) | |
@debug "AWS.jl HTTP inner retry for status >= 500" retry = true reason = "status >= 500" status = AWS._http_status( | |
@debug "AWS.jl HTTP inner retry declined" retry = false reason = "Exception passed onwards" exception = |
src/utilities/request.jl
Outdated
) exception = e | ||
return true |
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.
[JuliaFormatter] reported by reviewdog 🐶
) exception = e | |
return true | |
return false |
src/utilities/request.jl
Outdated
@debug "AWS.jl HTTP inner retry declined" retry = false reason = "Exception passed onwards" exception = | ||
e | ||
return false | ||
end |
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.
[JuliaFormatter] reported by reviewdog 🐶
@debug "AWS.jl HTTP inner retry declined" retry = false reason = "Exception passed onwards" exception = | |
e | |
return false | |
end |
record.level == Logging.Debug && | ||
get(record.kwargs, :retry, nothing) == successful |
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.
[JuliaFormatter] reported by reviewdog 🐶
record.level == Logging.Debug && | |
get(record.kwargs, :retry, nothing) == successful | |
record.level == Logging.Debug && get(record.kwargs, :retry, nothing) == successful |
Build failed: |
bors try |
tryBuild failed: |
@@ -147,52 +147,71 @@ function submit_request(aws::AbstractAWSConfig, request::Request; return_headers | |||
if e isa HTTP.StatusError | |||
e = AWSException(e, stream) | |||
rethrow(e) | |||
elseif !(e isa AWSException) | |||
@debug "AWS.jl declined to retry non-AWSException" retry=false reason="Non-AWSException" exception=e |
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.
[JuliaFormatter] reported by reviewdog 🐶
@debug "AWS.jl declined to retry non-AWSException" retry=false reason="Non-AWSException" exception=e | |
@debug "AWS.jl declined to retry non-AWSException" retry = false reason = "Non-AWSException" exception = | |
e |
bors try |
tryBuild failed: |
bors try |
@@ -110,6 +110,19 @@ function _http_request(backend::DownloadsBackend, request::Request, response_str | |||
return nothing | |||
end | |||
|
|||
check = (s, e) -> begin | |||
if isa(e, HTTP.StatusError) && AWS._http_status(e) >= 500 | |||
@debug "AWS.jl Downloads inner retry for status >= 500" retry=true reason="status >= 500" status=AWS._http_status(e) exception=e |
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.
[JuliaFormatter] reported by reviewdog 🐶
@debug "AWS.jl Downloads inner retry for status >= 500" retry=true reason="status >= 500" status=AWS._http_status(e) exception=e | |
@debug "AWS.jl Downloads inner retry for status >= 500" retry = true reason = "status >= 500" status = AWS._http_status( | |
e | |
) exception = e |
check = (s, e) -> begin | ||
errors = (Sockets.DNSError, HTTP.ParseError, Base.IOError) | ||
for error in errors | ||
if isa(e, error) | ||
@debug "AWS.jl HTTP inner retry for $error" retry=true reason="$error" exception=e |
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.
[JuliaFormatter] reported by reviewdog 🐶
check = (s, e) -> begin | |
errors = (Sockets.DNSError, HTTP.ParseError, Base.IOError) | |
for error in errors | |
if isa(e, error) | |
@debug "AWS.jl HTTP inner retry for $error" retry=true reason="$error" exception=e | |
check = | |
(s, e) -> begin | |
errors = (Sockets.DNSError, HTTP.ParseError, Base.IOError) | |
for error in errors | |
if isa(e, error) | |
@debug "AWS.jl HTTP inner retry for $error" retry = true reason = "$error" exception = | |
e | |
return true | |
end | |
end | |
if (isa(e, HTTP.StatusError) && _http_status(e) >= 500) | |
@debug "AWS.jl HTTP inner retry for status >= 500" retry = true reason = "status >= 500" status = _http_status( | |
e | |
) exception = e |
@debug "AWS.jl HTTP inner retry for $error" retry=true reason="$error" exception=e | ||
return true | ||
end | ||
end |
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.
[JuliaFormatter] reported by reviewdog 🐶
end | |
@debug "AWS.jl HTTP inner retry declined" retry = false reason = "Exception passed onwards" exception = | |
e | |
return false | |
end |
if (isa(e, HTTP.StatusError) && _http_status(e) >= 500) | ||
@debug "AWS.jl HTTP inner retry for status >= 500" retry=true reason="status >= 500" status=_http_status(e) exception=e | ||
return true | ||
end | ||
@debug "AWS.jl HTTP inner retry declined" retry=false reason="Exception passed onwards" exception=e | ||
return false | ||
end |
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.
[JuliaFormatter] reported by reviewdog 🐶
if (isa(e, HTTP.StatusError) && _http_status(e) >= 500) | |
@debug "AWS.jl HTTP inner retry for status >= 500" retry=true reason="status >= 500" status=_http_status(e) exception=e | |
return true | |
end | |
@debug "AWS.jl HTTP inner retry declined" retry=false reason="Exception passed onwards" exception=e | |
return false | |
end |
bors try |
tryAlready running a review |
tryBuild failed: |
bors try |
tryBuild failed: |
Discussed offline, but we'll be revising how to properly introduce debugging here, closing this PR for now. |
Closes #514
Based on #548
The logging messages are structured so the string is a human-readable summary of the message, and then the fields are more structured for later analysis, e.g.
retry::Bool
,reason::String
, etc. Additionally, the id of the log message will be useful for aggregation.