-
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): Refactor alias handling #14553
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.
Not sure if my suggestion works but if it does that should be cleaner...
Rather than abritrarily take the substring of key, ensure that the key contains the alias in the first place, then do the removal. Otherwise, always take the base path. fixes: influxdata#14530
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!
@powersj assigning the PR back to you in case you want to wait for a confirmation in the issue... |
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
(cherry picked from commit 03eaae6)
Summary
Rather than arbitrarily take the substring of key, ensure that the key contains the alias in the first place, then do the removal. Otherwise, always take the base path.
This currently breaks existing tests, but further information needs to be gleaned to understand if that is ok or if we need further configuration options for this parsing.
Checklist
Related issues
fixes: #14530