envoyproxy / envoyproxy/gateway

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

オープン
#1,228 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
stale
主要言語
Go
スター
3k
フォーク
864
平均マージ
2日 2時間
マージ済み PR(30日)
140

説明

*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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。