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: Restore warning on unused config option(s) #12063

Merged
merged 4 commits into from
Oct 21, 2022

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Oct 19, 2022

resolves #12000

In the course of parser cleanup (PR #11532) the handling of unused options was oversimplified and as a result, no warning was issued on unused config options. This PR restores the old behavior of warning on unused config options. Moreover it fixes a previously existing issue of not warning for invalid options in table-based parsers (json_v2 and xpath). To guard the fix, we also add a bunch of unit-tests to ensure proper functionality in the future.

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Oct 19, 2022
@telegraf-tiger
Copy link
Contributor

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.

Thank you for jumping on this one. Love the tests!

@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 Oct 20, 2022
@MyaLongmire MyaLongmire merged commit 76d7a95 into influxdata:master Oct 21, 2022
dba-leshop pushed a commit to dba-leshop/telegraf that referenced this pull request Oct 30, 2022
popey pushed a commit that referenced this pull request Nov 2, 2022
@srebhan srebhan deleted the config_option_warn_fix branch November 7, 2022 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug 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.

Telegraf doesn't error on unused
3 participants