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(agent): Handle float time with fractions of seconds correctly #12491

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

srebhan
Copy link
Contributor

@srebhan srebhan commented Jan 11, 2023

In the course of #12490 I found an issue when specifying a duration with fractions of seconds as a plain floating point value e.g. timeout = 1.5, where you would expect the timeout to be 1500 milliseconds. However the current code will just floor that value to 1 second.

This PR fixes the handling of plain floating point values that contain fractions of seconds and also gets rid of the necessity for TOML quotation handling by using the UnmarshalText interface.

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Jan 11, 2023
@srebhan srebhan added area/configuration area/agent ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. labels Jan 11, 2023
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.

Making changes to this area of code concerns me, but the tests and additional tests (thanks) do look correct I believe, so thanks for this!

@powersj powersj merged commit e9c0487 into influxdata:master Jan 11, 2023
srebhan added a commit that referenced this pull request Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/agent area/configuration 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.

None yet

2 participants