-
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: update the precision parameter default value #10814
Conversation
I would guess that most telegraf users made their config files by running Making duration parsing more strict seems like a good thing, but it looks like that will mean requiring all those config files to be updated manually. I don't think that's practical. I think we're going to need to add a special case in UnmarshalTOML to accept "" and treat it like telegraf did previously. Otherwise we're going to inconvenience too many people. The original intent of the changes to UnmarshalTOML was to stop accepting a unit with no value (like "ns") because it's confusing/misleading. I think we can do that while still accepting "" for backward compatibility. |
In influxdata#10803, precision parsing was made more strict so that incorrect values would be caught. The default precision value however is not correct as an empty string, but will still accept the emptry string. fixes: influxdata#10813
516d6c5
to
9fa8210
Compare
Right, good catch
Done - I am still updating the default value to align with the comment but checking for the empty string now. |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.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.
Looks great, thanks! 🙂
Thanks also for looking out for the existing config files generated with telegraf config
. 👍
In #10803, precision parsing was made more strict so that incorrect
values would be caught. The default precision value however is not
correct as an empty string.
fixes: #10813