mirror of
https://github.com/prometheus/prometheus
synced 2024-12-25 16:02:28 +00:00
ci(lint): enable errorlint on discovery (#12918)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
parent
8e5f0387a2
commit
68e6b4dd34
@ -33,9 +33,6 @@ issues:
|
||||
- path: _test.go
|
||||
linters:
|
||||
- errcheck
|
||||
- path: discovery/
|
||||
linters:
|
||||
- errorlint
|
||||
- path: scrape/
|
||||
linters:
|
||||
- errorlint
|
||||
|
@ -15,6 +15,7 @@ package kubernetes
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"strconv"
|
||||
@ -183,7 +184,7 @@ func (e *EndpointSlice) Run(ctx context.Context, ch chan<- []*targetgroup.Group)
|
||||
cacheSyncs = append(cacheSyncs, e.nodeInf.HasSynced)
|
||||
}
|
||||
if !cache.WaitForCacheSync(ctx.Done(), cacheSyncs...) {
|
||||
if ctx.Err() != context.Canceled {
|
||||
if !errors.Is(ctx.Err(), context.Canceled) {
|
||||
level.Error(e.logger).Log("msg", "endpointslice informer unable to sync cache")
|
||||
}
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user