diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-06-10 11:55:22 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-06-10 11:11:33 +0000 |
| commit | 8937fbd020205c74164f5912c8e36a5f6404a657 (patch) | |
| tree | c68eba9aefa1727b6661716622622d06557f194c /syz-ci/manager.go | |
| parent | 4826c28ef2aca1ee7dba7111e48d3b6a9c83d9a8 (diff) | |
syz-ci: don't report context.Canceled errors
After #6066, we have started to see a number of log messages about
bench/corpus uploads aborted due to context cancelation. These messages
are not of any value.
Ignore Errorf() calls where one of the arguments encloses a
context.Canceled error. This is probably a bit hacky, but at least
prevents repeating errors.Is(err, context.Canceled) for every call that
may be canceled.
Diffstat (limited to 'syz-ci/manager.go')
| -rw-r--r-- | syz-ci/manager.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/syz-ci/manager.go b/syz-ci/manager.go index 2036805c9..f21933118 100644 --- a/syz-ci/manager.go +++ b/syz-ci/manager.go @@ -1082,6 +1082,16 @@ func uploadFileHTTPPut(ctx context.Context, URL string, file io.Reader) error { // Errorf logs non-fatal error and sends it to dashboard. func (mgr *Manager) Errorf(msg string, args ...interface{}) { + for _, arg := range args { + err, _ := arg.(error) + if err == nil { + continue + } + if errors.Is(err, context.Canceled) { + // Context cancelation-related errors only create unnecessary noise. + return + } + } log.Errorf(mgr.name+": "+msg, args...) if mgr.dash != nil { mgr.dash.LogError(mgr.name, msg, args...) |
