-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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(inputs.gnmi): Ensure path contains elements to avoid panic #15259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix @powersj, this should definitively be there! I think for the issue we should also check if the update is empty and drop processing early without error as here the path lookup isn't the issue but rather an empty message by the device.
@srebhan good point - I've pushed another commit, can you confirm that is the right place to bail? |
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @powersj!
(cherry picked from commit d6671eb)
Summary
In the event of an empty message, ensure the path actually contains segments to avoid a panic.
Checklist
Related issues
fixes: #15257