ci(lint): enable errorlint on discovery (#12918)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL 2023-10-31 12:46:55 +01:00 committed by GitHub
parent 8e5f0387a2
commit 68e6b4dd34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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