envoyproxy / envoyproxy/gateway

Potential unused condition check in internal/xds/server/runner/runner.go

Aperta
#1,228 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
stale
Lingua principale
Go
Stelle
3k
Fork
864
Merge medio
2g 2h
PR unite (30g)
140

Descrizione

*Description*:
>Describe the issue.

There is a nil check in the
https://github.com/envoyproxy/gateway/blob/9036533c88ac786428ff6b173770875fc78c0de7/internal/xds/server/runner/runner.go#L137-L139

However, `r.cache` is initialized in https://github.com/envoyproxy/gateway/blob/9036533c88ac786428ff6b173770875fc78c0de7/internal/xds/server/runner/runner.go#L80 and `NewSnapshotCache` never returns a nil from it:
https://github.com/envoyproxy/gateway/blob/9036533c88ac786428ff6b173770875fc78c0de7/internal/xds/cache/snapshotcache.go#L108-L117

IMHO, the logger message is suspicious because the code around doesn't `init snapshot cache`. It could be a remnant of a previous refactor.

[optional *Relevant Links*:]
>Any extra documentation required to understand the issue.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.