Add debug logging messages on retry#549
Conversation
|
Let's see if CI likes it: bors try |
|
ok great! I think we should probably first review/merge #548, then merge this on top. |
|
Merge conflict. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
952895b to
f5c8cc7
Compare
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 <5846501+ericphanson@users.noreply.github.com> Co-authored-by: Matt Brzezinski <matt.brzezinski@beacon.bio>
|
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 <5846501+ericphanson@users.noreply.github.com> Co-authored-by: Matt Brzezinski <matt.brzezinski@beacon.bio>
| return nothing | ||
| end | ||
|
|
||
| check = (s, e) -> begin |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| check = (s, e) -> begin | |
| check = | |
| (s, e) -> begin |
|
|
||
| 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.
[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.
[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.
[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.
[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.
[JuliaFormatter] reported by reviewdog 🐶
| return true | |
| ) exception = e | |
| return true |
| 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.
[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 = |
| ) exception = e | ||
| return true |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| ) exception = e | |
| return true | |
| return false |
| @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.
[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.
[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: |
| 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.
[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 |
|
|
||
| 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.
[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.
[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.
[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.
[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.