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(inputs.gnmi): Add option to explicitly trim field-names #13517

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Jun 28, 2023

resolves #13512

This PR adds an option to explicitly trim leading dots and slashes from field-names defaulting the new option to false (i.e. keep the leading dots and slashes). This is required to fix a regression where the field-names contain a leading slash for Telegraf versions before v1.27.0 in case a subpath matched the subscription. In this case the field-name still contained a leading slash.

@telegraf-tiger telegraf-tiger bot added area/gnmi fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jun 28, 2023
@srebhan
Copy link
Member Author

srebhan commented Jun 28, 2023

@protonmarco please note that you set the new trim_field_names option to true in your use-case. Sorry for the inconvenience, but we need to do it to fix a regression for all other users...

@telegraf-tiger
Copy link
Contributor

@protonmarco
Copy link

@srebhan Thanks for the heads up

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Will let you merge, but wanted to let you know I'm +1 before long weekend

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jul 4, 2023
@srebhan srebhan self-assigned this Jul 4, 2023
@clsmyth
Copy link

clsmyth commented Jul 6, 2023

Fix verified on my end; i am reporter of #13512

@srebhan srebhan merged commit cec60db into influxdata:master Jul 6, 2023
@srebhan srebhan deleted the gnmi_issue_13512 branch July 6, 2023 09:20
powersj pushed a commit that referenced this pull request Jul 10, 2023
@srebhan srebhan added this to the v1.27.2 milestone Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gnmi fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[plugins/inputs/gnmi] leading slash dropped from all paths in v1.27
4 participants