Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic in case the resourceType is not know by the caches #1036

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

alandiegosantos
Copy link
Contributor

The MuxCache and the LinearCache relies on sending a nil value in the channel to notify that the stream should be closed. This behaviour causes the xds server to panic because the code expects that the conversion succeeds, otherwise it panics.

This MR adds a check in the beginning to check if value is nil. If it is, close the stream, otherwise, proceed as usual.

Copy link
Contributor

@valerian-roche valerian-roche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good to me, but is it possible to add a test for it?

pkg/server/sotw/v3/xds.go Show resolved Hide resolved
Signed-off-by: Alan Diego <[email protected]>
@alecholmez alecholmez merged commit 6c7a557 into envoyproxy:main Nov 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants