envoyproxy / envoyproxy/gateway
Potential unused condition check in internal/xds/server/runner/runner.go
- Langage dominant
- Go
- Étoiles
- 3k
- Forks
- 864
- Merge moyen
- 2 j 2 h
- PR mergées (30 j)
- 140
Description
*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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.