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): Refactor alias handling #14553

Merged
merged 2 commits into from
Jan 25, 2024
Merged

Conversation

powersj
Copy link
Contributor

@powersj powersj commented Jan 9, 2024

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

  • No AI generated code was used in this PR

Related issues

fixes: #14530

@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 Jan 9, 2024
@powersj powersj marked this pull request as ready for review January 22, 2024 13:37
@powersj powersj 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 Jan 22, 2024
Copy link
Member

@srebhan srebhan left a 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
@Hipska Hipska removed 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 Jan 23, 2024
@powersj powersj 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 Jan 23, 2024
@Hipska Hipska removed 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 Jan 23, 2024
@Hipska Hipska 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 Jan 23, 2024
Copy link
Member

@srebhan srebhan left a 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!

@srebhan srebhan assigned powersj and unassigned srebhan Jan 24, 2024
@srebhan
Copy link
Member

srebhan commented Jan 24, 2024

@powersj assigning the PR back to you in case you want to wait for a confirmation in the issue...

@telegraf-tiger
Copy link
Contributor

@powersj powersj merged commit 03eaae6 into influxdata:master Jan 25, 2024
26 checks passed
@powersj powersj deleted the fix/14530 branch January 25, 2024 13:34
@github-actions github-actions bot added this to the v1.29.3 milestone Jan 25, 2024
powersj added a commit that referenced this pull request Jan 29, 2024
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.

(inputs.gnmi): Parsing field names incorrectly
3 participants