-
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
chore(inputs.win_wmi): Cleanup and refactor code #14965
Conversation
594ff9c
to
75af2a1
Compare
75af2a1
to
1fbc698
Compare
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.
I think I'm +1 if this is just copy/paste and whitespace changes, but my eyes are not good enough to go back and forth right now.
[ACL]: https://learn.microsoft.com/en-us/windows/win32/wmisdk/access-to-wmi-namespaces | ||
[WMIdoc]: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page | ||
|
||
## Global configuration options <!-- @/docs/includes/plugin_config.md --> |
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.
Is this whole file whitespace changes?
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.
Yes this is line-ending conversion from CRLF to LF.
@@ -0,0 +1,158 @@ | |||
//go:build windows |
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.
Any logic changes or just copy and paste?
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.
The code is only required in the windows part as the non-windows part is an empty hull for config generation.
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.
Right I understand the build tags ;) My question was around all the code now in this query file. Were there any logic changes to it? Or did you just copy and paste it out of the previous file?
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.
Just copy-and-paste plus dissolving some functions and copy the code to the corresponding calling location.
(cherry picked from commit 8183d47)
Summary
Cleanup code and factor out query-code to own file.
Checklist
Related issues
related to #14942