mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 00:23:18 +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
|
- path: _test.go
|
||||||
linters:
|
linters:
|
||||||
- errcheck
|
- errcheck
|
||||||
- path: discovery/
|
|
||||||
linters:
|
|
||||||
- errorlint
|
|
||||||
- path: scrape/
|
- path: scrape/
|
||||||
linters:
|
linters:
|
||||||
- errorlint
|
- errorlint
|
||||||
|
@ -15,6 +15,7 @@ package kubernetes
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -183,7 +184,7 @@ func (e *EndpointSlice) Run(ctx context.Context, ch chan<- []*targetgroup.Group)
|
|||||||
cacheSyncs = append(cacheSyncs, e.nodeInf.HasSynced)
|
cacheSyncs = append(cacheSyncs, e.nodeInf.HasSynced)
|
||||||
}
|
}
|
||||||
if !cache.WaitForCacheSync(ctx.Done(), cacheSyncs...) {
|
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")
|
level.Error(e.logger).Log("msg", "endpointslice informer unable to sync cache")
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user